From 29db91562071cdb55ce57e0c3fb3f2abf184749b Mon Sep 17 00:00:00 2001 From: awssdkgo Date: Thu, 11 Jul 2019 17:00:16 +0000 Subject: [PATCH] Release v1.20.19 --- CHANGELOG.md | 14 + CHANGELOG_PENDING.md | 4 - aws/version.go | 2 +- models/apis/eventbridge/2015-10-07/api-2.json | 1462 ++++ .../apis/eventbridge/2015-10-07/docs-2.json | 1035 +++ .../eventbridge/2015-10-07/examples-1.json | 5 + .../eventbridge/2015-10-07/paginators-1.json | 4 + models/apis/eventbridge/2015-10-07/smoke.json | 18 + models/apis/events/2015-10-07/api-2.json | 518 +- models/apis/events/2015-10-07/docs-2.json | 456 +- service/cloudwatchevents/api.go | 5302 +++++++++--- .../cloudwatcheventsiface/interface.go | 56 +- service/cloudwatchevents/doc.go | 22 +- service/cloudwatchevents/errors.go | 31 +- service/eventbridge/api.go | 7407 +++++++++++++++++ service/eventbridge/doc.go | 46 + service/eventbridge/errors.go | 64 + .../eventbridge/eventbridgeiface/interface.go | 188 + service/eventbridge/integ_test.go | 58 + service/eventbridge/service.go | 97 + service/kafka/api.go | 2 +- 21 files changed, 15426 insertions(+), 1365 deletions(-) create mode 100644 models/apis/eventbridge/2015-10-07/api-2.json create mode 100644 models/apis/eventbridge/2015-10-07/docs-2.json create mode 100644 models/apis/eventbridge/2015-10-07/examples-1.json create mode 100644 models/apis/eventbridge/2015-10-07/paginators-1.json create mode 100644 models/apis/eventbridge/2015-10-07/smoke.json create mode 100644 service/eventbridge/api.go create mode 100644 service/eventbridge/doc.go create mode 100644 service/eventbridge/errors.go create mode 100644 service/eventbridge/eventbridgeiface/interface.go create mode 100644 service/eventbridge/integ_test.go create mode 100644 service/eventbridge/service.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c65c82934..366a13ca3df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +Release v1.20.19 (2019-07-11) +=== + +### Service Client Updates +* `service/eventbridge`: Adds new service +* `service/events`: Updates service API and documentation + * Adds APIs for partner event sources, partner event buses, and custom event buses. These new features are managed in the EventBridge service. + +### SDK Enhancements +* `aws/session`: Add Assume role for credential process from aws shared config ([#2674](https://github.com/aws/aws-sdk-go/pull/2674)) + * Adds support for assuming role using credential process from the shared config file. Also updated SDK's environment testing and added SDK's CI testing with Windows. +* `aws/csm`: Add support for AWS_CSM_HOST env option ([#2677](https://github.com/aws/aws-sdk-go/pull/2677)) + * Adds support for a host to be configured for the SDK's metric reporting Client Side Metrics (CSM) client via the AWS_CSM_HOST environment variable. + Release v1.20.18 (2019-07-10) === diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 99d8eaf6d98..8a1927a39ca 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -1,9 +1,5 @@ ### SDK Features ### SDK Enhancements -* `aws/session`: Add Assume role for credential process from aws shared config ([#2674](https://github.com/aws/aws-sdk-go/pull/2674)) - * Adds support for assuming role using credential process from the shared config file. Also updated SDK's environment testing and added SDK's CI testing with Windows. -* `aws/csm`: Add support for AWS_CSM_HOST env option ([#2677](https://github.com/aws/aws-sdk-go/pull/2677)) - * Adds support for a host to be configured for the SDK's metric reporting Client Side Metrics (CSM) client via the AWS_CSM_HOST environment variable. ### SDK Bugs diff --git a/aws/version.go b/aws/version.go index adbd0ac62e0..e5e93a8bb64 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.20.18" +const SDKVersion = "1.20.19" diff --git a/models/apis/eventbridge/2015-10-07/api-2.json b/models/apis/eventbridge/2015-10-07/api-2.json new file mode 100644 index 00000000000..91ec598e575 --- /dev/null +++ b/models/apis/eventbridge/2015-10-07/api-2.json @@ -0,0 +1,1462 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2015-10-07", + "endpointPrefix":"events", + "jsonVersion":"1.1", + "protocol":"json", + "serviceFullName":"Amazon EventBridge", + "serviceId":"EventBridge", + "signatureVersion":"v4", + "targetPrefix":"AWSEvents", + "uid":"eventbridge-2015-10-07" + }, + "operations":{ + "ActivateEventSource":{ + "name":"ActivateEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ActivateEventSourceRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidStateException"}, + {"shape":"InternalException"} + ] + }, + "CreateEventBus":{ + "name":"CreateEventBus", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateEventBusRequest"}, + "output":{"shape":"CreateEventBusResponse"}, + "errors":[ + {"shape":"ResourceAlreadyExistsException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidStateException"}, + {"shape":"InternalException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"LimitExceededException"} + ] + }, + "CreatePartnerEventSource":{ + "name":"CreatePartnerEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreatePartnerEventSourceRequest"}, + "output":{"shape":"CreatePartnerEventSourceResponse"}, + "errors":[ + {"shape":"ResourceAlreadyExistsException"}, + {"shape":"InternalException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"LimitExceededException"} + ] + }, + "DeactivateEventSource":{ + "name":"DeactivateEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeactivateEventSourceRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidStateException"}, + {"shape":"InternalException"} + ] + }, + "DeleteEventBus":{ + "name":"DeleteEventBus", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteEventBusRequest"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "DeletePartnerEventSource":{ + "name":"DeletePartnerEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeletePartnerEventSourceRequest"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "DeleteRule":{ + "name":"DeleteRule", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteRuleRequest"}, + "errors":[ + {"shape":"ConcurrentModificationException"}, + {"shape":"ManagedRuleException"}, + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "DescribeEventBus":{ + "name":"DescribeEventBus", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeEventBusRequest"}, + "output":{"shape":"DescribeEventBusResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "DescribeEventSource":{ + "name":"DescribeEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeEventSourceRequest"}, + "output":{"shape":"DescribeEventSourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "DescribePartnerEventSource":{ + "name":"DescribePartnerEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribePartnerEventSourceRequest"}, + "output":{"shape":"DescribePartnerEventSourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "DescribeRule":{ + "name":"DescribeRule", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeRuleRequest"}, + "output":{"shape":"DescribeRuleResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "DisableRule":{ + "name":"DisableRule", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DisableRuleRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"ManagedRuleException"}, + {"shape":"InternalException"} + ] + }, + "EnableRule":{ + "name":"EnableRule", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"EnableRuleRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"ManagedRuleException"}, + {"shape":"InternalException"} + ] + }, + "ListEventBuses":{ + "name":"ListEventBuses", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListEventBusesRequest"}, + "output":{"shape":"ListEventBusesResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "ListEventSources":{ + "name":"ListEventSources", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListEventSourcesRequest"}, + "output":{"shape":"ListEventSourcesResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "ListPartnerEventSourceAccounts":{ + "name":"ListPartnerEventSourceAccounts", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListPartnerEventSourceAccountsRequest"}, + "output":{"shape":"ListPartnerEventSourceAccountsResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "ListPartnerEventSources":{ + "name":"ListPartnerEventSources", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListPartnerEventSourcesRequest"}, + "output":{"shape":"ListPartnerEventSourcesResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "ListRuleNamesByTarget":{ + "name":"ListRuleNamesByTarget", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListRuleNamesByTargetRequest"}, + "output":{"shape":"ListRuleNamesByTargetResponse"}, + "errors":[ + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "ListRules":{ + "name":"ListRules", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListRulesRequest"}, + "output":{"shape":"ListRulesResponse"}, + "errors":[ + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "ListTargetsByRule":{ + "name":"ListTargetsByRule", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTargetsByRuleRequest"}, + "output":{"shape":"ListTargetsByRuleResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "PutEvents":{ + "name":"PutEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutEventsRequest"}, + "output":{"shape":"PutEventsResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "PutPartnerEvents":{ + "name":"PutPartnerEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutPartnerEventsRequest"}, + "output":{"shape":"PutPartnerEventsResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "PutPermission":{ + "name":"PutPermission", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutPermissionRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"PolicyLengthExceededException"}, + {"shape":"InternalException"}, + {"shape":"ConcurrentModificationException"} + ] + }, + "PutRule":{ + "name":"PutRule", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutRuleRequest"}, + "output":{"shape":"PutRuleResponse"}, + "errors":[ + {"shape":"InvalidEventPatternException"}, + {"shape":"LimitExceededException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"ManagedRuleException"}, + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "PutTargets":{ + "name":"PutTargets", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutTargetsRequest"}, + "output":{"shape":"PutTargetsResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"LimitExceededException"}, + {"shape":"ManagedRuleException"}, + {"shape":"InternalException"} + ] + }, + "RemovePermission":{ + "name":"RemovePermission", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"RemovePermissionRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"}, + {"shape":"ConcurrentModificationException"} + ] + }, + "RemoveTargets":{ + "name":"RemoveTargets", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"RemoveTargetsRequest"}, + "output":{"shape":"RemoveTargetsResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"ManagedRuleException"}, + {"shape":"InternalException"} + ] + }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"InternalException"}, + {"shape":"ManagedRuleException"} + ] + }, + "TestEventPattern":{ + "name":"TestEventPattern", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TestEventPatternRequest"}, + "output":{"shape":"TestEventPatternResponse"}, + "errors":[ + {"shape":"InvalidEventPatternException"}, + {"shape":"InternalException"} + ] + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"ManagedRuleException"} + ] + } + }, + "shapes":{ + "AccountId":{ + "type":"string", + "max":12, + "min":12, + "pattern":"\\d{12}" + }, + "Action":{ + "type":"string", + "max":64, + "min":1, + "pattern":"events:[a-zA-Z]+" + }, + "ActivateEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, + "Arn":{ + "type":"string", + "max":1600, + "min":1 + }, + "AssignPublicIp":{ + "type":"string", + "enum":[ + "ENABLED", + "DISABLED" + ] + }, + "AwsVpcConfiguration":{ + "type":"structure", + "required":["Subnets"], + "members":{ + "Subnets":{"shape":"StringList"}, + "SecurityGroups":{"shape":"StringList"}, + "AssignPublicIp":{"shape":"AssignPublicIp"} + } + }, + "BatchArrayProperties":{ + "type":"structure", + "members":{ + "Size":{"shape":"Integer"} + } + }, + "BatchParameters":{ + "type":"structure", + "required":[ + "JobDefinition", + "JobName" + ], + "members":{ + "JobDefinition":{"shape":"String"}, + "JobName":{"shape":"String"}, + "ArrayProperties":{"shape":"BatchArrayProperties"}, + "RetryStrategy":{"shape":"BatchRetryStrategy"} + } + }, + "BatchRetryStrategy":{ + "type":"structure", + "members":{ + "Attempts":{"shape":"Integer"} + } + }, + "Boolean":{"type":"boolean"}, + "ConcurrentModificationException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "Condition":{ + "type":"structure", + "required":[ + "Type", + "Key", + "Value" + ], + "members":{ + "Type":{"shape":"String"}, + "Key":{"shape":"String"}, + "Value":{"shape":"String"} + } + }, + "CreateEventBusRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventBusName"}, + "EventSourceName":{"shape":"EventSourceName"} + } + }, + "CreateEventBusResponse":{ + "type":"structure", + "members":{ + "EventBusArn":{"shape":"String"} + } + }, + "CreatePartnerEventSourceRequest":{ + "type":"structure", + "required":[ + "Name", + "Account" + ], + "members":{ + "Name":{"shape":"EventSourceName"}, + "Account":{"shape":"AccountId"} + } + }, + "CreatePartnerEventSourceResponse":{ + "type":"structure", + "members":{ + "EventSourceArn":{"shape":"String"} + } + }, + "DeactivateEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, + "DeleteEventBusRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventBusName"} + } + }, + "DeletePartnerEventSourceRequest":{ + "type":"structure", + "required":[ + "Name", + "Account" + ], + "members":{ + "Name":{"shape":"EventSourceName"}, + "Account":{"shape":"AccountId"} + } + }, + "DeleteRuleRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, + "Force":{"shape":"Boolean"} + } + }, + "DescribeEventBusRequest":{ + "type":"structure", + "members":{ + "Name":{"shape":"EventBusName"} + } + }, + "DescribeEventBusResponse":{ + "type":"structure", + "members":{ + "Name":{"shape":"String"}, + "Arn":{"shape":"String"}, + "Policy":{"shape":"String"} + } + }, + "DescribeEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, + "DescribeEventSourceResponse":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "CreatedBy":{"shape":"String"}, + "CreationTime":{"shape":"Timestamp"}, + "ExpirationTime":{"shape":"Timestamp"}, + "Name":{"shape":"String"}, + "State":{"shape":"EventSourceState"} + } + }, + "DescribePartnerEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, + "DescribePartnerEventSourceResponse":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "Name":{"shape":"String"} + } + }, + "DescribeRuleRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"} + } + }, + "DescribeRuleResponse":{ + "type":"structure", + "members":{ + "Name":{"shape":"RuleName"}, + "Arn":{"shape":"RuleArn"}, + "EventPattern":{"shape":"EventPattern"}, + "ScheduleExpression":{"shape":"ScheduleExpression"}, + "State":{"shape":"RuleState"}, + "Description":{"shape":"RuleDescription"}, + "RoleArn":{"shape":"RoleArn"}, + "ManagedBy":{"shape":"ManagedBy"}, + "EventBusName":{"shape":"EventBusName"} + } + }, + "DisableRuleRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"} + } + }, + "EcsParameters":{ + "type":"structure", + "required":["TaskDefinitionArn"], + "members":{ + "TaskDefinitionArn":{"shape":"Arn"}, + "TaskCount":{"shape":"LimitMin1"}, + "LaunchType":{"shape":"LaunchType"}, + "NetworkConfiguration":{"shape":"NetworkConfiguration"}, + "PlatformVersion":{"shape":"String"}, + "Group":{"shape":"String"} + } + }, + "EnableRuleRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"} + } + }, + "ErrorCode":{"type":"string"}, + "ErrorMessage":{"type":"string"}, + "EventBus":{ + "type":"structure", + "members":{ + "Name":{"shape":"String"}, + "Arn":{"shape":"String"}, + "Policy":{"shape":"String"} + } + }, + "EventBusList":{ + "type":"list", + "member":{"shape":"EventBus"} + }, + "EventBusName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[/\\.\\-_A-Za-z0-9]+" + }, + "EventId":{"type":"string"}, + "EventPattern":{"type":"string"}, + "EventResource":{"type":"string"}, + "EventResourceList":{ + "type":"list", + "member":{"shape":"EventResource"} + }, + "EventSource":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "CreatedBy":{"shape":"String"}, + "CreationTime":{"shape":"Timestamp"}, + "ExpirationTime":{"shape":"Timestamp"}, + "Name":{"shape":"String"}, + "State":{"shape":"EventSourceState"} + } + }, + "EventSourceList":{ + "type":"list", + "member":{"shape":"EventSource"} + }, + "EventSourceName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}" + }, + "EventSourceNamePrefix":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[/\\.\\-_A-Za-z0-9]+" + }, + "EventSourceState":{ + "type":"string", + "enum":[ + "PENDING", + "ACTIVE", + "DELETED" + ] + }, + "EventTime":{"type":"timestamp"}, + "InputTransformer":{ + "type":"structure", + "required":["InputTemplate"], + "members":{ + "InputPathsMap":{"shape":"TransformerPaths"}, + "InputTemplate":{"shape":"TransformerInput"} + } + }, + "InputTransformerPathKey":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[A-Za-z0-9\\_\\-]+" + }, + "Integer":{"type":"integer"}, + "InternalException":{ + "type":"structure", + "members":{ + }, + "exception":true, + "fault":true + }, + "InvalidEventPatternException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "InvalidStateException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "KinesisParameters":{ + "type":"structure", + "required":["PartitionKeyPath"], + "members":{ + "PartitionKeyPath":{"shape":"TargetPartitionKeyPath"} + } + }, + "LaunchType":{ + "type":"string", + "enum":[ + "EC2", + "FARGATE" + ] + }, + "LimitExceededException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "LimitMax100":{ + "type":"integer", + "max":100, + "min":1 + }, + "LimitMin1":{ + "type":"integer", + "min":1 + }, + "ListEventBusesRequest":{ + "type":"structure", + "members":{ + "NamePrefix":{"shape":"EventBusName"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListEventBusesResponse":{ + "type":"structure", + "members":{ + "EventBuses":{"shape":"EventBusList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListEventSourcesRequest":{ + "type":"structure", + "members":{ + "NamePrefix":{"shape":"EventSourceNamePrefix"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListEventSourcesResponse":{ + "type":"structure", + "members":{ + "EventSources":{"shape":"EventSourceList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListPartnerEventSourceAccountsRequest":{ + "type":"structure", + "required":["EventSourceName"], + "members":{ + "EventSourceName":{"shape":"EventSourceName"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListPartnerEventSourceAccountsResponse":{ + "type":"structure", + "members":{ + "PartnerEventSourceAccounts":{"shape":"PartnerEventSourceAccountList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListPartnerEventSourcesRequest":{ + "type":"structure", + "required":["NamePrefix"], + "members":{ + "NamePrefix":{"shape":"PartnerEventSourceNamePrefix"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListPartnerEventSourcesResponse":{ + "type":"structure", + "members":{ + "PartnerEventSources":{"shape":"PartnerEventSourceList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListRuleNamesByTargetRequest":{ + "type":"structure", + "required":["TargetArn"], + "members":{ + "TargetArn":{"shape":"TargetArn"}, + "EventBusName":{"shape":"EventBusName"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListRuleNamesByTargetResponse":{ + "type":"structure", + "members":{ + "RuleNames":{"shape":"RuleNameList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListRulesRequest":{ + "type":"structure", + "members":{ + "NamePrefix":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListRulesResponse":{ + "type":"structure", + "members":{ + "Rules":{"shape":"RuleResponseList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceARN"], + "members":{ + "ResourceARN":{"shape":"Arn"} + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "Tags":{"shape":"TagList"} + } + }, + "ListTargetsByRuleRequest":{ + "type":"structure", + "required":["Rule"], + "members":{ + "Rule":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListTargetsByRuleResponse":{ + "type":"structure", + "members":{ + "Targets":{"shape":"TargetList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ManagedBy":{ + "type":"string", + "max":128, + "min":1 + }, + "ManagedRuleException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "MessageGroupId":{"type":"string"}, + "NetworkConfiguration":{ + "type":"structure", + "members":{ + "awsvpcConfiguration":{"shape":"AwsVpcConfiguration"} + } + }, + "NextToken":{ + "type":"string", + "max":2048, + "min":1 + }, + "NonPartnerEventBusName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[\\.\\-_A-Za-z0-9]+" + }, + "PartnerEventSource":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "Name":{"shape":"String"} + } + }, + "PartnerEventSourceAccount":{ + "type":"structure", + "members":{ + "Account":{"shape":"AccountId"}, + "CreationTime":{"shape":"Timestamp"}, + "ExpirationTime":{"shape":"Timestamp"}, + "State":{"shape":"EventSourceState"} + } + }, + "PartnerEventSourceAccountList":{ + "type":"list", + "member":{"shape":"PartnerEventSourceAccount"} + }, + "PartnerEventSourceList":{ + "type":"list", + "member":{"shape":"PartnerEventSource"} + }, + "PartnerEventSourceNamePrefix":{ + "type":"string", + "max":256, + "min":1, + "pattern":"aws\\.partner/[\\.\\-_A-Za-z0-9]+/[/\\.\\-_A-Za-z0-9]*" + }, + "PolicyLengthExceededException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "Principal":{ + "type":"string", + "max":12, + "min":1, + "pattern":"(\\d{12}|\\*)" + }, + "PutEventsRequest":{ + "type":"structure", + "required":["Entries"], + "members":{ + "Entries":{"shape":"PutEventsRequestEntryList"} + } + }, + "PutEventsRequestEntry":{ + "type":"structure", + "members":{ + "Time":{"shape":"EventTime"}, + "Source":{"shape":"String"}, + "Resources":{"shape":"EventResourceList"}, + "DetailType":{"shape":"String"}, + "Detail":{"shape":"String"}, + "EventBusName":{"shape":"NonPartnerEventBusName"} + } + }, + "PutEventsRequestEntryList":{ + "type":"list", + "member":{"shape":"PutEventsRequestEntry"}, + "max":10, + "min":1 + }, + "PutEventsResponse":{ + "type":"structure", + "members":{ + "FailedEntryCount":{"shape":"Integer"}, + "Entries":{"shape":"PutEventsResultEntryList"} + } + }, + "PutEventsResultEntry":{ + "type":"structure", + "members":{ + "EventId":{"shape":"EventId"}, + "ErrorCode":{"shape":"ErrorCode"}, + "ErrorMessage":{"shape":"ErrorMessage"} + } + }, + "PutEventsResultEntryList":{ + "type":"list", + "member":{"shape":"PutEventsResultEntry"} + }, + "PutPartnerEventsRequest":{ + "type":"structure", + "required":["Entries"], + "members":{ + "Entries":{"shape":"PutPartnerEventsRequestEntryList"} + } + }, + "PutPartnerEventsRequestEntry":{ + "type":"structure", + "members":{ + "Time":{"shape":"EventTime"}, + "Source":{"shape":"String"}, + "Resources":{"shape":"EventResourceList"}, + "DetailType":{"shape":"String"}, + "Detail":{"shape":"String"} + } + }, + "PutPartnerEventsRequestEntryList":{ + "type":"list", + "member":{"shape":"PutPartnerEventsRequestEntry"}, + "max":20, + "min":1 + }, + "PutPartnerEventsResponse":{ + "type":"structure", + "members":{ + "FailedEntryCount":{"shape":"Integer"}, + "Entries":{"shape":"PutPartnerEventsResultEntryList"} + } + }, + "PutPartnerEventsResultEntry":{ + "type":"structure", + "members":{ + "EventId":{"shape":"EventId"}, + "ErrorCode":{"shape":"ErrorCode"}, + "ErrorMessage":{"shape":"ErrorMessage"} + } + }, + "PutPartnerEventsResultEntryList":{ + "type":"list", + "member":{"shape":"PutPartnerEventsResultEntry"} + }, + "PutPermissionRequest":{ + "type":"structure", + "required":[ + "Action", + "Principal", + "StatementId" + ], + "members":{ + "EventBusName":{"shape":"NonPartnerEventBusName"}, + "Action":{"shape":"Action"}, + "Principal":{"shape":"Principal"}, + "StatementId":{"shape":"StatementId"}, + "Condition":{"shape":"Condition"} + } + }, + "PutRuleRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"RuleName"}, + "ScheduleExpression":{"shape":"ScheduleExpression"}, + "EventPattern":{"shape":"EventPattern"}, + "State":{"shape":"RuleState"}, + "Description":{"shape":"RuleDescription"}, + "RoleArn":{"shape":"RoleArn"}, + "Tags":{"shape":"TagList"}, + "EventBusName":{"shape":"EventBusName"} + } + }, + "PutRuleResponse":{ + "type":"structure", + "members":{ + "RuleArn":{"shape":"RuleArn"} + } + }, + "PutTargetsRequest":{ + "type":"structure", + "required":[ + "Rule", + "Targets" + ], + "members":{ + "Rule":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, + "Targets":{"shape":"TargetList"} + } + }, + "PutTargetsResponse":{ + "type":"structure", + "members":{ + "FailedEntryCount":{"shape":"Integer"}, + "FailedEntries":{"shape":"PutTargetsResultEntryList"} + } + }, + "PutTargetsResultEntry":{ + "type":"structure", + "members":{ + "TargetId":{"shape":"TargetId"}, + "ErrorCode":{"shape":"ErrorCode"}, + "ErrorMessage":{"shape":"ErrorMessage"} + } + }, + "PutTargetsResultEntryList":{ + "type":"list", + "member":{"shape":"PutTargetsResultEntry"} + }, + "RemovePermissionRequest":{ + "type":"structure", + "required":["StatementId"], + "members":{ + "StatementId":{"shape":"StatementId"}, + "EventBusName":{"shape":"NonPartnerEventBusName"} + } + }, + "RemoveTargetsRequest":{ + "type":"structure", + "required":[ + "Rule", + "Ids" + ], + "members":{ + "Rule":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, + "Ids":{"shape":"TargetIdList"}, + "Force":{"shape":"Boolean"} + } + }, + "RemoveTargetsResponse":{ + "type":"structure", + "members":{ + "FailedEntryCount":{"shape":"Integer"}, + "FailedEntries":{"shape":"RemoveTargetsResultEntryList"} + } + }, + "RemoveTargetsResultEntry":{ + "type":"structure", + "members":{ + "TargetId":{"shape":"TargetId"}, + "ErrorCode":{"shape":"ErrorCode"}, + "ErrorMessage":{"shape":"ErrorMessage"} + } + }, + "RemoveTargetsResultEntryList":{ + "type":"list", + "member":{"shape":"RemoveTargetsResultEntry"} + }, + "ResourceAlreadyExistsException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, + "RoleArn":{ + "type":"string", + "max":1600, + "min":1 + }, + "Rule":{ + "type":"structure", + "members":{ + "Name":{"shape":"RuleName"}, + "Arn":{"shape":"RuleArn"}, + "EventPattern":{"shape":"EventPattern"}, + "State":{"shape":"RuleState"}, + "Description":{"shape":"RuleDescription"}, + "ScheduleExpression":{"shape":"ScheduleExpression"}, + "RoleArn":{"shape":"RoleArn"}, + "ManagedBy":{"shape":"ManagedBy"}, + "EventBusName":{"shape":"EventBusName"} + } + }, + "RuleArn":{ + "type":"string", + "max":1600, + "min":1 + }, + "RuleDescription":{ + "type":"string", + "max":512 + }, + "RuleName":{ + "type":"string", + "max":64, + "min":1, + "pattern":"[\\.\\-_A-Za-z0-9]+" + }, + "RuleNameList":{ + "type":"list", + "member":{"shape":"RuleName"} + }, + "RuleResponseList":{ + "type":"list", + "member":{"shape":"Rule"} + }, + "RuleState":{ + "type":"string", + "enum":[ + "ENABLED", + "DISABLED" + ] + }, + "RunCommandParameters":{ + "type":"structure", + "required":["RunCommandTargets"], + "members":{ + "RunCommandTargets":{"shape":"RunCommandTargets"} + } + }, + "RunCommandTarget":{ + "type":"structure", + "required":[ + "Key", + "Values" + ], + "members":{ + "Key":{"shape":"RunCommandTargetKey"}, + "Values":{"shape":"RunCommandTargetValues"} + } + }, + "RunCommandTargetKey":{ + "type":"string", + "max":128, + "min":1, + "pattern":"^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$" + }, + "RunCommandTargetValue":{ + "type":"string", + "max":256, + "min":1 + }, + "RunCommandTargetValues":{ + "type":"list", + "member":{"shape":"RunCommandTargetValue"}, + "max":50, + "min":1 + }, + "RunCommandTargets":{ + "type":"list", + "member":{"shape":"RunCommandTarget"}, + "max":5, + "min":1 + }, + "ScheduleExpression":{ + "type":"string", + "max":256 + }, + "SqsParameters":{ + "type":"structure", + "members":{ + "MessageGroupId":{"shape":"MessageGroupId"} + } + }, + "StatementId":{ + "type":"string", + "max":64, + "min":1, + "pattern":"[a-zA-Z0-9-_]+" + }, + "String":{"type":"string"}, + "StringList":{ + "type":"list", + "member":{"shape":"String"} + }, + "Tag":{ + "type":"structure", + "required":[ + "Key", + "Value" + ], + "members":{ + "Key":{"shape":"TagKey"}, + "Value":{"shape":"TagValue"} + } + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1 + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"} + }, + "TagList":{ + "type":"list", + "member":{"shape":"Tag"} + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceARN", + "Tags" + ], + "members":{ + "ResourceARN":{"shape":"Arn"}, + "Tags":{"shape":"TagList"} + } + }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagValue":{ + "type":"string", + "max":256, + "min":0 + }, + "Target":{ + "type":"structure", + "required":[ + "Id", + "Arn" + ], + "members":{ + "Id":{"shape":"TargetId"}, + "Arn":{"shape":"TargetArn"}, + "RoleArn":{"shape":"RoleArn"}, + "Input":{"shape":"TargetInput"}, + "InputPath":{"shape":"TargetInputPath"}, + "InputTransformer":{"shape":"InputTransformer"}, + "KinesisParameters":{"shape":"KinesisParameters"}, + "RunCommandParameters":{"shape":"RunCommandParameters"}, + "EcsParameters":{"shape":"EcsParameters"}, + "BatchParameters":{"shape":"BatchParameters"}, + "SqsParameters":{"shape":"SqsParameters"} + } + }, + "TargetArn":{ + "type":"string", + "max":1600, + "min":1 + }, + "TargetId":{ + "type":"string", + "max":64, + "min":1, + "pattern":"[\\.\\-_A-Za-z0-9]+" + }, + "TargetIdList":{ + "type":"list", + "member":{"shape":"TargetId"}, + "max":100, + "min":1 + }, + "TargetInput":{ + "type":"string", + "max":8192 + }, + "TargetInputPath":{ + "type":"string", + "max":256 + }, + "TargetList":{ + "type":"list", + "member":{"shape":"Target"}, + "max":100, + "min":1 + }, + "TargetPartitionKeyPath":{ + "type":"string", + "max":256 + }, + "TestEventPatternRequest":{ + "type":"structure", + "required":[ + "EventPattern", + "Event" + ], + "members":{ + "EventPattern":{"shape":"EventPattern"}, + "Event":{"shape":"String"} + } + }, + "TestEventPatternResponse":{ + "type":"structure", + "members":{ + "Result":{"shape":"Boolean"} + } + }, + "Timestamp":{"type":"timestamp"}, + "TransformerInput":{ + "type":"string", + "max":8192, + "min":1 + }, + "TransformerPaths":{ + "type":"map", + "key":{"shape":"InputTransformerPathKey"}, + "value":{"shape":"TargetInputPath"}, + "max":10 + }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceARN", + "TagKeys" + ], + "members":{ + "ResourceARN":{"shape":"Arn"}, + "TagKeys":{"shape":"TagKeyList"} + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + } + } +} diff --git a/models/apis/eventbridge/2015-10-07/docs-2.json b/models/apis/eventbridge/2015-10-07/docs-2.json new file mode 100644 index 00000000000..8377d34eab4 --- /dev/null +++ b/models/apis/eventbridge/2015-10-07/docs-2.json @@ -0,0 +1,1035 @@ +{ + "version": "2.0", + "service": "

Amazon EventBridge helps you to respond to state changes in your AWS resources. When your resources change state, they automatically send events into an event stream. You can create rules that match selected events in the stream and route them to targets to take action. You can also use rules to take action on a predetermined schedule. For example, you can configure rules to:

For more information about the features of Amazon EventBridge, see the Amazon EventBridge User Guide.

", + "operations": { + "ActivateEventSource": "

Activates a partner event source that has been deactivated. Once activated, your matching event bus will start receiving events from the event source.

This operation is performed by AWS customers, not by SaaS partners.

", + "CreateEventBus": "

Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your own custom applications and services, or it can be a partner event bus which can be matched to a partner event source.

This operation is used by AWS customers, not by SaaS partners.

", + "CreatePartnerEventSource": "

Called by an SaaS partner to create a partner event source.

This operation is not used by AWS customers.

Each partner event source can be used by one AWS account to create a matching partner event bus in that AWS account. A SaaS partner must create one partner event source for each AWS account that wants to receive those event types.

A partner event source creates events based on resources in the SaaS partner's service or application.

An AWS account that creates a partner event bus that matches the partner event source can use that event bus to receive events from the partner, and then process them using AWS Events rules and targets.

Partner event source names follow this format:

aws.partner/partner_name/event_namespace/event_name

", + "DeactivateEventSource": "

An AWS customer uses this operation to temporarily stop receiving events from the specified partner event source. The matching event bus isn't deleted.

When you deactivate a partner event source, the source goes into PENDING state. If it remains in PENDING state for more than two weeks, it's deleted.

To activate a deactivated partner event source, use ActivateEventSource.

", + "DeleteEventBus": "

Deletes the specified custom event bus or partner event bus. All rules associated with this event bus are also deleted. You can't delete your account's default event bus.

This operation is performed by AWS customers, not by SaaS partners.

", + "DeletePartnerEventSource": "

This operation is used by SaaS partners to delete a partner event source. AWS customers don't use this operation.

When you delete an event source, the status of the corresponding partner event bus in the AWS customer account becomes DELETED.

", + "DeleteRule": "

Deletes the specified rule.

Before you can delete the rule, you must remove all targets, using RemoveTargets.

When you delete a rule, incoming events might continue to match to the deleted rule. Allow a short period of time for changes to take effect.

Managed rules are rules created and managed by another AWS service on your behalf. These rules are created by those other AWS services to support functionality in those services. You can delete these rules using the Force option, but you should do so only if you're sure that the other service isn't still using that rule.

", + "DescribeEventBus": "

Displays details about an event bus in your account. This can include the external AWS accounts that are permitted to write events to your default event bus, and the associated policy. For custom event buses and partner event buses, it displays the name, ARN, policy, state, and creation time.

To enable your account to receive events from other accounts on its default event bus, use PutPermission.

For more information about partner event buses, see CreateEventBus.

", + "DescribeEventSource": "

This operation lists details about a partner event source that is shared with your account.

This operation is run by AWS customers, not by SaaS partners.

", + "DescribePartnerEventSource": "

An SaaS partner can use this operation to list details about a partner event source that they have created.

AWS customers do not use this operation. Instead, AWS customers can use DescribeEventSource to see details about a partner event source that is shared with them.

", + "DescribeRule": "

Describes the specified rule.

DescribeRule doesn't list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

", + "DisableRule": "

Disables the specified rule. A disabled rule won't match any events and won't self-trigger if it has a schedule expression.

When you disable a rule, incoming events might continue to match to the disabled rule. Allow a short period of time for changes to take effect.

", + "EnableRule": "

Enables the specified rule. If the rule doesn't exist, the operation fails.

When you enable a rule, incoming events might not immediately start matching to a newly enabled rule. Allow a short period of time for changes to take effect.

", + "ListEventBuses": "

Lists all the event buses in your account, including the default event bus, custom event buses, and partner event buses.

This operation is run by AWS customers, not by SaaS partners.

", + "ListEventSources": "

You can use this to see all the partner event sources that have been shared with your AWS account. For more information about partner event sources, see CreateEventBus.

This operation is run by AWS customers, not by SaaS partners.

", + "ListPartnerEventSourceAccounts": "

An SaaS partner can use this operation to display the AWS account ID that a particular partner event source name is associated with.

This operation is used by SaaS partners, not by AWS customers.

", + "ListPartnerEventSources": "

An SaaS partner can use this operation to list all the partner event source names that they have created.

This operation is not used by AWS customers.

", + "ListRuleNamesByTarget": "

Lists the rules for the specified target. You can see which rules can invoke a specific target in your account.

", + "ListRules": "

Lists your EventBridge rules. You can either list all the rules or provide a prefix to match to the rule names.

ListRules doesn't list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

", + "ListTagsForResource": "

Displays the tags associated with an EventBridge resource. In EventBridge, rules can be tagged.

", + "ListTargetsByRule": "

Lists the targets assigned to the specified rule.

", + "PutEvents": "

Sends custom events to EventBridge so that they can be matched to rules. These events can be from your custom applications and services.

", + "PutPartnerEvents": "

This is used by SaaS partners to write events to a customer's partner event bus.

AWS customers do not use this operation. Instead, AWS customers can use PutEvents to write custom events from their own applications to an event bus.

", + "PutPermission": "

Running PutPermission permits the specified AWS account or AWS organization to put events to the specified event bus. Rules in your account are triggered by these events arriving to an event bus in your account.

For another account to send events to your account, that external account must have a rule with your account's event bus as a target.

To enable multiple AWS accounts to put events to an event bus, run PutPermission once for each of these accounts. Or, if all the accounts are members of the same AWS organization, you can run PutPermission once specifying Principal as \"*\" and specifying the AWS organization ID in Condition, to grant permissions to all accounts in that organization.

If you grant permissions using an organization, then accounts in that organization must specify a RoleArn with proper permissions when they use PutTarget to add your account's event bus as a target. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide.

The permission policy on an event bus can't exceed 10 KB in size.

", + "PutRule": "

Creates or updates the specified rule. Rules are enabled by default or based on value of the state. You can disable a rule using DisableRule.

A single rule watches for events from a single event bus. Events generated by AWS services go to your account's default event bus. Events generated by SaaS partner services or applications go to the matching partner event bus. If you have custom applications or services, you can specify whether their events go to your default event bus or a custom event bus that you have created. For more information, see CreateEventBus.

If you're updating an existing rule, the rule is replaced with what you specify in this PutRule command. If you omit arguments in PutRule, the old values for those arguments aren't kept. Instead, they're replaced with null values.

When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Allow a short period of time for changes to take effect.

A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule triggers on matching events as well as on a schedule.

When you initially create a rule, you can optionally assign one or more tags to the rule. Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only rules with certain tag values. To use the PutRule operation and assign tags, you must have both the events:PutRule and events:TagResource permissions.

If you are updating an existing rule, any tags you specify in the PutRule operation are ignored. To update the tags of an existing rule, use TagResource and UntagResource.

Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event that you want to match.

In EventBridge, you could create rules that lead to infinite loops, where a rule is fired repeatedly. For example, a rule might detect that ACLs have changed on an S3 bucket, and trigger software to change them to the desired state. If you don't write the rule carefully, the subsequent change to the ACLs fires the rule again, creating an infinite loop.

To prevent this, write the rules so that the triggered actions don't refire the same rule. For example, your rule could fire only if ACLs are found to be in a bad state, instead of after any change.

An infinite loop can quickly cause higher than expected charges. We recommend that you use budgeting, which alerts you when charges exceed your specified limit. For more information, see Managing Your Costs with Budgets.

", + "PutTargets": "

Adds the specified targets to the specified rule, or updates the targets if they're already associated with the rule.

Targets are the resources that are invoked when a rule is triggered.

You can configure the following as targets in EventBridge:

Creating rules with built-in targets is supported only on the AWS Management Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances API call, EC2 StopInstances API call, and EC2 TerminateInstances API call.

For some target types, PutTargets provides target-specific parameters. If the target is a Kinesis data stream, you can optionally specify which shard the event goes to by using the KinesisParameters argument. To invoke a command on multiple EC2 instances with one rule, you can use the RunCommandParameters field.

To be able to make API calls against the resources that you own, Amazon EventBridge needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies. For EC2 instances, Kinesis data streams, and AWS Step Functions state machines, EventBridge relies on IAM roles that you specify in the RoleARN argument in PutTargets. For more information, see Authentication and Access Control in the Amazon EventBridge User Guide.

If another AWS account is in the same Region and has granted you permission (using PutPermission), you can send events to that account. Set that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the Arn value when you run PutTargets. If your account sends events to another account, your account is charged for each sent event. Each event sent to another account is charged as a custom event. The account receiving the event isn't charged. For more information, see Amazon EventBridge Pricing.

If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide.

For more information about enabling cross-account events, see PutPermission.

Input, InputPath, and InputTransformer are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:

When you specify InputPath or InputTransformer, you must use JSON dot notation, not bracket notation.

When you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is nonzero in the response, and each entry in FailedEntries provides the ID of the failed target and the error code.

", + "RemovePermission": "

Revokes the permission of another AWS account to be able to put events to the specified event bus. Specify the account to revoke by the StatementId value that you associated with the account when you granted it permission with PutPermission. You can find the StatementId by using DescribeEventBus.

", + "RemoveTargets": "

Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked.

When you remove a target, when the associated rule triggers, removed targets might continue to be invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is non-zero in the response and each entry in FailedEntries provides the ID of the failed target and the error code.

", + "TagResource": "

Assigns one or more tags (key-value pairs) to the specified EventBridge resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. In EventBridge, rules can be tagged.

Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.

You can use the TagResource action with a rule that already has tags. If you specify a new tag key for the rule, this tag is appended to the list of tags associated with the rule. If you specify a tag key that is already associated with the rule, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a resource.

", + "TestEventPattern": "

Tests whether the specified event pattern matches the provided event.

Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event that you want to match.

", + "UntagResource": "

Removes one or more tags from the specified EventBridge resource. In EventBridge, rules can be tagged.

" + }, + "shapes": { + "AccountId": { + "base": null, + "refs": { + "CreatePartnerEventSourceRequest$Account": "

The AWS account ID of the customer who is permitted to create a matching partner event bus for this partner event source.

", + "DeletePartnerEventSourceRequest$Account": "

The AWS account ID of the AWS customer that the event source was created for.

", + "PartnerEventSourceAccount$Account": "

The AWS account ID that the partner event source was offered to.

" + } + }, + "Action": { + "base": null, + "refs": { + "PutPermissionRequest$Action": "

The action that you're enabling the other account to perform. Currently, this must be events:PutEvents.

" + } + }, + "ActivateEventSourceRequest": { + "base": null, + "refs": { + } + }, + "Arn": { + "base": null, + "refs": { + "EcsParameters$TaskDefinitionArn": "

The ARN of the task definition to use if the event target is an Amazon ECS task.

", + "ListTagsForResourceRequest$ResourceARN": "

The ARN of the rule for which you want to view tags.

", + "TagResourceRequest$ResourceARN": "

The ARN of the rule that you're adding tags to.

", + "UntagResourceRequest$ResourceARN": "

The ARN of the rule that you're removing tags from.

" + } + }, + "AssignPublicIp": { + "base": null, + "refs": { + "AwsVpcConfiguration$AssignPublicIp": "

Specifies whether the task's elastic network interface receives a public IP address. You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE.

" + } + }, + "AwsVpcConfiguration": { + "base": "

This structure specifies the VPC subnets and security groups for the task and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

", + "refs": { + "NetworkConfiguration$awsvpcConfiguration": "

Use this structure to specify the VPC subnets and security groups for the task and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

" + } + }, + "BatchArrayProperties": { + "base": "

The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an AWS Batch job.

", + "refs": { + "BatchParameters$ArrayProperties": "

The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an AWS Batch job.

" + } + }, + "BatchParameters": { + "base": "

The custom parameters to be used when the target is an AWS Batch job.

", + "refs": { + "Target$BatchParameters": "

If the event target is an AWS Batch job, this contains the job definition, job name, and other parameters. For more information, see Jobs in the AWS Batch User Guide.

" + } + }, + "BatchRetryStrategy": { + "base": "

The retry strategy to use for failed jobs if the target is an AWS Batch job. If you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

", + "refs": { + "BatchParameters$RetryStrategy": "

The retry strategy to use for failed jobs if the target is an AWS Batch job. The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

" + } + }, + "Boolean": { + "base": null, + "refs": { + "DeleteRuleRequest$Force": "

If this is a managed rule, created by an AWS service on your behalf, you must specify Force as True to delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

", + "RemoveTargetsRequest$Force": "

If this is a managed rule created by an AWS service on your behalf, you must specify Force as True to remove targets. This parameter is ignored for rules that aren't managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

", + "TestEventPatternResponse$Result": "

Indicates whether the event matches the event pattern.

" + } + }, + "ConcurrentModificationException": { + "base": "

There is concurrent modification on a resource.

", + "refs": { + } + }, + "Condition": { + "base": "

A JSON string that you can use to limit the event bus permissions that you're granting to only accounts that fulfill the condition. Currently, the only supported condition is membership in a certain AWS organization. The string must contain Type, Key, and Value fields. The Value field specifies the ID of the AWS organization. The following is an example value for Condition:

'{\"Type\" : \"StringEquals\", \"Key\": \"aws:PrincipalOrgID\", \"Value\": \"o-1234567890\"}'

", + "refs": { + "PutPermissionRequest$Condition": "

This parameter enables you to limit the permission to accounts that fulfill a certain condition, such as being a member of a certain AWS organization. For more information about AWS Organizations, see What Is AWS Organizations? in the AWS Organizations User Guide.

If you specify Condition with an AWS organization ID and specify \"*\" as the value for Principal, you grant permission to all the accounts in the named organization.

The Condition is a JSON string that must contain Type, Key, and Value fields.

" + } + }, + "CreateEventBusRequest": { + "base": null, + "refs": { + } + }, + "CreateEventBusResponse": { + "base": null, + "refs": { + } + }, + "CreatePartnerEventSourceRequest": { + "base": null, + "refs": { + } + }, + "CreatePartnerEventSourceResponse": { + "base": null, + "refs": { + } + }, + "DeactivateEventSourceRequest": { + "base": null, + "refs": { + } + }, + "DeleteEventBusRequest": { + "base": null, + "refs": { + } + }, + "DeletePartnerEventSourceRequest": { + "base": null, + "refs": { + } + }, + "DeleteRuleRequest": { + "base": null, + "refs": { + } + }, + "DescribeEventBusRequest": { + "base": null, + "refs": { + } + }, + "DescribeEventBusResponse": { + "base": null, + "refs": { + } + }, + "DescribeEventSourceRequest": { + "base": null, + "refs": { + } + }, + "DescribeEventSourceResponse": { + "base": null, + "refs": { + } + }, + "DescribePartnerEventSourceRequest": { + "base": null, + "refs": { + } + }, + "DescribePartnerEventSourceResponse": { + "base": null, + "refs": { + } + }, + "DescribeRuleRequest": { + "base": null, + "refs": { + } + }, + "DescribeRuleResponse": { + "base": null, + "refs": { + } + }, + "DisableRuleRequest": { + "base": null, + "refs": { + } + }, + "EcsParameters": { + "base": "

The custom parameters to be used when the target is an Amazon ECS task.

", + "refs": { + "Target$EcsParameters": "

Contains the Amazon ECS task definition and task count to be used if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.

" + } + }, + "EnableRuleRequest": { + "base": null, + "refs": { + } + }, + "ErrorCode": { + "base": null, + "refs": { + "PutEventsResultEntry$ErrorCode": "

The error code that indicates why the event submission failed.

", + "PutPartnerEventsResultEntry$ErrorCode": "

The error code that indicates why the event submission failed.

", + "PutTargetsResultEntry$ErrorCode": "

The error code that indicates why the target addition failed. If the value is ConcurrentModificationException, too many requests were made at the same time.

", + "RemoveTargetsResultEntry$ErrorCode": "

The error code that indicates why the target removal failed. If the value is ConcurrentModificationException, too many requests were made at the same time.

" + } + }, + "ErrorMessage": { + "base": null, + "refs": { + "PutEventsResultEntry$ErrorMessage": "

The error message that explains why the event submission failed.

", + "PutPartnerEventsResultEntry$ErrorMessage": "

The error message that explains why the event submission failed.

", + "PutTargetsResultEntry$ErrorMessage": "

The error message that explains why the target addition failed.

", + "RemoveTargetsResultEntry$ErrorMessage": "

The error message that explains why the target removal failed.

" + } + }, + "EventBus": { + "base": "

An event bus receives events from a source and routes them to rules associated with that event bus. Your account's default event bus receives rules from AWS services. A custom event bus can receive rules from AWS services as well as your custom applications and services. A partner event bus receives events from an event source created by an SaaS partner. These events come from the partners services or applications.

", + "refs": { + "EventBusList$member": null + } + }, + "EventBusList": { + "base": null, + "refs": { + "ListEventBusesResponse$EventBuses": "

This list of event buses.

" + } + }, + "EventBusName": { + "base": null, + "refs": { + "CreateEventBusRequest$Name": "

The name of the new event bus.

The names of custom event buses can't contain the / character. You can't use the name default for a custom event bus because this name is already used for your account's default event bus.

If this is a partner event bus, the name must exactly match the name of the partner event source that this event bus is matched to. This name will include the / character.

", + "DeleteEventBusRequest$Name": "

The name of the event bus to delete.

", + "DeleteRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "DescribeEventBusRequest$Name": "

The name of the event bus to show details for. If you omit this, the default event bus is displayed.

", + "DescribeRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "DescribeRuleResponse$EventBusName": "

The event bus associated with the rule.

", + "DisableRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "EnableRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "ListEventBusesRequest$NamePrefix": "

Specifying this limits the results to only those event buses with names that start with the specified prefix.

", + "ListRuleNamesByTargetRequest$EventBusName": "

Limits the results to show only the rules associated with the specified event bus.

", + "ListRulesRequest$EventBusName": "

Limits the results to show only the rules associated with the specified event bus.

", + "ListTargetsByRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "PutRuleRequest$EventBusName": "

The event bus to associate with this rule. If you omit this, the default event bus is used.

", + "PutTargetsRequest$EventBusName": "

The name of the event bus associated with the rule. If you omit this, the default event bus is used.

", + "RemoveTargetsRequest$EventBusName": "

The name of the event bus associated with the rule.

", + "Rule$EventBusName": "

The event bus associated with the rule.

" + } + }, + "EventId": { + "base": null, + "refs": { + "PutEventsResultEntry$EventId": "

The ID of the event.

", + "PutPartnerEventsResultEntry$EventId": "

The ID of the event.

" + } + }, + "EventPattern": { + "base": null, + "refs": { + "DescribeRuleResponse$EventPattern": "

The event pattern. For more information, see Event Patterns in the Amazon EventBridge User Guide.

", + "PutRuleRequest$EventPattern": "

The event pattern. For more information, see Event Patterns in the Amazon EventBridge User Guide.

", + "Rule$EventPattern": "

The event pattern of the rule. For more information, see Event Patterns in the Amazon EventBridge User Guide.

", + "TestEventPatternRequest$EventPattern": "

The event pattern. For more information, see Event Patterns in the Amazon EventBridge User Guide.

" + } + }, + "EventResource": { + "base": null, + "refs": { + "EventResourceList$member": null + } + }, + "EventResourceList": { + "base": null, + "refs": { + "PutEventsRequestEntry$Resources": "

AWS resources, identified by Amazon Resource Name (ARN), that the event primarily concerns. Any number, including zero, can be present.

", + "PutPartnerEventsRequestEntry$Resources": "

AWS resources, identified by Amazon Resource Name (ARN), that the event primarily concerns. Any number, including zero, can be present.

" + } + }, + "EventSource": { + "base": "

A partner event source is created by an SaaS partner. If a customer creates a partner event bus that matches this event source, that AWS account can receive events from the partner's applications or services.

", + "refs": { + "EventSourceList$member": null + } + }, + "EventSourceList": { + "base": null, + "refs": { + "ListEventSourcesResponse$EventSources": "

The list of event sources.

" + } + }, + "EventSourceName": { + "base": null, + "refs": { + "ActivateEventSourceRequest$Name": "

The name of the partner event source to activate.

", + "CreateEventBusRequest$EventSourceName": "

If you're creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.

", + "CreatePartnerEventSourceRequest$Name": "

The name of the partner event source. This name must be unique and must be in the format partner_name/event_namespace/event_name . The AWS account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.

", + "DeactivateEventSourceRequest$Name": "

The name of the partner event source to deactivate.

", + "DeletePartnerEventSourceRequest$Name": "

The name of the event source to delete.

", + "DescribeEventSourceRequest$Name": "

The name of the partner event source to display the details of.

", + "DescribePartnerEventSourceRequest$Name": "

The name of the event source to display.

", + "ListPartnerEventSourceAccountsRequest$EventSourceName": "

The name of the partner event source to display account information about.

" + } + }, + "EventSourceNamePrefix": { + "base": null, + "refs": { + "ListEventSourcesRequest$NamePrefix": "

Specifying this limits the results to only those partner event sources with names that start with the specified prefix.

" + } + }, + "EventSourceState": { + "base": null, + "refs": { + "DescribeEventSourceResponse$State": "

The state of the event source. If it's ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it's PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it's DELETED, you have created a matching event bus, but the event source has since been deleted.

", + "EventSource$State": "

The state of the event source. If it's ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it's PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it's DELETED, you have created a matching event bus, but the event source has since been deleted.

", + "PartnerEventSourceAccount$State": "

The state of the event source. If it's ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it's PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it's DELETED, you have created a matching event bus, but the event source has since been deleted.

" + } + }, + "EventTime": { + "base": null, + "refs": { + "PutEventsRequestEntry$Time": "

The timestamp of the event, per RFC3339. If no timestamp is provided, the timestamp of the PutEvents call is used.

", + "PutPartnerEventsRequestEntry$Time": "

The date and time of the event.

" + } + }, + "InputTransformer": { + "base": "

Contains the parameters needed for you to provide custom input to a target based on one or more pieces of data extracted from the event.

", + "refs": { + "Target$InputTransformer": "

Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.

" + } + }, + "InputTransformerPathKey": { + "base": null, + "refs": { + "TransformerPaths$key": null + } + }, + "Integer": { + "base": null, + "refs": { + "BatchArrayProperties$Size": "

The size of the array, if this is an array batch job. Valid values are integers between 2 and 10,000.

", + "BatchRetryStrategy$Attempts": "

The number of times to attempt to retry, if the job fails. Valid values are 1–10.

", + "PutEventsResponse$FailedEntryCount": "

The number of failed entries.

", + "PutPartnerEventsResponse$FailedEntryCount": "

The number of events from this operation that couldn't be written to the partner event bus.

", + "PutTargetsResponse$FailedEntryCount": "

The number of failed entries.

", + "RemoveTargetsResponse$FailedEntryCount": "

The number of failed entries.

" + } + }, + "InternalException": { + "base": "

This exception occurs due to unexpected causes.

", + "refs": { + } + }, + "InvalidEventPatternException": { + "base": "

The event pattern isn't valid.

", + "refs": { + } + }, + "InvalidStateException": { + "base": "

The specified state isn't a valid state for an event source.

", + "refs": { + } + }, + "KinesisParameters": { + "base": "

This object enables you to specify a JSON path to extract from the event and use as the partition key for the Amazon Kinesis data stream so that you can control the shard that the event goes to. If you don't include this parameter, the default is to use the eventId as the partition key.

", + "refs": { + "Target$KinesisParameters": "

The custom parameter that you can use to control the shard assignment when the target is a Kinesis data stream. If you don't include this parameter, the default is to use the eventId as the partition key.

" + } + }, + "LaunchType": { + "base": null, + "refs": { + "EcsParameters$LaunchType": "

Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide.

" + } + }, + "LimitExceededException": { + "base": "

You tried to create more resources than is allowed.

", + "refs": { + } + }, + "LimitMax100": { + "base": null, + "refs": { + "ListEventBusesRequest$Limit": "

Specifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", + "ListEventSourcesRequest$Limit": "

Specifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourceAccountsRequest$Limit": "

Specifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourcesRequest$Limit": "

pecifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", + "ListRuleNamesByTargetRequest$Limit": "

The maximum number of results to return.

", + "ListRulesRequest$Limit": "

The maximum number of results to return.

", + "ListTargetsByRuleRequest$Limit": "

The maximum number of results to return.

" + } + }, + "LimitMin1": { + "base": null, + "refs": { + "EcsParameters$TaskCount": "

The number of tasks to create based on TaskDefinition. The default is 1.

" + } + }, + "ListEventBusesRequest": { + "base": null, + "refs": { + } + }, + "ListEventBusesResponse": { + "base": null, + "refs": { + } + }, + "ListEventSourcesRequest": { + "base": null, + "refs": { + } + }, + "ListEventSourcesResponse": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourceAccountsRequest": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourceAccountsResponse": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourcesRequest": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourcesResponse": { + "base": null, + "refs": { + } + }, + "ListRuleNamesByTargetRequest": { + "base": null, + "refs": { + } + }, + "ListRuleNamesByTargetResponse": { + "base": null, + "refs": { + } + }, + "ListRulesRequest": { + "base": null, + "refs": { + } + }, + "ListRulesResponse": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, + "ListTargetsByRuleRequest": { + "base": null, + "refs": { + } + }, + "ListTargetsByRuleResponse": { + "base": null, + "refs": { + } + }, + "ManagedBy": { + "base": null, + "refs": { + "DescribeRuleResponse$ManagedBy": "

If this is a managed rule, created by an AWS service on your behalf, this field displays the principal name of the AWS service that created the rule.

", + "Rule$ManagedBy": "

If an AWS service created the rule on behalf of your account, this field displays the principal name of the service that created the rule.

" + } + }, + "ManagedRuleException": { + "base": "

An AWS service created this rule on behalf of your account. That service manages it. If you see this error in response to DeleteRule or RemoveTargets, you can use the Force parameter in those calls to delete the rule or remove targets from the rule. You can't modify these managed rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, or UntagResource.

", + "refs": { + } + }, + "MessageGroupId": { + "base": null, + "refs": { + "SqsParameters$MessageGroupId": "

The FIFO message group ID to use as the target.

" + } + }, + "NetworkConfiguration": { + "base": "

This structure specifies the network configuration for an ECS task.

", + "refs": { + "EcsParameters$NetworkConfiguration": "

Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the VPC subnets and security groups associated with the task and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks.

If you specify NetworkConfiguration when the target ECS task doesn't use the awsvpc network mode, the task fails.

" + } + }, + "NextToken": { + "base": null, + "refs": { + "ListEventBusesRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", + "ListEventBusesResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", + "ListEventSourcesRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", + "ListEventSourcesResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourceAccountsRequest$NextToken": "

The token returned by a previous call to this operation. Specifying this retrieves the next set of results.

", + "ListPartnerEventSourceAccountsResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourcesRequest$NextToken": "

The token returned by a previous call to this operation. Specifying this retrieves the next set of results.

", + "ListPartnerEventSourcesResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", + "ListRuleNamesByTargetRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", + "ListRuleNamesByTargetResponse$NextToken": "

Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

", + "ListRulesRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", + "ListRulesResponse$NextToken": "

Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

", + "ListTargetsByRuleRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", + "ListTargetsByRuleResponse$NextToken": "

Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

" + } + }, + "NonPartnerEventBusName": { + "base": null, + "refs": { + "PutEventsRequestEntry$EventBusName": "

The event bus that will receive the event. Only the rules that are associated with this event bus can match the event.

", + "PutPermissionRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "RemovePermissionRequest$EventBusName": "

The name of the event bus to revoke permissions for. If you omit this, the default event bus is used.

" + } + }, + "PartnerEventSource": { + "base": "

A partner event source is created by an SaaS partner. If a customer creates a partner event bus that matches this event source, that AWS account can receive events from the partner's applications or services.

", + "refs": { + "PartnerEventSourceList$member": null + } + }, + "PartnerEventSourceAccount": { + "base": "

The AWS account that a partner event source has been offered to.

", + "refs": { + "PartnerEventSourceAccountList$member": null + } + }, + "PartnerEventSourceAccountList": { + "base": null, + "refs": { + "ListPartnerEventSourceAccountsResponse$PartnerEventSourceAccounts": "

The list of partner event sources returned by the operation.

" + } + }, + "PartnerEventSourceList": { + "base": null, + "refs": { + "ListPartnerEventSourcesResponse$PartnerEventSources": "

The list of partner event sources returned by the operation.

" + } + }, + "PartnerEventSourceNamePrefix": { + "base": null, + "refs": { + "ListPartnerEventSourcesRequest$NamePrefix": "

If you specify this, the results are limited to only those partner event sources that start with the string you specify.

" + } + }, + "PolicyLengthExceededException": { + "base": "

The event bus policy is too long. For more information, see the limits.

", + "refs": { + } + }, + "Principal": { + "base": null, + "refs": { + "PutPermissionRequest$Principal": "

The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify \"*\" to permit any account to put events to your default event bus.

If you specify \"*\" without specifying Condition, avoid creating rules that might match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an account field with a specific account ID to receive events from. Rules with an account field don't match any events sent from other accounts.

" + } + }, + "PutEventsRequest": { + "base": null, + "refs": { + } + }, + "PutEventsRequestEntry": { + "base": "

Represents an event to be submitted.

", + "refs": { + "PutEventsRequestEntryList$member": null + } + }, + "PutEventsRequestEntryList": { + "base": null, + "refs": { + "PutEventsRequest$Entries": "

The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.

" + } + }, + "PutEventsResponse": { + "base": null, + "refs": { + } + }, + "PutEventsResultEntry": { + "base": "

Represents an event that failed to be submitted.

", + "refs": { + "PutEventsResultEntryList$member": null + } + }, + "PutEventsResultEntryList": { + "base": null, + "refs": { + "PutEventsResponse$Entries": "

The successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry.

" + } + }, + "PutPartnerEventsRequest": { + "base": null, + "refs": { + } + }, + "PutPartnerEventsRequestEntry": { + "base": "

The details about an event generated by an SaaS partner.

", + "refs": { + "PutPartnerEventsRequestEntryList$member": null + } + }, + "PutPartnerEventsRequestEntryList": { + "base": null, + "refs": { + "PutPartnerEventsRequest$Entries": "

The list of events to write to the event bus.

" + } + }, + "PutPartnerEventsResponse": { + "base": null, + "refs": { + } + }, + "PutPartnerEventsResultEntry": { + "base": "

Represents an event that a partner tried to generate but failed.

", + "refs": { + "PutPartnerEventsResultEntryList$member": null + } + }, + "PutPartnerEventsResultEntryList": { + "base": null, + "refs": { + "PutPartnerEventsResponse$Entries": "

The list of events from this operation that were successfully written to the partner event bus.

" + } + }, + "PutPermissionRequest": { + "base": null, + "refs": { + } + }, + "PutRuleRequest": { + "base": null, + "refs": { + } + }, + "PutRuleResponse": { + "base": null, + "refs": { + } + }, + "PutTargetsRequest": { + "base": null, + "refs": { + } + }, + "PutTargetsResponse": { + "base": null, + "refs": { + } + }, + "PutTargetsResultEntry": { + "base": "

Represents a target that failed to be added to a rule.

", + "refs": { + "PutTargetsResultEntryList$member": null + } + }, + "PutTargetsResultEntryList": { + "base": null, + "refs": { + "PutTargetsResponse$FailedEntries": "

The failed target entries.

" + } + }, + "RemovePermissionRequest": { + "base": null, + "refs": { + } + }, + "RemoveTargetsRequest": { + "base": null, + "refs": { + } + }, + "RemoveTargetsResponse": { + "base": null, + "refs": { + } + }, + "RemoveTargetsResultEntry": { + "base": "

Represents a target that failed to be removed from a rule.

", + "refs": { + "RemoveTargetsResultEntryList$member": null + } + }, + "RemoveTargetsResultEntryList": { + "base": null, + "refs": { + "RemoveTargetsResponse$FailedEntries": "

The failed target entries.

" + } + }, + "ResourceAlreadyExistsException": { + "base": "

The resource that you're trying to create already exists.

", + "refs": { + } + }, + "ResourceNotFoundException": { + "base": "

An entity that you specified doesn't exist.

", + "refs": { + } + }, + "RoleArn": { + "base": null, + "refs": { + "DescribeRuleResponse$RoleArn": "

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

", + "PutRuleRequest$RoleArn": "

The Amazon Resource Name (ARN) of the IAM role associated with the rule.

", + "Rule$RoleArn": "

The Amazon Resource Name (ARN) of the role that is used for target invocation.

", + "Target$RoleArn": "

The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.

" + } + }, + "Rule": { + "base": "

Contains information about a rule in Amazon EventBridge.

", + "refs": { + "RuleResponseList$member": null + } + }, + "RuleArn": { + "base": null, + "refs": { + "DescribeRuleResponse$Arn": "

The Amazon Resource Name (ARN) of the rule.

", + "PutRuleResponse$RuleArn": "

The Amazon Resource Name (ARN) of the rule.

", + "Rule$Arn": "

The Amazon Resource Name (ARN) of the rule.

" + } + }, + "RuleDescription": { + "base": null, + "refs": { + "DescribeRuleResponse$Description": "

The description of the rule.

", + "PutRuleRequest$Description": "

A description of the rule.

", + "Rule$Description": "

The description of the rule.

" + } + }, + "RuleName": { + "base": null, + "refs": { + "DeleteRuleRequest$Name": "

The name of the rule.

", + "DescribeRuleRequest$Name": "

The name of the rule.

", + "DescribeRuleResponse$Name": "

The name of the rule.

", + "DisableRuleRequest$Name": "

The name of the rule.

", + "EnableRuleRequest$Name": "

The name of the rule.

", + "ListRulesRequest$NamePrefix": "

The prefix matching the rule name.

", + "ListTargetsByRuleRequest$Rule": "

The name of the rule.

", + "PutRuleRequest$Name": "

The name of the rule that you're creating or updating.

", + "PutTargetsRequest$Rule": "

The name of the rule.

", + "RemoveTargetsRequest$Rule": "

The name of the rule.

", + "Rule$Name": "

The name of the rule.

", + "RuleNameList$member": null + } + }, + "RuleNameList": { + "base": null, + "refs": { + "ListRuleNamesByTargetResponse$RuleNames": "

The names of the rules that can invoke the given target.

" + } + }, + "RuleResponseList": { + "base": null, + "refs": { + "ListRulesResponse$Rules": "

The rules that match the specified criteria.

" + } + }, + "RuleState": { + "base": null, + "refs": { + "DescribeRuleResponse$State": "

Specifies whether the rule is enabled or disabled.

", + "PutRuleRequest$State": "

Indicates whether the rule is enabled or disabled.

", + "Rule$State": "

The state of the rule.

" + } + }, + "RunCommandParameters": { + "base": "

This parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command.

", + "refs": { + "Target$RunCommandParameters": "

Parameters used when you are using the rule to invoke Amazon EC2 Run Command.

" + } + }, + "RunCommandTarget": { + "base": "

Information about the EC2 instances that are to be sent the command, specified as key-value pairs. Each RunCommandTarget block can include only one key, but this key can specify multiple values.

", + "refs": { + "RunCommandTargets$member": null + } + }, + "RunCommandTargetKey": { + "base": null, + "refs": { + "RunCommandTarget$Key": "

Can be either tag: tag-key or InstanceIds.

" + } + }, + "RunCommandTargetValue": { + "base": null, + "refs": { + "RunCommandTargetValues$member": null + } + }, + "RunCommandTargetValues": { + "base": null, + "refs": { + "RunCommandTarget$Values": "

If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, Values is a list of Amazon EC2 instance IDs.

" + } + }, + "RunCommandTargets": { + "base": null, + "refs": { + "RunCommandParameters$RunCommandTargets": "

Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.

" + } + }, + "ScheduleExpression": { + "base": null, + "refs": { + "DescribeRuleResponse$ScheduleExpression": "

The scheduling expression: for example, \"cron(0 20 * * ? *)\" or \"rate(5 minutes)\".

", + "PutRuleRequest$ScheduleExpression": "

The scheduling expression: for example, \"cron(0 20 * * ? *)\" or \"rate(5 minutes)\".

", + "Rule$ScheduleExpression": "

The scheduling expression: for example, \"cron(0 20 * * ? *)\" or \"rate(5 minutes)\".

" + } + }, + "SqsParameters": { + "base": "

This structure includes the custom parameter to be used when the target is an SQS FIFO queue.

", + "refs": { + "Target$SqsParameters": "

Contains the message group ID to use when the target is a FIFO queue.

If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.

" + } + }, + "StatementId": { + "base": null, + "refs": { + "PutPermissionRequest$StatementId": "

An identifier string for the external account that you're granting permissions to. If you later want to revoke the permission for this external account, specify this StatementId when you run RemovePermission.

", + "RemovePermissionRequest$StatementId": "

The statement ID corresponding to the account that is no longer allowed to put events to the default event bus.

" + } + }, + "String": { + "base": null, + "refs": { + "BatchParameters$JobDefinition": "

The ARN or name of the job definition to use if the event target is an AWS Batch job. This job definition must already exist.

", + "BatchParameters$JobName": "

The name to use for this execution of the job, if the target is an AWS Batch job.

", + "Condition$Type": "

The type of condition. Currently, the only supported value is StringEquals.

", + "Condition$Key": "

The key for the condition. Currently, the only supported key is aws:PrincipalOrgID.

", + "Condition$Value": "

The value for the key. Currently, this must be the ID of the organization.

", + "CreateEventBusResponse$EventBusArn": "

The ARN of the new event bus.

", + "CreatePartnerEventSourceResponse$EventSourceArn": "

The ARN of the partner event source.

", + "DescribeEventBusResponse$Name": "

The name of the event bus. Currently, this is always default.

", + "DescribeEventBusResponse$Arn": "

The Amazon Resource Name (ARN) of the account permitted to write events to the current account.

", + "DescribeEventBusResponse$Policy": "

The policy that enables the external account to send events to your account.

", + "DescribeEventSourceResponse$Arn": "

The ARN of the partner event source.

", + "DescribeEventSourceResponse$CreatedBy": "

The name of the SaaS partner that created the event source.

", + "DescribeEventSourceResponse$Name": "

The name of the partner event source.

", + "DescribePartnerEventSourceResponse$Arn": "

The ARN of the event source.

", + "DescribePartnerEventSourceResponse$Name": "

The name of the event source.

", + "EcsParameters$PlatformVersion": "

Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0.

This structure is used only if LaunchType is FARGATE. For more information about valid platform versions, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.

", + "EcsParameters$Group": "

Specifies an ECS task group for the task. The maximum length is 255 characters.

", + "EventBus$Name": "

The name of the event bus.

", + "EventBus$Arn": "

The ARN of the event bus.

", + "EventBus$Policy": "

The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.

", + "EventSource$Arn": "

The ARN of the event source.

", + "EventSource$CreatedBy": "

The name of the partner that created the event source.

", + "EventSource$Name": "

The name of the event source.

", + "PartnerEventSource$Arn": "

The ARN of the partner event source.

", + "PartnerEventSource$Name": "

The name of the partner event source.

", + "PutEventsRequestEntry$Source": "

The source of the event. This field is required.

", + "PutEventsRequestEntry$DetailType": "

Free-form string used to decide which fields to expect in the event detail.

", + "PutEventsRequestEntry$Detail": "

A valid JSON string. There is no other schema imposed. The JSON string can contain fields and nested subobjects.

", + "PutPartnerEventsRequestEntry$Source": "

The event source that is generating the evntry.

", + "PutPartnerEventsRequestEntry$DetailType": "

A free-form string used to decide which fields to expect in the event detail.

", + "PutPartnerEventsRequestEntry$Detail": "

A valid JSON string. There is no other schema imposed. The JSON string can contain fields and nested subobjects.

", + "StringList$member": null, + "TestEventPatternRequest$Event": "

The event, in JSON format, to test against the event pattern.

" + } + }, + "StringList": { + "base": null, + "refs": { + "AwsVpcConfiguration$Subnets": "

Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

", + "AwsVpcConfiguration$SecurityGroups": "

Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you don't specify a security group, the default security group for the VPC is used.

" + } + }, + "Tag": { + "base": "

A key-value pair associated with an AWS resource. In EventBridge, rules support tagging.

", + "refs": { + "TagList$member": null + } + }, + "TagKey": { + "base": null, + "refs": { + "Tag$Key": "

A string that you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

", + "TagKeyList$member": null + } + }, + "TagKeyList": { + "base": null, + "refs": { + "UntagResourceRequest$TagKeys": "

The list of tag keys to remove from the resource.

" + } + }, + "TagList": { + "base": null, + "refs": { + "ListTagsForResourceResponse$Tags": "

The list of tag keys and values associated with the rule that you specified.

", + "PutRuleRequest$Tags": "

The list of key-value pairs to associate with the rule.

", + "TagResourceRequest$Tags": "

The list of key-value pairs to associate with the rule.

" + } + }, + "TagResourceRequest": { + "base": null, + "refs": { + } + }, + "TagResourceResponse": { + "base": null, + "refs": { + } + }, + "TagValue": { + "base": null, + "refs": { + "Tag$Value": "

The value for the specified tag key.

" + } + }, + "Target": { + "base": "

Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be set as a target, see PutTargets.

If you're setting the event bus of another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide.

", + "refs": { + "TargetList$member": null + } + }, + "TargetArn": { + "base": null, + "refs": { + "ListRuleNamesByTargetRequest$TargetArn": "

The Amazon Resource Name (ARN) of the target resource.

", + "Target$Arn": "

The Amazon Resource Name (ARN) of the target.

" + } + }, + "TargetId": { + "base": null, + "refs": { + "PutTargetsResultEntry$TargetId": "

The ID of the target.

", + "RemoveTargetsResultEntry$TargetId": "

The ID of the target.

", + "Target$Id": "

The ID of the target.

", + "TargetIdList$member": null + } + }, + "TargetIdList": { + "base": null, + "refs": { + "RemoveTargetsRequest$Ids": "

The IDs of the targets to remove from the rule.

" + } + }, + "TargetInput": { + "base": null, + "refs": { + "Target$Input": "

Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see The JavaScript Object Notation (JSON) Data Interchange Format.

" + } + }, + "TargetInputPath": { + "base": null, + "refs": { + "Target$InputPath": "

The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see JSONPath.

", + "TransformerPaths$value": null + } + }, + "TargetList": { + "base": null, + "refs": { + "ListTargetsByRuleResponse$Targets": "

The targets assigned to the rule.

", + "PutTargetsRequest$Targets": "

The targets to update or add to the rule.

" + } + }, + "TargetPartitionKeyPath": { + "base": null, + "refs": { + "KinesisParameters$PartitionKeyPath": "

The JSON path to be extracted from the event and used as the partition key. For more information, see Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer Guide.

" + } + }, + "TestEventPatternRequest": { + "base": null, + "refs": { + } + }, + "TestEventPatternResponse": { + "base": null, + "refs": { + } + }, + "Timestamp": { + "base": null, + "refs": { + "DescribeEventSourceResponse$CreationTime": "

The date and time that the event source was created.

", + "DescribeEventSourceResponse$ExpirationTime": "

The date and time that the event source will expire if you don't create a matching event bus.

", + "EventSource$CreationTime": "

The date and time when the event source was created.

", + "EventSource$ExpirationTime": "

The date and time when the event source will expire if the AWS account doesn't create a matching event bus for it.

", + "PartnerEventSourceAccount$CreationTime": "

The date and time when the event source was created.

", + "PartnerEventSourceAccount$ExpirationTime": "

The date and time when the event source will expire if the AWS account doesn't create a matching event bus for it.

" + } + }, + "TransformerInput": { + "base": null, + "refs": { + "InputTransformer$InputTemplate": "

Input template where you specify placeholders that will be filled with the values of the keys from InputPathsMap to customize the data sent to the target. Enclose each InputPathsMaps value in brackets: <value>. The InputTemplate must be valid JSON.

If InputTemplate is a JSON object (surrounded by curly braces), the following restrictions apply:

The following example shows the syntax for using InputPathsMap and InputTemplate.

\"InputTransformer\":

{

\"InputPathsMap\": {\"instance\": \"$.detail.instance\",\"status\": \"$.detail.status\"},

\"InputTemplate\": \"<instance> is in state <status>\"

}

To have the InputTemplate include quote marks within a JSON string, escape each quote marks with a slash, as in the following example:

\"InputTransformer\":

{

\"InputPathsMap\": {\"instance\": \"$.detail.instance\",\"status\": \"$.detail.status\"},

\"InputTemplate\": \"<instance> is in state \\\"<status>\\\"\"

}

" + } + }, + "TransformerPaths": { + "base": null, + "refs": { + "InputTransformer$InputPathsMap": "

Map of JSON paths to be extracted from the event. You can then insert these in the template in InputTemplate to produce the output to be sent to the target.

InputPathsMap is an array key-value pairs, where each value is a valid JSON path. You can have as many as 10 key-value pairs. You must use JSON dot notation, not bracket notation.

The keys can't start with \"AWS\".

" + } + }, + "UntagResourceRequest": { + "base": null, + "refs": { + } + }, + "UntagResourceResponse": { + "base": null, + "refs": { + } + } + } +} diff --git a/models/apis/eventbridge/2015-10-07/examples-1.json b/models/apis/eventbridge/2015-10-07/examples-1.json new file mode 100644 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/eventbridge/2015-10-07/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/eventbridge/2015-10-07/paginators-1.json b/models/apis/eventbridge/2015-10-07/paginators-1.json new file mode 100644 index 00000000000..5677bd8e4a2 --- /dev/null +++ b/models/apis/eventbridge/2015-10-07/paginators-1.json @@ -0,0 +1,4 @@ +{ + "pagination": { + } +} diff --git a/models/apis/eventbridge/2015-10-07/smoke.json b/models/apis/eventbridge/2015-10-07/smoke.json new file mode 100644 index 00000000000..689a9e45240 --- /dev/null +++ b/models/apis/eventbridge/2015-10-07/smoke.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "defaultRegion": "us-west-2", + "testCases": [ + { + "operationName": "ListRules", + "input": {}, + "errorExpectedFromService": false + }, + { + "operationName": "DescribeRule", + "input": { + "Name": "fake-rule" + }, + "errorExpectedFromService": true + } + ] +} diff --git a/models/apis/events/2015-10-07/api-2.json b/models/apis/events/2015-10-07/api-2.json index 6648bd4ffbb..5d86b257ae3 100644 --- a/models/apis/events/2015-10-07/api-2.json +++ b/models/apis/events/2015-10-07/api-2.json @@ -12,6 +12,86 @@ "uid":"events-2015-10-07" }, "operations":{ + "ActivateEventSource":{ + "name":"ActivateEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ActivateEventSourceRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidStateException"}, + {"shape":"InternalException"} + ] + }, + "CreateEventBus":{ + "name":"CreateEventBus", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateEventBusRequest"}, + "output":{"shape":"CreateEventBusResponse"}, + "errors":[ + {"shape":"ResourceAlreadyExistsException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidStateException"}, + {"shape":"InternalException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"LimitExceededException"} + ] + }, + "CreatePartnerEventSource":{ + "name":"CreatePartnerEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreatePartnerEventSourceRequest"}, + "output":{"shape":"CreatePartnerEventSourceResponse"}, + "errors":[ + {"shape":"ResourceAlreadyExistsException"}, + {"shape":"InternalException"}, + {"shape":"ConcurrentModificationException"}, + {"shape":"LimitExceededException"} + ] + }, + "DeactivateEventSource":{ + "name":"DeactivateEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeactivateEventSourceRequest"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidStateException"}, + {"shape":"InternalException"} + ] + }, + "DeleteEventBus":{ + "name":"DeleteEventBus", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteEventBusRequest"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "DeletePartnerEventSource":{ + "name":"DeletePartnerEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeletePartnerEventSourceRequest"}, + "errors":[ + {"shape":"InternalException"} + ] + }, "DeleteRule":{ "name":"DeleteRule", "http":{ @@ -22,7 +102,8 @@ "errors":[ {"shape":"ConcurrentModificationException"}, {"shape":"ManagedRuleException"}, - {"shape":"InternalException"} + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} ] }, "DescribeEventBus":{ @@ -38,6 +119,32 @@ {"shape":"InternalException"} ] }, + "DescribeEventSource":{ + "name":"DescribeEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeEventSourceRequest"}, + "output":{"shape":"DescribeEventSourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "DescribePartnerEventSource":{ + "name":"DescribePartnerEventSource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribePartnerEventSourceRequest"}, + "output":{"shape":"DescribePartnerEventSourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, "DescribeRule":{ "name":"DescribeRule", "http":{ @@ -79,6 +186,55 @@ {"shape":"InternalException"} ] }, + "ListEventBuses":{ + "name":"ListEventBuses", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListEventBusesRequest"}, + "output":{"shape":"ListEventBusesResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "ListEventSources":{ + "name":"ListEventSources", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListEventSourcesRequest"}, + "output":{"shape":"ListEventSourcesResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, + "ListPartnerEventSourceAccounts":{ + "name":"ListPartnerEventSourceAccounts", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListPartnerEventSourceAccountsRequest"}, + "output":{"shape":"ListPartnerEventSourceAccountsResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalException"} + ] + }, + "ListPartnerEventSources":{ + "name":"ListPartnerEventSources", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListPartnerEventSourcesRequest"}, + "output":{"shape":"ListPartnerEventSourcesResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, "ListRuleNamesByTarget":{ "name":"ListRuleNamesByTarget", "http":{ @@ -88,7 +244,8 @@ "input":{"shape":"ListRuleNamesByTargetRequest"}, "output":{"shape":"ListRuleNamesByTargetResponse"}, "errors":[ - {"shape":"InternalException"} + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} ] }, "ListRules":{ @@ -100,7 +257,8 @@ "input":{"shape":"ListRulesRequest"}, "output":{"shape":"ListRulesResponse"}, "errors":[ - {"shape":"InternalException"} + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} ] }, "ListTagsForResource":{ @@ -141,6 +299,18 @@ {"shape":"InternalException"} ] }, + "PutPartnerEvents":{ + "name":"PutPartnerEvents", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutPartnerEventsRequest"}, + "output":{"shape":"PutPartnerEventsResponse"}, + "errors":[ + {"shape":"InternalException"} + ] + }, "PutPermission":{ "name":"PutPermission", "http":{ @@ -168,7 +338,8 @@ {"shape":"LimitExceededException"}, {"shape":"ConcurrentModificationException"}, {"shape":"ManagedRuleException"}, - {"shape":"InternalException"} + {"shape":"InternalException"}, + {"shape":"ResourceNotFoundException"} ] }, "PutTargets":{ @@ -260,12 +431,25 @@ } }, "shapes":{ + "AccountId":{ + "type":"string", + "max":12, + "min":12, + "pattern":"\\d{12}" + }, "Action":{ "type":"string", "max":64, "min":1, "pattern":"events:[a-zA-Z]+" }, + "ActivateEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, "Arn":{ "type":"string", "max":1600, @@ -332,17 +516,75 @@ "Value":{"shape":"String"} } }, + "CreateEventBusRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventBusName"}, + "EventSourceName":{"shape":"EventSourceName"} + } + }, + "CreateEventBusResponse":{ + "type":"structure", + "members":{ + "EventBusArn":{"shape":"String"} + } + }, + "CreatePartnerEventSourceRequest":{ + "type":"structure", + "required":[ + "Name", + "Account" + ], + "members":{ + "Name":{"shape":"EventSourceName"}, + "Account":{"shape":"AccountId"} + } + }, + "CreatePartnerEventSourceResponse":{ + "type":"structure", + "members":{ + "EventSourceArn":{"shape":"String"} + } + }, + "DeactivateEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, + "DeleteEventBusRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventBusName"} + } + }, + "DeletePartnerEventSourceRequest":{ + "type":"structure", + "required":[ + "Name", + "Account" + ], + "members":{ + "Name":{"shape":"EventSourceName"}, + "Account":{"shape":"AccountId"} + } + }, "DeleteRuleRequest":{ "type":"structure", "required":["Name"], "members":{ "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, "Force":{"shape":"Boolean"} } }, "DescribeEventBusRequest":{ "type":"structure", "members":{ + "Name":{"shape":"EventBusName"} } }, "DescribeEventBusResponse":{ @@ -353,11 +595,44 @@ "Policy":{"shape":"String"} } }, + "DescribeEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, + "DescribeEventSourceResponse":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "CreatedBy":{"shape":"String"}, + "CreationTime":{"shape":"Timestamp"}, + "ExpirationTime":{"shape":"Timestamp"}, + "Name":{"shape":"String"}, + "State":{"shape":"EventSourceState"} + } + }, + "DescribePartnerEventSourceRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"EventSourceName"} + } + }, + "DescribePartnerEventSourceResponse":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "Name":{"shape":"String"} + } + }, "DescribeRuleRequest":{ "type":"structure", "required":["Name"], "members":{ - "Name":{"shape":"RuleName"} + "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"} } }, "DescribeRuleResponse":{ @@ -370,14 +645,16 @@ "State":{"shape":"RuleState"}, "Description":{"shape":"RuleDescription"}, "RoleArn":{"shape":"RoleArn"}, - "ManagedBy":{"shape":"ManagedBy"} + "ManagedBy":{"shape":"ManagedBy"}, + "EventBusName":{"shape":"EventBusName"} } }, "DisableRuleRequest":{ "type":"structure", "required":["Name"], "members":{ - "Name":{"shape":"RuleName"} + "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"} } }, "EcsParameters":{ @@ -396,11 +673,30 @@ "type":"structure", "required":["Name"], "members":{ - "Name":{"shape":"RuleName"} + "Name":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"} } }, "ErrorCode":{"type":"string"}, "ErrorMessage":{"type":"string"}, + "EventBus":{ + "type":"structure", + "members":{ + "Name":{"shape":"String"}, + "Arn":{"shape":"String"}, + "Policy":{"shape":"String"} + } + }, + "EventBusList":{ + "type":"list", + "member":{"shape":"EventBus"} + }, + "EventBusName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[/\\.\\-_A-Za-z0-9]+" + }, "EventId":{"type":"string"}, "EventPattern":{"type":"string"}, "EventResource":{"type":"string"}, @@ -408,6 +704,41 @@ "type":"list", "member":{"shape":"EventResource"} }, + "EventSource":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "CreatedBy":{"shape":"String"}, + "CreationTime":{"shape":"Timestamp"}, + "ExpirationTime":{"shape":"Timestamp"}, + "Name":{"shape":"String"}, + "State":{"shape":"EventSourceState"} + } + }, + "EventSourceList":{ + "type":"list", + "member":{"shape":"EventSource"} + }, + "EventSourceName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"aws\\.partner(/[\\.\\-_A-Za-z0-9]+){2,}" + }, + "EventSourceNamePrefix":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[/\\.\\-_A-Za-z0-9]+" + }, + "EventSourceState":{ + "type":"string", + "enum":[ + "PENDING", + "ACTIVE", + "DELETED" + ] + }, "EventTime":{"type":"timestamp"}, "InputTransformer":{ "type":"structure", @@ -437,6 +768,12 @@ }, "exception":true }, + "InvalidStateException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, "KinesisParameters":{ "type":"structure", "required":["PartitionKeyPath"], @@ -466,11 +803,74 @@ "type":"integer", "min":1 }, + "ListEventBusesRequest":{ + "type":"structure", + "members":{ + "NamePrefix":{"shape":"EventBusName"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListEventBusesResponse":{ + "type":"structure", + "members":{ + "EventBuses":{"shape":"EventBusList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListEventSourcesRequest":{ + "type":"structure", + "members":{ + "NamePrefix":{"shape":"EventSourceNamePrefix"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListEventSourcesResponse":{ + "type":"structure", + "members":{ + "EventSources":{"shape":"EventSourceList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListPartnerEventSourceAccountsRequest":{ + "type":"structure", + "required":["EventSourceName"], + "members":{ + "EventSourceName":{"shape":"EventSourceName"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListPartnerEventSourceAccountsResponse":{ + "type":"structure", + "members":{ + "PartnerEventSourceAccounts":{"shape":"PartnerEventSourceAccountList"}, + "NextToken":{"shape":"NextToken"} + } + }, + "ListPartnerEventSourcesRequest":{ + "type":"structure", + "required":["NamePrefix"], + "members":{ + "NamePrefix":{"shape":"PartnerEventSourceNamePrefix"}, + "NextToken":{"shape":"NextToken"}, + "Limit":{"shape":"LimitMax100"} + } + }, + "ListPartnerEventSourcesResponse":{ + "type":"structure", + "members":{ + "PartnerEventSources":{"shape":"PartnerEventSourceList"}, + "NextToken":{"shape":"NextToken"} + } + }, "ListRuleNamesByTargetRequest":{ "type":"structure", "required":["TargetArn"], "members":{ "TargetArn":{"shape":"TargetArn"}, + "EventBusName":{"shape":"EventBusName"}, "NextToken":{"shape":"NextToken"}, "Limit":{"shape":"LimitMax100"} } @@ -486,6 +886,7 @@ "type":"structure", "members":{ "NamePrefix":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, "NextToken":{"shape":"NextToken"}, "Limit":{"shape":"LimitMax100"} } @@ -515,6 +916,7 @@ "required":["Rule"], "members":{ "Rule":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, "NextToken":{"shape":"NextToken"}, "Limit":{"shape":"LimitMax100"} } @@ -549,6 +951,42 @@ "max":2048, "min":1 }, + "NonPartnerEventBusName":{ + "type":"string", + "max":256, + "min":1, + "pattern":"[\\.\\-_A-Za-z0-9]+" + }, + "PartnerEventSource":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "Name":{"shape":"String"} + } + }, + "PartnerEventSourceAccount":{ + "type":"structure", + "members":{ + "Account":{"shape":"AccountId"}, + "CreationTime":{"shape":"Timestamp"}, + "ExpirationTime":{"shape":"Timestamp"}, + "State":{"shape":"EventSourceState"} + } + }, + "PartnerEventSourceAccountList":{ + "type":"list", + "member":{"shape":"PartnerEventSourceAccount"} + }, + "PartnerEventSourceList":{ + "type":"list", + "member":{"shape":"PartnerEventSource"} + }, + "PartnerEventSourceNamePrefix":{ + "type":"string", + "max":256, + "min":1, + "pattern":"aws\\.partner/[\\.\\-_A-Za-z0-9]+/[/\\.\\-_A-Za-z0-9]*" + }, "PolicyLengthExceededException":{ "type":"structure", "members":{ @@ -575,7 +1013,8 @@ "Source":{"shape":"String"}, "Resources":{"shape":"EventResourceList"}, "DetailType":{"shape":"String"}, - "Detail":{"shape":"String"} + "Detail":{"shape":"String"}, + "EventBusName":{"shape":"NonPartnerEventBusName"} } }, "PutEventsRequestEntryList":{ @@ -603,6 +1042,48 @@ "type":"list", "member":{"shape":"PutEventsResultEntry"} }, + "PutPartnerEventsRequest":{ + "type":"structure", + "required":["Entries"], + "members":{ + "Entries":{"shape":"PutPartnerEventsRequestEntryList"} + } + }, + "PutPartnerEventsRequestEntry":{ + "type":"structure", + "members":{ + "Time":{"shape":"EventTime"}, + "Source":{"shape":"String"}, + "Resources":{"shape":"EventResourceList"}, + "DetailType":{"shape":"String"}, + "Detail":{"shape":"String"} + } + }, + "PutPartnerEventsRequestEntryList":{ + "type":"list", + "member":{"shape":"PutPartnerEventsRequestEntry"}, + "max":20, + "min":1 + }, + "PutPartnerEventsResponse":{ + "type":"structure", + "members":{ + "FailedEntryCount":{"shape":"Integer"}, + "Entries":{"shape":"PutPartnerEventsResultEntryList"} + } + }, + "PutPartnerEventsResultEntry":{ + "type":"structure", + "members":{ + "EventId":{"shape":"EventId"}, + "ErrorCode":{"shape":"ErrorCode"}, + "ErrorMessage":{"shape":"ErrorMessage"} + } + }, + "PutPartnerEventsResultEntryList":{ + "type":"list", + "member":{"shape":"PutPartnerEventsResultEntry"} + }, "PutPermissionRequest":{ "type":"structure", "required":[ @@ -611,6 +1092,7 @@ "StatementId" ], "members":{ + "EventBusName":{"shape":"NonPartnerEventBusName"}, "Action":{"shape":"Action"}, "Principal":{"shape":"Principal"}, "StatementId":{"shape":"StatementId"}, @@ -627,7 +1109,8 @@ "State":{"shape":"RuleState"}, "Description":{"shape":"RuleDescription"}, "RoleArn":{"shape":"RoleArn"}, - "Tags":{"shape":"TagList"} + "Tags":{"shape":"TagList"}, + "EventBusName":{"shape":"EventBusName"} } }, "PutRuleResponse":{ @@ -644,6 +1127,7 @@ ], "members":{ "Rule":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, "Targets":{"shape":"TargetList"} } }, @@ -670,7 +1154,8 @@ "type":"structure", "required":["StatementId"], "members":{ - "StatementId":{"shape":"StatementId"} + "StatementId":{"shape":"StatementId"}, + "EventBusName":{"shape":"NonPartnerEventBusName"} } }, "RemoveTargetsRequest":{ @@ -681,6 +1166,7 @@ ], "members":{ "Rule":{"shape":"RuleName"}, + "EventBusName":{"shape":"EventBusName"}, "Ids":{"shape":"TargetIdList"}, "Force":{"shape":"Boolean"} } @@ -704,6 +1190,12 @@ "type":"list", "member":{"shape":"RemoveTargetsResultEntry"} }, + "ResourceAlreadyExistsException":{ + "type":"structure", + "members":{ + }, + "exception":true + }, "ResourceNotFoundException":{ "type":"structure", "members":{ @@ -725,7 +1217,8 @@ "Description":{"shape":"RuleDescription"}, "ScheduleExpression":{"shape":"ScheduleExpression"}, "RoleArn":{"shape":"RoleArn"}, - "ManagedBy":{"shape":"ManagedBy"} + "ManagedBy":{"shape":"ManagedBy"}, + "EventBusName":{"shape":"EventBusName"} } }, "RuleArn":{ @@ -937,6 +1430,7 @@ "Result":{"shape":"Boolean"} } }, + "Timestamp":{"type":"timestamp"}, "TransformerInput":{ "type":"string", "max":8192, diff --git a/models/apis/events/2015-10-07/docs-2.json b/models/apis/events/2015-10-07/docs-2.json index fe4d38e11f8..8377d34eab4 100644 --- a/models/apis/events/2015-10-07/docs-2.json +++ b/models/apis/events/2015-10-07/docs-2.json @@ -1,40 +1,66 @@ { "version": "2.0", - "service": "

Amazon CloudWatch Events helps you to respond to state changes in your AWS resources. When your resources change state, they automatically send events into an event stream. You can create rules that match selected events in the stream and route them to targets to take action. You can also use rules to take action on a predetermined schedule. For example, you can configure rules to:

For more information about the features of Amazon CloudWatch Events, see the Amazon CloudWatch Events User Guide.

", + "service": "

Amazon EventBridge helps you to respond to state changes in your AWS resources. When your resources change state, they automatically send events into an event stream. You can create rules that match selected events in the stream and route them to targets to take action. You can also use rules to take action on a predetermined schedule. For example, you can configure rules to:

For more information about the features of Amazon EventBridge, see the Amazon EventBridge User Guide.

", "operations": { - "DeleteRule": "

Deletes the specified rule.

Before you can delete the rule, you must remove all targets, using RemoveTargets.

When you delete a rule, incoming events might continue to match to the deleted rule. Allow a short period of time for changes to take effect.

Managed rules are rules created and managed by another AWS service on your behalf. These rules are created by those other AWS services to support functionality in those services. You can delete these rules using the Force option, but you should do so only if you are sure the other service is not still using that rule.

", - "DescribeEventBus": "

Displays the external AWS accounts that are permitted to write events to your account using your account's event bus, and the associated policy. To enable your account to receive events from other accounts, use PutPermission.

", - "DescribeRule": "

Describes the specified rule.

DescribeRule does not list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

", - "DisableRule": "

Disables the specified rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule expression.

When you disable a rule, incoming events might continue to match to the disabled rule. Allow a short period of time for changes to take effect.

", - "EnableRule": "

Enables the specified rule. If the rule does not exist, the operation fails.

When you enable a rule, incoming events might not immediately start matching to a newly enabled rule. Allow a short period of time for changes to take effect.

", - "ListRuleNamesByTarget": "

Lists the rules for the specified target. You can see which of the rules in Amazon CloudWatch Events can invoke a specific target in your account.

", - "ListRules": "

Lists your Amazon CloudWatch Events rules. You can either list all the rules or you can provide a prefix to match to the rule names.

ListRules does not list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

", - "ListTagsForResource": "

Displays the tags associated with a CloudWatch Events resource. In CloudWatch Events, rules can be tagged.

", + "ActivateEventSource": "

Activates a partner event source that has been deactivated. Once activated, your matching event bus will start receiving events from the event source.

This operation is performed by AWS customers, not by SaaS partners.

", + "CreateEventBus": "

Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your own custom applications and services, or it can be a partner event bus which can be matched to a partner event source.

This operation is used by AWS customers, not by SaaS partners.

", + "CreatePartnerEventSource": "

Called by an SaaS partner to create a partner event source.

This operation is not used by AWS customers.

Each partner event source can be used by one AWS account to create a matching partner event bus in that AWS account. A SaaS partner must create one partner event source for each AWS account that wants to receive those event types.

A partner event source creates events based on resources in the SaaS partner's service or application.

An AWS account that creates a partner event bus that matches the partner event source can use that event bus to receive events from the partner, and then process them using AWS Events rules and targets.

Partner event source names follow this format:

aws.partner/partner_name/event_namespace/event_name

", + "DeactivateEventSource": "

An AWS customer uses this operation to temporarily stop receiving events from the specified partner event source. The matching event bus isn't deleted.

When you deactivate a partner event source, the source goes into PENDING state. If it remains in PENDING state for more than two weeks, it's deleted.

To activate a deactivated partner event source, use ActivateEventSource.

", + "DeleteEventBus": "

Deletes the specified custom event bus or partner event bus. All rules associated with this event bus are also deleted. You can't delete your account's default event bus.

This operation is performed by AWS customers, not by SaaS partners.

", + "DeletePartnerEventSource": "

This operation is used by SaaS partners to delete a partner event source. AWS customers don't use this operation.

When you delete an event source, the status of the corresponding partner event bus in the AWS customer account becomes DELETED.

", + "DeleteRule": "

Deletes the specified rule.

Before you can delete the rule, you must remove all targets, using RemoveTargets.

When you delete a rule, incoming events might continue to match to the deleted rule. Allow a short period of time for changes to take effect.

Managed rules are rules created and managed by another AWS service on your behalf. These rules are created by those other AWS services to support functionality in those services. You can delete these rules using the Force option, but you should do so only if you're sure that the other service isn't still using that rule.

", + "DescribeEventBus": "

Displays details about an event bus in your account. This can include the external AWS accounts that are permitted to write events to your default event bus, and the associated policy. For custom event buses and partner event buses, it displays the name, ARN, policy, state, and creation time.

To enable your account to receive events from other accounts on its default event bus, use PutPermission.

For more information about partner event buses, see CreateEventBus.

", + "DescribeEventSource": "

This operation lists details about a partner event source that is shared with your account.

This operation is run by AWS customers, not by SaaS partners.

", + "DescribePartnerEventSource": "

An SaaS partner can use this operation to list details about a partner event source that they have created.

AWS customers do not use this operation. Instead, AWS customers can use DescribeEventSource to see details about a partner event source that is shared with them.

", + "DescribeRule": "

Describes the specified rule.

DescribeRule doesn't list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

", + "DisableRule": "

Disables the specified rule. A disabled rule won't match any events and won't self-trigger if it has a schedule expression.

When you disable a rule, incoming events might continue to match to the disabled rule. Allow a short period of time for changes to take effect.

", + "EnableRule": "

Enables the specified rule. If the rule doesn't exist, the operation fails.

When you enable a rule, incoming events might not immediately start matching to a newly enabled rule. Allow a short period of time for changes to take effect.

", + "ListEventBuses": "

Lists all the event buses in your account, including the default event bus, custom event buses, and partner event buses.

This operation is run by AWS customers, not by SaaS partners.

", + "ListEventSources": "

You can use this to see all the partner event sources that have been shared with your AWS account. For more information about partner event sources, see CreateEventBus.

This operation is run by AWS customers, not by SaaS partners.

", + "ListPartnerEventSourceAccounts": "

An SaaS partner can use this operation to display the AWS account ID that a particular partner event source name is associated with.

This operation is used by SaaS partners, not by AWS customers.

", + "ListPartnerEventSources": "

An SaaS partner can use this operation to list all the partner event source names that they have created.

This operation is not used by AWS customers.

", + "ListRuleNamesByTarget": "

Lists the rules for the specified target. You can see which rules can invoke a specific target in your account.

", + "ListRules": "

Lists your EventBridge rules. You can either list all the rules or provide a prefix to match to the rule names.

ListRules doesn't list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

", + "ListTagsForResource": "

Displays the tags associated with an EventBridge resource. In EventBridge, rules can be tagged.

", "ListTargetsByRule": "

Lists the targets assigned to the specified rule.

", - "PutEvents": "

Sends custom events to Amazon CloudWatch Events so that they can be matched to rules.

", - "PutPermission": "

Running PutPermission permits the specified AWS account or AWS organization to put events to your account's default event bus. CloudWatch Events rules in your account are triggered by these events arriving to your default event bus.

For another account to send events to your account, that external account must have a CloudWatch Events rule with your account's default event bus as a target.

To enable multiple AWS accounts to put events to your default event bus, run PutPermission once for each of these accounts. Or, if all the accounts are members of the same AWS organization, you can run PutPermission once specifying Principal as \"*\" and specifying the AWS organization ID in Condition, to grant permissions to all accounts in that organization.

If you grant permissions using an organization, then accounts in that organization must specify a RoleArn with proper permissions when they use PutTarget to add your account's event bus as a target. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon CloudWatch Events User Guide.

The permission policy on the default event bus cannot exceed 10 KB in size.

", - "PutRule": "

Creates or updates the specified rule. Rules are enabled by default, or based on value of the state. You can disable a rule using DisableRule.

If you are updating an existing rule, the rule is replaced with what you specify in this PutRule command. If you omit arguments in PutRule, the old values for those arguments are not kept. Instead, they are replaced with null values.

When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Allow a short period of time for changes to take effect.

A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule triggers on matching events as well as on a schedule.

When you initially create a rule, you can optionally assign one or more tags to the rule. Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only rules with certain tag values. To use the PutRule operation and assign tags, you must have both the events:PutRule and events:TagResource permissions.

If you are updating an existing rule, any tags you specify in the PutRule operation are ignored. To update the tags of an existing rule, use TagResource and UntagResource.

Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.

In CloudWatch Events, it is possible to create rules that lead to infinite loops, where a rule is fired repeatedly. For example, a rule might detect that ACLs have changed on an S3 bucket, and trigger software to change them to the desired state. If the rule is not written carefully, the subsequent change to the ACLs fires the rule again, creating an infinite loop.

To prevent this, write the rules so that the triggered actions do not re-fire the same rule. For example, your rule could fire only if ACLs are found to be in a bad state, instead of after any change.

An infinite loop can quickly cause higher than expected charges. We recommend that you use budgeting, which alerts you when charges exceed your specified limit. For more information, see Managing Your Costs with Budgets.

", - "PutTargets": "

Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.

Targets are the resources that are invoked when a rule is triggered.

You can configure the following as targets for CloudWatch Events:

Creating rules with built-in targets is supported only in the AWS Management Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances API call, EC2 StopInstances API call, and EC2 TerminateInstances API call.

For some target types, PutTargets provides target-specific parameters. If the target is a Kinesis data stream, you can optionally specify which shard the event goes to by using the KinesisParameters argument. To invoke a command on multiple EC2 instances with one rule, you can use the RunCommandParameters field.

To be able to make API calls against the resources that you own, Amazon CloudWatch Events needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, CloudWatch Events relies on resource-based policies. For EC2 instances, Kinesis data streams, and AWS Step Functions state machines, CloudWatch Events relies on IAM roles that you specify in the RoleARN argument in PutTargets. For more information, see Authentication and Access Control in the Amazon CloudWatch Events User Guide.

If another AWS account is in the same region and has granted you permission (using PutPermission), you can send events to that account. Set that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the Arn value when you run PutTargets. If your account sends events to another account, your account is charged for each sent event. Each event sent to another account is charged as a custom event. The account receiving the event is not charged. For more information, see Amazon CloudWatch Pricing.

If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon CloudWatch Events User Guide.

For more information about enabling cross-account events, see PutPermission.

Input, InputPath, and InputTransformer are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:

When you specify InputPath or InputTransformer, you must use JSON dot notation, not bracket notation.

When you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is non-zero in the response and each entry in FailedEntries provides the ID of the failed target and the error code.

", - "RemovePermission": "

Revokes the permission of another AWS account to be able to put events to your default event bus. Specify the account to revoke by the StatementId value that you associated with the account when you granted it permission with PutPermission. You can find the StatementId by using DescribeEventBus.

", + "PutEvents": "

Sends custom events to EventBridge so that they can be matched to rules. These events can be from your custom applications and services.

", + "PutPartnerEvents": "

This is used by SaaS partners to write events to a customer's partner event bus.

AWS customers do not use this operation. Instead, AWS customers can use PutEvents to write custom events from their own applications to an event bus.

", + "PutPermission": "

Running PutPermission permits the specified AWS account or AWS organization to put events to the specified event bus. Rules in your account are triggered by these events arriving to an event bus in your account.

For another account to send events to your account, that external account must have a rule with your account's event bus as a target.

To enable multiple AWS accounts to put events to an event bus, run PutPermission once for each of these accounts. Or, if all the accounts are members of the same AWS organization, you can run PutPermission once specifying Principal as \"*\" and specifying the AWS organization ID in Condition, to grant permissions to all accounts in that organization.

If you grant permissions using an organization, then accounts in that organization must specify a RoleArn with proper permissions when they use PutTarget to add your account's event bus as a target. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide.

The permission policy on an event bus can't exceed 10 KB in size.

", + "PutRule": "

Creates or updates the specified rule. Rules are enabled by default or based on value of the state. You can disable a rule using DisableRule.

A single rule watches for events from a single event bus. Events generated by AWS services go to your account's default event bus. Events generated by SaaS partner services or applications go to the matching partner event bus. If you have custom applications or services, you can specify whether their events go to your default event bus or a custom event bus that you have created. For more information, see CreateEventBus.

If you're updating an existing rule, the rule is replaced with what you specify in this PutRule command. If you omit arguments in PutRule, the old values for those arguments aren't kept. Instead, they're replaced with null values.

When you create or update a rule, incoming events might not immediately start matching to new or updated rules. Allow a short period of time for changes to take effect.

A rule must contain at least an EventPattern or ScheduleExpression. Rules with EventPatterns are triggered when a matching event is observed. Rules with ScheduleExpressions self-trigger based on the given schedule. A rule can have both an EventPattern and a ScheduleExpression, in which case the rule triggers on matching events as well as on a schedule.

When you initially create a rule, you can optionally assign one or more tags to the rule. Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only rules with certain tag values. To use the PutRule operation and assign tags, you must have both the events:PutRule and events:TagResource permissions.

If you are updating an existing rule, any tags you specify in the PutRule operation are ignored. To update the tags of an existing rule, use TagResource and UntagResource.

Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event that you want to match.

In EventBridge, you could create rules that lead to infinite loops, where a rule is fired repeatedly. For example, a rule might detect that ACLs have changed on an S3 bucket, and trigger software to change them to the desired state. If you don't write the rule carefully, the subsequent change to the ACLs fires the rule again, creating an infinite loop.

To prevent this, write the rules so that the triggered actions don't refire the same rule. For example, your rule could fire only if ACLs are found to be in a bad state, instead of after any change.

An infinite loop can quickly cause higher than expected charges. We recommend that you use budgeting, which alerts you when charges exceed your specified limit. For more information, see Managing Your Costs with Budgets.

", + "PutTargets": "

Adds the specified targets to the specified rule, or updates the targets if they're already associated with the rule.

Targets are the resources that are invoked when a rule is triggered.

You can configure the following as targets in EventBridge:

Creating rules with built-in targets is supported only on the AWS Management Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances API call, EC2 StopInstances API call, and EC2 TerminateInstances API call.

For some target types, PutTargets provides target-specific parameters. If the target is a Kinesis data stream, you can optionally specify which shard the event goes to by using the KinesisParameters argument. To invoke a command on multiple EC2 instances with one rule, you can use the RunCommandParameters field.

To be able to make API calls against the resources that you own, Amazon EventBridge needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies. For EC2 instances, Kinesis data streams, and AWS Step Functions state machines, EventBridge relies on IAM roles that you specify in the RoleARN argument in PutTargets. For more information, see Authentication and Access Control in the Amazon EventBridge User Guide.

If another AWS account is in the same Region and has granted you permission (using PutPermission), you can send events to that account. Set that account's event bus as a target of the rules in your account. To send the matched events to the other account, specify that account's event bus as the Arn value when you run PutTargets. If your account sends events to another account, your account is charged for each sent event. Each event sent to another account is charged as a custom event. The account receiving the event isn't charged. For more information, see Amazon EventBridge Pricing.

If you're setting an event bus in another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide.

For more information about enabling cross-account events, see PutPermission.

Input, InputPath, and InputTransformer are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:

When you specify InputPath or InputTransformer, you must use JSON dot notation, not bracket notation.

When you add targets to a rule and the associated rule triggers soon after, new or updated targets might not be immediately invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is nonzero in the response, and each entry in FailedEntries provides the ID of the failed target and the error code.

", + "RemovePermission": "

Revokes the permission of another AWS account to be able to put events to the specified event bus. Specify the account to revoke by the StatementId value that you associated with the account when you granted it permission with PutPermission. You can find the StatementId by using DescribeEventBus.

", "RemoveTargets": "

Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked.

When you remove a target, when the associated rule triggers, removed targets might continue to be invoked. Allow a short period of time for changes to take effect.

This action can partially fail if too many requests are made at the same time. If that happens, FailedEntryCount is non-zero in the response and each entry in FailedEntries provides the ID of the failed target and the error code.

", - "TagResource": "

Assigns one or more tags (key-value pairs) to the specified CloudWatch Events resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. In CloudWatch Events, rules can be tagged.

Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.

You can use the TagResource action with a rule that already has tags. If you specify a new tag key for the rule, this tag is appended to the list of tags associated with the rule. If you specify a tag key that is already associated with the rule, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a resource.

", - "TestEventPattern": "

Tests whether the specified event pattern matches the provided event.

Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event you want to match.

", - "UntagResource": "

Removes one or more tags from the specified CloudWatch Events resource. In CloudWatch Events, rules can be tagged.

" + "TagResource": "

Assigns one or more tags (key-value pairs) to the specified EventBridge resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. In EventBridge, rules can be tagged.

Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.

You can use the TagResource action with a rule that already has tags. If you specify a new tag key for the rule, this tag is appended to the list of tags associated with the rule. If you specify a tag key that is already associated with the rule, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a resource.

", + "TestEventPattern": "

Tests whether the specified event pattern matches the provided event.

Most services in AWS treat : or / as the same character in Amazon Resource Names (ARNs). However, EventBridge uses an exact match in event patterns and rules. Be sure to use the correct ARN characters when creating event patterns so that they match the ARN syntax in the event that you want to match.

", + "UntagResource": "

Removes one or more tags from the specified EventBridge resource. In EventBridge, rules can be tagged.

" }, "shapes": { + "AccountId": { + "base": null, + "refs": { + "CreatePartnerEventSourceRequest$Account": "

The AWS account ID of the customer who is permitted to create a matching partner event bus for this partner event source.

", + "DeletePartnerEventSourceRequest$Account": "

The AWS account ID of the AWS customer that the event source was created for.

", + "PartnerEventSourceAccount$Account": "

The AWS account ID that the partner event source was offered to.

" + } + }, "Action": { "base": null, "refs": { - "PutPermissionRequest$Action": "

The action that you are enabling the other account to perform. Currently, this must be events:PutEvents.

" + "PutPermissionRequest$Action": "

The action that you're enabling the other account to perform. Currently, this must be events:PutEvents.

" + } + }, + "ActivateEventSourceRequest": { + "base": null, + "refs": { } }, "Arn": { "base": null, "refs": { "EcsParameters$TaskDefinitionArn": "

The ARN of the task definition to use if the event target is an Amazon ECS task.

", - "ListTagsForResourceRequest$ResourceARN": "

The ARN of the CloudWatch Events rule for which you want to view tags.

", - "TagResourceRequest$ResourceARN": "

The ARN of the CloudWatch Events rule that you're adding tags to.

", - "UntagResourceRequest$ResourceARN": "

The ARN of the CloudWatch Events rule from which you are removing tags.

" + "ListTagsForResourceRequest$ResourceARN": "

The ARN of the rule for which you want to view tags.

", + "TagResourceRequest$ResourceARN": "

The ARN of the rule that you're adding tags to.

", + "UntagResourceRequest$ResourceARN": "

The ARN of the rule that you're removing tags from.

" } }, "AssignPublicIp": { @@ -44,9 +70,9 @@ } }, "AwsVpcConfiguration": { - "base": "

This structure specifies the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

", + "base": "

This structure specifies the VPC subnets and security groups for the task and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

", "refs": { - "NetworkConfiguration$awsvpcConfiguration": "

Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

" + "NetworkConfiguration$awsvpcConfiguration": "

Use this structure to specify the VPC subnets and security groups for the task and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

" } }, "BatchArrayProperties": { @@ -62,28 +88,63 @@ } }, "BatchRetryStrategy": { - "base": "

The retry strategy to use for failed jobs, if the target is an AWS Batch job. If you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

", + "base": "

The retry strategy to use for failed jobs if the target is an AWS Batch job. If you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

", "refs": { - "BatchParameters$RetryStrategy": "

The retry strategy to use for failed jobs, if the target is an AWS Batch job. The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

" + "BatchParameters$RetryStrategy": "

The retry strategy to use for failed jobs if the target is an AWS Batch job. The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

" } }, "Boolean": { "base": null, "refs": { "DeleteRuleRequest$Force": "

If this is a managed rule, created by an AWS service on your behalf, you must specify Force as True to delete the rule. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

", - "RemoveTargetsRequest$Force": "

If this is a managed rule, created by an AWS service on your behalf, you must specify Force as True to remove targets. This parameter is ignored for rules that are not managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

", + "RemoveTargetsRequest$Force": "

If this is a managed rule created by an AWS service on your behalf, you must specify Force as True to remove targets. This parameter is ignored for rules that aren't managed rules. You can check whether a rule is a managed rule by using DescribeRule or ListRules and checking the ManagedBy field of the response.

", "TestEventPatternResponse$Result": "

Indicates whether the event matches the event pattern.

" } }, "ConcurrentModificationException": { - "base": "

There is concurrent modification on a rule or target.

", + "base": "

There is concurrent modification on a resource.

", "refs": { } }, "Condition": { - "base": "

A JSON string which you can use to limit the event bus permissions you are granting to only accounts that fulfill the condition. Currently, the only supported condition is membership in a certain AWS organization. The string must contain Type, Key, and Value fields. The Value field specifies the ID of the AWS organization. Following is an example value for Condition:

'{\"Type\" : \"StringEquals\", \"Key\": \"aws:PrincipalOrgID\", \"Value\": \"o-1234567890\"}'

", + "base": "

A JSON string that you can use to limit the event bus permissions that you're granting to only accounts that fulfill the condition. Currently, the only supported condition is membership in a certain AWS organization. The string must contain Type, Key, and Value fields. The Value field specifies the ID of the AWS organization. The following is an example value for Condition:

'{\"Type\" : \"StringEquals\", \"Key\": \"aws:PrincipalOrgID\", \"Value\": \"o-1234567890\"}'

", + "refs": { + "PutPermissionRequest$Condition": "

This parameter enables you to limit the permission to accounts that fulfill a certain condition, such as being a member of a certain AWS organization. For more information about AWS Organizations, see What Is AWS Organizations? in the AWS Organizations User Guide.

If you specify Condition with an AWS organization ID and specify \"*\" as the value for Principal, you grant permission to all the accounts in the named organization.

The Condition is a JSON string that must contain Type, Key, and Value fields.

" + } + }, + "CreateEventBusRequest": { + "base": null, + "refs": { + } + }, + "CreateEventBusResponse": { + "base": null, + "refs": { + } + }, + "CreatePartnerEventSourceRequest": { + "base": null, + "refs": { + } + }, + "CreatePartnerEventSourceResponse": { + "base": null, + "refs": { + } + }, + "DeactivateEventSourceRequest": { + "base": null, + "refs": { + } + }, + "DeleteEventBusRequest": { + "base": null, + "refs": { + } + }, + "DeletePartnerEventSourceRequest": { + "base": null, "refs": { - "PutPermissionRequest$Condition": "

This parameter enables you to limit the permission to accounts that fulfill a certain condition, such as being a member of a certain AWS organization. For more information about AWS Organizations, see What Is AWS Organizations in the AWS Organizations User Guide.

If you specify Condition with an AWS organization ID, and specify \"*\" as the value for Principal, you grant permission to all the accounts in the named organization.

The Condition is a JSON string which must contain Type, Key, and Value fields.

" } }, "DeleteRuleRequest": { @@ -101,6 +162,26 @@ "refs": { } }, + "DescribeEventSourceRequest": { + "base": null, + "refs": { + } + }, + "DescribeEventSourceResponse": { + "base": null, + "refs": { + } + }, + "DescribePartnerEventSourceRequest": { + "base": null, + "refs": { + } + }, + "DescribePartnerEventSourceResponse": { + "base": null, + "refs": { + } + }, "DescribeRuleRequest": { "base": null, "refs": { @@ -119,7 +200,7 @@ "EcsParameters": { "base": "

The custom parameters to be used when the target is an Amazon ECS task.

", "refs": { - "Target$EcsParameters": "

Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.

" + "Target$EcsParameters": "

Contains the Amazon ECS task definition and task count to be used if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see Task Definitions in the Amazon EC2 Container Service Developer Guide.

" } }, "EnableRuleRequest": { @@ -131,6 +212,7 @@ "base": null, "refs": { "PutEventsResultEntry$ErrorCode": "

The error code that indicates why the event submission failed.

", + "PutPartnerEventsResultEntry$ErrorCode": "

The error code that indicates why the event submission failed.

", "PutTargetsResultEntry$ErrorCode": "

The error code that indicates why the target addition failed. If the value is ConcurrentModificationException, too many requests were made at the same time.

", "RemoveTargetsResultEntry$ErrorCode": "

The error code that indicates why the target removal failed. If the value is ConcurrentModificationException, too many requests were made at the same time.

" } @@ -139,23 +221,58 @@ "base": null, "refs": { "PutEventsResultEntry$ErrorMessage": "

The error message that explains why the event submission failed.

", + "PutPartnerEventsResultEntry$ErrorMessage": "

The error message that explains why the event submission failed.

", "PutTargetsResultEntry$ErrorMessage": "

The error message that explains why the target addition failed.

", "RemoveTargetsResultEntry$ErrorMessage": "

The error message that explains why the target removal failed.

" } }, + "EventBus": { + "base": "

An event bus receives events from a source and routes them to rules associated with that event bus. Your account's default event bus receives rules from AWS services. A custom event bus can receive rules from AWS services as well as your custom applications and services. A partner event bus receives events from an event source created by an SaaS partner. These events come from the partners services or applications.

", + "refs": { + "EventBusList$member": null + } + }, + "EventBusList": { + "base": null, + "refs": { + "ListEventBusesResponse$EventBuses": "

This list of event buses.

" + } + }, + "EventBusName": { + "base": null, + "refs": { + "CreateEventBusRequest$Name": "

The name of the new event bus.

The names of custom event buses can't contain the / character. You can't use the name default for a custom event bus because this name is already used for your account's default event bus.

If this is a partner event bus, the name must exactly match the name of the partner event source that this event bus is matched to. This name will include the / character.

", + "DeleteEventBusRequest$Name": "

The name of the event bus to delete.

", + "DeleteRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "DescribeEventBusRequest$Name": "

The name of the event bus to show details for. If you omit this, the default event bus is displayed.

", + "DescribeRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "DescribeRuleResponse$EventBusName": "

The event bus associated with the rule.

", + "DisableRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "EnableRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "ListEventBusesRequest$NamePrefix": "

Specifying this limits the results to only those event buses with names that start with the specified prefix.

", + "ListRuleNamesByTargetRequest$EventBusName": "

Limits the results to show only the rules associated with the specified event bus.

", + "ListRulesRequest$EventBusName": "

Limits the results to show only the rules associated with the specified event bus.

", + "ListTargetsByRuleRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "PutRuleRequest$EventBusName": "

The event bus to associate with this rule. If you omit this, the default event bus is used.

", + "PutTargetsRequest$EventBusName": "

The name of the event bus associated with the rule. If you omit this, the default event bus is used.

", + "RemoveTargetsRequest$EventBusName": "

The name of the event bus associated with the rule.

", + "Rule$EventBusName": "

The event bus associated with the rule.

" + } + }, "EventId": { "base": null, "refs": { - "PutEventsResultEntry$EventId": "

The ID of the event.

" + "PutEventsResultEntry$EventId": "

The ID of the event.

", + "PutPartnerEventsResultEntry$EventId": "

The ID of the event.

" } }, "EventPattern": { "base": null, "refs": { - "DescribeRuleResponse$EventPattern": "

The event pattern. For more information, see Events and Event Patterns in the Amazon CloudWatch Events User Guide.

", - "PutRuleRequest$EventPattern": "

The event pattern. For more information, see Events and Event Patterns in the Amazon CloudWatch Events User Guide.

", - "Rule$EventPattern": "

The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon CloudWatch Events User Guide.

", - "TestEventPatternRequest$EventPattern": "

The event pattern. For more information, see Events and Event Patterns in the Amazon CloudWatch Events User Guide.

" + "DescribeRuleResponse$EventPattern": "

The event pattern. For more information, see Event Patterns in the Amazon EventBridge User Guide.

", + "PutRuleRequest$EventPattern": "

The event pattern. For more information, see Event Patterns in the Amazon EventBridge User Guide.

", + "Rule$EventPattern": "

The event pattern of the rule. For more information, see Event Patterns in the Amazon EventBridge User Guide.

", + "TestEventPatternRequest$EventPattern": "

The event pattern. For more information, see Event Patterns in the Amazon EventBridge User Guide.

" } }, "EventResource": { @@ -167,13 +284,54 @@ "EventResourceList": { "base": null, "refs": { - "PutEventsRequestEntry$Resources": "

AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns. Any number, including zero, may be present.

" + "PutEventsRequestEntry$Resources": "

AWS resources, identified by Amazon Resource Name (ARN), that the event primarily concerns. Any number, including zero, can be present.

", + "PutPartnerEventsRequestEntry$Resources": "

AWS resources, identified by Amazon Resource Name (ARN), that the event primarily concerns. Any number, including zero, can be present.

" + } + }, + "EventSource": { + "base": "

A partner event source is created by an SaaS partner. If a customer creates a partner event bus that matches this event source, that AWS account can receive events from the partner's applications or services.

", + "refs": { + "EventSourceList$member": null + } + }, + "EventSourceList": { + "base": null, + "refs": { + "ListEventSourcesResponse$EventSources": "

The list of event sources.

" + } + }, + "EventSourceName": { + "base": null, + "refs": { + "ActivateEventSourceRequest$Name": "

The name of the partner event source to activate.

", + "CreateEventBusRequest$EventSourceName": "

If you're creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.

", + "CreatePartnerEventSourceRequest$Name": "

The name of the partner event source. This name must be unique and must be in the format partner_name/event_namespace/event_name . The AWS account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.

", + "DeactivateEventSourceRequest$Name": "

The name of the partner event source to deactivate.

", + "DeletePartnerEventSourceRequest$Name": "

The name of the event source to delete.

", + "DescribeEventSourceRequest$Name": "

The name of the partner event source to display the details of.

", + "DescribePartnerEventSourceRequest$Name": "

The name of the event source to display.

", + "ListPartnerEventSourceAccountsRequest$EventSourceName": "

The name of the partner event source to display account information about.

" + } + }, + "EventSourceNamePrefix": { + "base": null, + "refs": { + "ListEventSourcesRequest$NamePrefix": "

Specifying this limits the results to only those partner event sources with names that start with the specified prefix.

" + } + }, + "EventSourceState": { + "base": null, + "refs": { + "DescribeEventSourceResponse$State": "

The state of the event source. If it's ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it's PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it's DELETED, you have created a matching event bus, but the event source has since been deleted.

", + "EventSource$State": "

The state of the event source. If it's ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it's PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it's DELETED, you have created a matching event bus, but the event source has since been deleted.

", + "PartnerEventSourceAccount$State": "

The state of the event source. If it's ACTIVE, you have already created a matching event bus for this event source, and that event bus is active. If it's PENDING, either you haven't yet created a matching event bus, or that event bus is deactivated. If it's DELETED, you have created a matching event bus, but the event source has since been deleted.

" } }, "EventTime": { "base": null, "refs": { - "PutEventsRequestEntry$Time": "

The time stamp of the event, per RFC3339. If no time stamp is provided, the time stamp of the PutEvents call is used.

" + "PutEventsRequestEntry$Time": "

The timestamp of the event, per RFC3339. If no timestamp is provided, the timestamp of the PutEvents call is used.

", + "PutPartnerEventsRequestEntry$Time": "

The date and time of the event.

" } }, "InputTransformer": { @@ -194,6 +352,7 @@ "BatchArrayProperties$Size": "

The size of the array, if this is an array batch job. Valid values are integers between 2 and 10,000.

", "BatchRetryStrategy$Attempts": "

The number of times to attempt to retry, if the job fails. Valid values are 1–10.

", "PutEventsResponse$FailedEntryCount": "

The number of failed entries.

", + "PutPartnerEventsResponse$FailedEntryCount": "

The number of events from this operation that couldn't be written to the partner event bus.

", "PutTargetsResponse$FailedEntryCount": "

The number of failed entries.

", "RemoveTargetsResponse$FailedEntryCount": "

The number of failed entries.

" } @@ -204,14 +363,19 @@ } }, "InvalidEventPatternException": { - "base": "

The event pattern is not valid.

", + "base": "

The event pattern isn't valid.

", + "refs": { + } + }, + "InvalidStateException": { + "base": "

The specified state isn't a valid state for an event source.

", "refs": { } }, "KinesisParameters": { - "base": "

This object enables you to specify a JSON path to extract from the event and use as the partition key for the Amazon Kinesis data stream, so that you can control the shard to which the event goes. If you do not include this parameter, the default is to use the eventId as the partition key.

", + "base": "

This object enables you to specify a JSON path to extract from the event and use as the partition key for the Amazon Kinesis data stream so that you can control the shard that the event goes to. If you don't include this parameter, the default is to use the eventId as the partition key.

", "refs": { - "Target$KinesisParameters": "

The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the eventId as the partition key.

" + "Target$KinesisParameters": "

The custom parameter that you can use to control the shard assignment when the target is a Kinesis data stream. If you don't include this parameter, the default is to use the eventId as the partition key.

" } }, "LaunchType": { @@ -221,13 +385,17 @@ } }, "LimitExceededException": { - "base": "

You tried to create more rules or add more targets to a rule than is allowed.

", + "base": "

You tried to create more resources than is allowed.

", "refs": { } }, "LimitMax100": { "base": null, "refs": { + "ListEventBusesRequest$Limit": "

Specifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", + "ListEventSourcesRequest$Limit": "

Specifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourceAccountsRequest$Limit": "

Specifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourcesRequest$Limit": "

pecifying this limits the number of results returned by this operation. The operation also returns a NextToken that you can use in a subsequent operation to retrieve the next set of results.

", "ListRuleNamesByTargetRequest$Limit": "

The maximum number of results to return.

", "ListRulesRequest$Limit": "

The maximum number of results to return.

", "ListTargetsByRuleRequest$Limit": "

The maximum number of results to return.

" @@ -239,6 +407,46 @@ "EcsParameters$TaskCount": "

The number of tasks to create based on TaskDefinition. The default is 1.

" } }, + "ListEventBusesRequest": { + "base": null, + "refs": { + } + }, + "ListEventBusesResponse": { + "base": null, + "refs": { + } + }, + "ListEventSourcesRequest": { + "base": null, + "refs": { + } + }, + "ListEventSourcesResponse": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourceAccountsRequest": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourceAccountsResponse": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourcesRequest": { + "base": null, + "refs": { + } + }, + "ListPartnerEventSourcesResponse": { + "base": null, + "refs": { + } + }, "ListRuleNamesByTargetRequest": { "base": null, "refs": { @@ -283,11 +491,11 @@ "base": null, "refs": { "DescribeRuleResponse$ManagedBy": "

If this is a managed rule, created by an AWS service on your behalf, this field displays the principal name of the AWS service that created the rule.

", - "Rule$ManagedBy": "

If the rule was created on behalf of your account by an AWS service, this field displays the principal name of the service that created the rule.

" + "Rule$ManagedBy": "

If an AWS service created the rule on behalf of your account, this field displays the principal name of the service that created the rule.

" } }, "ManagedRuleException": { - "base": "

This rule was created by an AWS service on behalf of your account. It is managed by that service. If you see this error in response to DeleteRule or RemoveTargets, you can use the Force parameter in those calls to delete the rule or remove targets from the rule. You cannot modify these managed rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, or UntagResource.

", + "base": "

An AWS service created this rule on behalf of your account. That service manages it. If you see this error in response to DeleteRule or RemoveTargets, you can use the Force parameter in those calls to delete the rule or remove targets from the rule. You can't modify these managed rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, or UntagResource.

", "refs": { } }, @@ -300,12 +508,20 @@ "NetworkConfiguration": { "base": "

This structure specifies the network configuration for an ECS task.

", "refs": { - "EcsParameters$NetworkConfiguration": "

Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks.

If you specify NetworkConfiguration when the target ECS task does not use the awsvpc network mode, the task fails.

" + "EcsParameters$NetworkConfiguration": "

Use this structure if the ECS task uses the awsvpc network mode. This structure specifies the VPC subnets and security groups associated with the task and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks.

If you specify NetworkConfiguration when the target ECS task doesn't use the awsvpc network mode, the task fails.

" } }, "NextToken": { "base": null, "refs": { + "ListEventBusesRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", + "ListEventBusesResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", + "ListEventSourcesRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", + "ListEventSourcesResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourceAccountsRequest$NextToken": "

The token returned by a previous call to this operation. Specifying this retrieves the next set of results.

", + "ListPartnerEventSourceAccountsResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", + "ListPartnerEventSourcesRequest$NextToken": "

The token returned by a previous call to this operation. Specifying this retrieves the next set of results.

", + "ListPartnerEventSourcesResponse$NextToken": "

A token you can use in a subsequent operation to retrieve the next set of results.

", "ListRuleNamesByTargetRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", "ListRuleNamesByTargetResponse$NextToken": "

Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

", "ListRulesRequest$NextToken": "

The token returned by a previous call to retrieve the next set of results.

", @@ -314,6 +530,44 @@ "ListTargetsByRuleResponse$NextToken": "

Indicates whether there are additional results to retrieve. If there are no more results, the value is null.

" } }, + "NonPartnerEventBusName": { + "base": null, + "refs": { + "PutEventsRequestEntry$EventBusName": "

The event bus that will receive the event. Only the rules that are associated with this event bus can match the event.

", + "PutPermissionRequest$EventBusName": "

The event bus associated with the rule. If you omit this, the default event bus is used.

", + "RemovePermissionRequest$EventBusName": "

The name of the event bus to revoke permissions for. If you omit this, the default event bus is used.

" + } + }, + "PartnerEventSource": { + "base": "

A partner event source is created by an SaaS partner. If a customer creates a partner event bus that matches this event source, that AWS account can receive events from the partner's applications or services.

", + "refs": { + "PartnerEventSourceList$member": null + } + }, + "PartnerEventSourceAccount": { + "base": "

The AWS account that a partner event source has been offered to.

", + "refs": { + "PartnerEventSourceAccountList$member": null + } + }, + "PartnerEventSourceAccountList": { + "base": null, + "refs": { + "ListPartnerEventSourceAccountsResponse$PartnerEventSourceAccounts": "

The list of partner event sources returned by the operation.

" + } + }, + "PartnerEventSourceList": { + "base": null, + "refs": { + "ListPartnerEventSourcesResponse$PartnerEventSources": "

The list of partner event sources returned by the operation.

" + } + }, + "PartnerEventSourceNamePrefix": { + "base": null, + "refs": { + "ListPartnerEventSourcesRequest$NamePrefix": "

If you specify this, the results are limited to only those partner event sources that start with the string you specify.

" + } + }, "PolicyLengthExceededException": { "base": "

The event bus policy is too long. For more information, see the limits.

", "refs": { @@ -322,7 +576,7 @@ "Principal": { "base": null, "refs": { - "PutPermissionRequest$Principal": "

The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify \"*\" to permit any account to put events to your default event bus.

If you specify \"*\" without specifying Condition, avoid creating rules that may match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an account field with a specific account ID from which to receive events. Rules with an account field do not match any events sent from other accounts.

" + "PutPermissionRequest$Principal": "

The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify \"*\" to permit any account to put events to your default event bus.

If you specify \"*\" without specifying Condition, avoid creating rules that might match undesirable events. To create more secure rules, make sure that the event pattern for each rule contains an account field with a specific account ID to receive events from. Rules with an account field don't match any events sent from other accounts.

" } }, "PutEventsRequest": { @@ -359,6 +613,40 @@ "PutEventsResponse$Entries": "

The successfully and unsuccessfully ingested events results. If the ingestion was successful, the entry has the event ID in it. Otherwise, you can use the error code and error message to identify the problem with the entry.

" } }, + "PutPartnerEventsRequest": { + "base": null, + "refs": { + } + }, + "PutPartnerEventsRequestEntry": { + "base": "

The details about an event generated by an SaaS partner.

", + "refs": { + "PutPartnerEventsRequestEntryList$member": null + } + }, + "PutPartnerEventsRequestEntryList": { + "base": null, + "refs": { + "PutPartnerEventsRequest$Entries": "

The list of events to write to the event bus.

" + } + }, + "PutPartnerEventsResponse": { + "base": null, + "refs": { + } + }, + "PutPartnerEventsResultEntry": { + "base": "

Represents an event that a partner tried to generate but failed.

", + "refs": { + "PutPartnerEventsResultEntryList$member": null + } + }, + "PutPartnerEventsResultEntryList": { + "base": null, + "refs": { + "PutPartnerEventsResponse$Entries": "

The list of events from this operation that were successfully written to the partner event bus.

" + } + }, "PutPermissionRequest": { "base": null, "refs": { @@ -423,8 +711,13 @@ "RemoveTargetsResponse$FailedEntries": "

The failed target entries.

" } }, + "ResourceAlreadyExistsException": { + "base": "

The resource that you're trying to create already exists.

", + "refs": { + } + }, "ResourceNotFoundException": { - "base": "

An entity that you specified does not exist.

", + "base": "

An entity that you specified doesn't exist.

", "refs": { } }, @@ -438,7 +731,7 @@ } }, "Rule": { - "base": "

Contains information about a rule in Amazon CloudWatch Events.

", + "base": "

Contains information about a rule in Amazon EventBridge.

", "refs": { "RuleResponseList$member": null } @@ -469,7 +762,7 @@ "EnableRuleRequest$Name": "

The name of the rule.

", "ListRulesRequest$NamePrefix": "

The prefix matching the rule name.

", "ListTargetsByRuleRequest$Rule": "

The name of the rule.

", - "PutRuleRequest$Name": "

The name of the rule that you are creating or updating.

", + "PutRuleRequest$Name": "

The name of the rule that you're creating or updating.

", "PutTargetsRequest$Rule": "

The name of the rule.

", "RemoveTargetsRequest$Rule": "

The name of the rule.

", "Rule$Name": "

The name of the rule.

", @@ -497,13 +790,13 @@ } }, "RunCommandParameters": { - "base": "

This parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command.

", + "base": "

This parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command.

", "refs": { "Target$RunCommandParameters": "

Parameters used when you are using the rule to invoke Amazon EC2 Run Command.

" } }, "RunCommandTarget": { - "base": "

Information about the EC2 instances that are to be sent the command, specified as key-value pairs. Each RunCommandTarget block can include only one key, but this key may specify multiple values.

", + "base": "

Information about the EC2 instances that are to be sent the command, specified as key-value pairs. Each RunCommandTarget block can include only one key, but this key can specify multiple values.

", "refs": { "RunCommandTargets$member": null } @@ -529,15 +822,15 @@ "RunCommandTargets": { "base": null, "refs": { - "RunCommandParameters$RunCommandTargets": "

Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.

" + "RunCommandParameters$RunCommandTargets": "

Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.

" } }, "ScheduleExpression": { "base": null, "refs": { - "DescribeRuleResponse$ScheduleExpression": "

The scheduling expression. For example, \"cron(0 20 * * ? *)\", \"rate(5 minutes)\".

", - "PutRuleRequest$ScheduleExpression": "

The scheduling expression. For example, \"cron(0 20 * * ? *)\" or \"rate(5 minutes)\".

", - "Rule$ScheduleExpression": "

The scheduling expression. For example, \"cron(0 20 * * ? *)\", \"rate(5 minutes)\".

" + "DescribeRuleResponse$ScheduleExpression": "

The scheduling expression: for example, \"cron(0 20 * * ? *)\" or \"rate(5 minutes)\".

", + "PutRuleRequest$ScheduleExpression": "

The scheduling expression: for example, \"cron(0 20 * * ? *)\" or \"rate(5 minutes)\".

", + "Rule$ScheduleExpression": "

The scheduling expression: for example, \"cron(0 20 * * ? *)\" or \"rate(5 minutes)\".

" } }, "SqsParameters": { @@ -549,7 +842,7 @@ "StatementId": { "base": null, "refs": { - "PutPermissionRequest$StatementId": "

An identifier string for the external account that you are granting permissions to. If you later want to revoke the permission for this external account, specify this StatementId when you run RemovePermission.

", + "PutPermissionRequest$StatementId": "

An identifier string for the external account that you're granting permissions to. If you later want to revoke the permission for this external account, specify this StatementId when you run RemovePermission.

", "RemovePermissionRequest$StatementId": "

The statement ID corresponding to the account that is no longer allowed to put events to the default event bus.

" } }, @@ -558,17 +851,35 @@ "refs": { "BatchParameters$JobDefinition": "

The ARN or name of the job definition to use if the event target is an AWS Batch job. This job definition must already exist.

", "BatchParameters$JobName": "

The name to use for this execution of the job, if the target is an AWS Batch job.

", - "Condition$Type": "

Specifies the type of condition. Currently the only supported value is StringEquals.

", - "Condition$Key": "

Specifies the key for the condition. Currently the only supported key is aws:PrincipalOrgID.

", - "Condition$Value": "

Specifies the value for the key. Currently, this must be the ID of the organization.

", + "Condition$Type": "

The type of condition. Currently, the only supported value is StringEquals.

", + "Condition$Key": "

The key for the condition. Currently, the only supported key is aws:PrincipalOrgID.

", + "Condition$Value": "

The value for the key. Currently, this must be the ID of the organization.

", + "CreateEventBusResponse$EventBusArn": "

The ARN of the new event bus.

", + "CreatePartnerEventSourceResponse$EventSourceArn": "

The ARN of the partner event source.

", "DescribeEventBusResponse$Name": "

The name of the event bus. Currently, this is always default.

", "DescribeEventBusResponse$Arn": "

The Amazon Resource Name (ARN) of the account permitted to write events to the current account.

", "DescribeEventBusResponse$Policy": "

The policy that enables the external account to send events to your account.

", + "DescribeEventSourceResponse$Arn": "

The ARN of the partner event source.

", + "DescribeEventSourceResponse$CreatedBy": "

The name of the SaaS partner that created the event source.

", + "DescribeEventSourceResponse$Name": "

The name of the partner event source.

", + "DescribePartnerEventSourceResponse$Arn": "

The ARN of the event source.

", + "DescribePartnerEventSourceResponse$Name": "

The name of the event source.

", "EcsParameters$PlatformVersion": "

Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0.

This structure is used only if LaunchType is FARGATE. For more information about valid platform versions, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.

", "EcsParameters$Group": "

Specifies an ECS task group for the task. The maximum length is 255 characters.

", + "EventBus$Name": "

The name of the event bus.

", + "EventBus$Arn": "

The ARN of the event bus.

", + "EventBus$Policy": "

The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.

", + "EventSource$Arn": "

The ARN of the event source.

", + "EventSource$CreatedBy": "

The name of the partner that created the event source.

", + "EventSource$Name": "

The name of the event source.

", + "PartnerEventSource$Arn": "

The ARN of the partner event source.

", + "PartnerEventSource$Name": "

The name of the partner event source.

", "PutEventsRequestEntry$Source": "

The source of the event. This field is required.

", - "PutEventsRequestEntry$DetailType": "

Free-form string used to decide what fields to expect in the event detail.

", - "PutEventsRequestEntry$Detail": "

A valid JSON string. There is no other schema imposed. The JSON string may contain fields and nested subobjects.

", + "PutEventsRequestEntry$DetailType": "

Free-form string used to decide which fields to expect in the event detail.

", + "PutEventsRequestEntry$Detail": "

A valid JSON string. There is no other schema imposed. The JSON string can contain fields and nested subobjects.

", + "PutPartnerEventsRequestEntry$Source": "

The event source that is generating the evntry.

", + "PutPartnerEventsRequestEntry$DetailType": "

A free-form string used to decide which fields to expect in the event detail.

", + "PutPartnerEventsRequestEntry$Detail": "

A valid JSON string. There is no other schema imposed. The JSON string can contain fields and nested subobjects.

", "StringList$member": null, "TestEventPatternRequest$Event": "

The event, in JSON format, to test against the event pattern.

" } @@ -577,11 +888,11 @@ "base": null, "refs": { "AwsVpcConfiguration$Subnets": "

Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

", - "AwsVpcConfiguration$SecurityGroups": "

Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.

" + "AwsVpcConfiguration$SecurityGroups": "

Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you don't specify a security group, the default security group for the VPC is used.

" } }, "Tag": { - "base": "

A key-value pair associated with an AWS resource. In CloudWatch Events, rules support tagging.

", + "base": "

A key-value pair associated with an AWS resource. In EventBridge, rules support tagging.

", "refs": { "TagList$member": null } @@ -589,7 +900,7 @@ "TagKey": { "base": null, "refs": { - "Tag$Key": "

A string you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

", + "Tag$Key": "

A string that you can use to assign a value. The combination of tag keys and values can help you organize and categorize your resources.

", "TagKeyList$member": null } }, @@ -602,7 +913,7 @@ "TagList": { "base": null, "refs": { - "ListTagsForResourceResponse$Tags": "

The list of tag keys and values associated with the rule you specified

", + "ListTagsForResourceResponse$Tags": "

The list of tag keys and values associated with the rule that you specified.

", "PutRuleRequest$Tags": "

The list of key-value pairs to associate with the rule.

", "TagResourceRequest$Tags": "

The list of key-value pairs to associate with the rule.

" } @@ -624,7 +935,7 @@ } }, "Target": { - "base": "

Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be set as a target, see PutTargets.

If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon CloudWatch Events User Guide.

", + "base": "

Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be set as a target, see PutTargets.

If you're setting the event bus of another account as the target and that account granted permission to your account through an organization instead of directly by the account ID, you must specify a RoleArn with proper permissions in the Target structure. For more information, see Sending and Receiving Events Between AWS Accounts in the Amazon EventBridge User Guide.

", "refs": { "TargetList$member": null } @@ -687,16 +998,27 @@ "refs": { } }, + "Timestamp": { + "base": null, + "refs": { + "DescribeEventSourceResponse$CreationTime": "

The date and time that the event source was created.

", + "DescribeEventSourceResponse$ExpirationTime": "

The date and time that the event source will expire if you don't create a matching event bus.

", + "EventSource$CreationTime": "

The date and time when the event source was created.

", + "EventSource$ExpirationTime": "

The date and time when the event source will expire if the AWS account doesn't create a matching event bus for it.

", + "PartnerEventSourceAccount$CreationTime": "

The date and time when the event source was created.

", + "PartnerEventSourceAccount$ExpirationTime": "

The date and time when the event source will expire if the AWS account doesn't create a matching event bus for it.

" + } + }, "TransformerInput": { "base": null, "refs": { - "InputTransformer$InputTemplate": "

Input template where you specify placeholders that will be filled with the values of the keys from InputPathsMap to customize the data sent to the target. Enclose each InputPathsMaps value in brackets: <value> The InputTemplate must be valid JSON.

If InputTemplate is a JSON object (surrounded by curly braces), the following restrictions apply:

The following example shows the syntax for using InputPathsMap and InputTemplate.

\"InputTransformer\":

{

\"InputPathsMap\": {\"instance\": \"$.detail.instance\",\"status\": \"$.detail.status\"},

\"InputTemplate\": \"<instance> is in state <status>\"

}

To have the InputTemplate include quote marks within a JSON string, escape each quote marks with a slash, as in the following example:

\"InputTransformer\":

{

\"InputPathsMap\": {\"instance\": \"$.detail.instance\",\"status\": \"$.detail.status\"},

\"InputTemplate\": \"<instance> is in state \\\"<status>\\\"\"

}

" + "InputTransformer$InputTemplate": "

Input template where you specify placeholders that will be filled with the values of the keys from InputPathsMap to customize the data sent to the target. Enclose each InputPathsMaps value in brackets: <value>. The InputTemplate must be valid JSON.

If InputTemplate is a JSON object (surrounded by curly braces), the following restrictions apply:

The following example shows the syntax for using InputPathsMap and InputTemplate.

\"InputTransformer\":

{

\"InputPathsMap\": {\"instance\": \"$.detail.instance\",\"status\": \"$.detail.status\"},

\"InputTemplate\": \"<instance> is in state <status>\"

}

To have the InputTemplate include quote marks within a JSON string, escape each quote marks with a slash, as in the following example:

\"InputTransformer\":

{

\"InputPathsMap\": {\"instance\": \"$.detail.instance\",\"status\": \"$.detail.status\"},

\"InputTemplate\": \"<instance> is in state \\\"<status>\\\"\"

}

" } }, "TransformerPaths": { "base": null, "refs": { - "InputTransformer$InputPathsMap": "

Map of JSON paths to be extracted from the event. You can then insert these in the template in InputTemplate to produce the output you want to be sent to the target.

InputPathsMap is an array key-value pairs, where each value is a valid JSON path. You can have as many as 10 key-value pairs. You must use JSON dot notation, not bracket notation.

The keys cannot start with \"AWS.\"

" + "InputTransformer$InputPathsMap": "

Map of JSON paths to be extracted from the event. You can then insert these in the template in InputTemplate to produce the output to be sent to the target.

InputPathsMap is an array key-value pairs, where each value is a valid JSON path. You can have as many as 10 key-value pairs. You must use JSON dot notation, not bracket notation.

The keys can't start with \"AWS\".

" } }, "UntagResourceRequest": { diff --git a/service/cloudwatchevents/api.go b/service/cloudwatchevents/api.go index c439aef2961..99b12487c2b 100644 --- a/service/cloudwatchevents/api.go +++ b/service/cloudwatchevents/api.go @@ -13,1853 +13,3961 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) -const opDeleteRule = "DeleteRule" +const opActivateEventSource = "ActivateEventSource" -// DeleteRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRule operation. The "output" return +// ActivateEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the ActivateEventSource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DeleteRule for more information on using the DeleteRule +// See ActivateEventSource for more information on using the ActivateEventSource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DeleteRuleRequest method. -// req, resp := client.DeleteRuleRequest(params) +// // Example sending a request using the ActivateEventSourceRequest method. +// req, resp := client.ActivateEventSourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteRule -func (c *CloudWatchEvents) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ActivateEventSource +func (c *CloudWatchEvents) ActivateEventSourceRequest(input *ActivateEventSourceInput) (req *request.Request, output *ActivateEventSourceOutput) { op := &request.Operation{ - Name: opDeleteRule, + Name: opActivateEventSource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteRuleInput{} + input = &ActivateEventSourceInput{} } - output = &DeleteRuleOutput{} + output = &ActivateEventSourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteRule API operation for Amazon CloudWatch Events. -// -// Deletes the specified rule. -// -// Before you can delete the rule, you must remove all targets, using RemoveTargets. +// ActivateEventSource API operation for Amazon CloudWatch Events. // -// When you delete a rule, incoming events might continue to match to the deleted -// rule. Allow a short period of time for changes to take effect. +// Activates a partner event source that has been deactivated. Once activated, +// your matching event bus will start receiving events from the event source. // -// Managed rules are rules created and managed by another AWS service on your -// behalf. These rules are created by those other AWS services to support functionality -// in those services. You can delete these rules using the Force option, but -// you should do so only if you are sure the other service is not still using -// that rule. +// This operation is performed by AWS customers, not by SaaS partners. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DeleteRule for usage and error information. +// API operation ActivateEventSource for usage and error information. // // Returned Error Codes: -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. // -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. +// * ErrCodeInvalidStateException "InvalidStateException" +// The specified state isn't a valid state for an event source. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteRule -func (c *CloudWatchEvents) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ActivateEventSource +func (c *CloudWatchEvents) ActivateEventSource(input *ActivateEventSourceInput) (*ActivateEventSourceOutput, error) { + req, out := c.ActivateEventSourceRequest(input) return out, req.Send() } -// DeleteRuleWithContext is the same as DeleteRule with the addition of +// ActivateEventSourceWithContext is the same as ActivateEventSource with the addition of // the ability to pass a context and additional request options. // -// See DeleteRule for details on how to use this API operation. +// See ActivateEventSource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) +func (c *CloudWatchEvents) ActivateEventSourceWithContext(ctx aws.Context, input *ActivateEventSourceInput, opts ...request.Option) (*ActivateEventSourceOutput, error) { + req, out := c.ActivateEventSourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeEventBus = "DescribeEventBus" +const opCreateEventBus = "CreateEventBus" -// DescribeEventBusRequest generates a "aws/request.Request" representing the -// client's request for the DescribeEventBus operation. The "output" return +// CreateEventBusRequest generates a "aws/request.Request" representing the +// client's request for the CreateEventBus operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeEventBus for more information on using the DescribeEventBus +// See CreateEventBus for more information on using the CreateEventBus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeEventBusRequest method. -// req, resp := client.DescribeEventBusRequest(params) +// // Example sending a request using the CreateEventBusRequest method. +// req, resp := client.CreateEventBusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventBus -func (c *CloudWatchEvents) DescribeEventBusRequest(input *DescribeEventBusInput) (req *request.Request, output *DescribeEventBusOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/CreateEventBus +func (c *CloudWatchEvents) CreateEventBusRequest(input *CreateEventBusInput) (req *request.Request, output *CreateEventBusOutput) { op := &request.Operation{ - Name: opDescribeEventBus, + Name: opCreateEventBus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeEventBusInput{} + input = &CreateEventBusInput{} } - output = &DescribeEventBusOutput{} + output = &CreateEventBusOutput{} req = c.newRequest(op, input, output) return } -// DescribeEventBus API operation for Amazon CloudWatch Events. +// CreateEventBus API operation for Amazon CloudWatch Events. +// +// Creates a new event bus within your account. This can be a custom event bus +// which you can use to receive events from your own custom applications and +// services, or it can be a partner event bus which can be matched to a partner +// event source. // -// Displays the external AWS accounts that are permitted to write events to -// your account using your account's event bus, and the associated policy. To -// enable your account to receive events from other accounts, use PutPermission. +// This operation is used by AWS customers, not by SaaS partners. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DescribeEventBus for usage and error information. +// API operation CreateEventBus for usage and error information. // // Returned Error Codes: +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource that you're trying to create already exists. +// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. +// An entity that you specified doesn't exist. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The specified state isn't a valid state for an event source. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventBus -func (c *CloudWatchEvents) DescribeEventBus(input *DescribeEventBusInput) (*DescribeEventBusOutput, error) { - req, out := c.DescribeEventBusRequest(input) +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/CreateEventBus +func (c *CloudWatchEvents) CreateEventBus(input *CreateEventBusInput) (*CreateEventBusOutput, error) { + req, out := c.CreateEventBusRequest(input) return out, req.Send() } -// DescribeEventBusWithContext is the same as DescribeEventBus with the addition of +// CreateEventBusWithContext is the same as CreateEventBus with the addition of // the ability to pass a context and additional request options. // -// See DescribeEventBus for details on how to use this API operation. +// See CreateEventBus for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) DescribeEventBusWithContext(ctx aws.Context, input *DescribeEventBusInput, opts ...request.Option) (*DescribeEventBusOutput, error) { - req, out := c.DescribeEventBusRequest(input) +func (c *CloudWatchEvents) CreateEventBusWithContext(ctx aws.Context, input *CreateEventBusInput, opts ...request.Option) (*CreateEventBusOutput, error) { + req, out := c.CreateEventBusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeRule = "DescribeRule" +const opCreatePartnerEventSource = "CreatePartnerEventSource" -// DescribeRuleRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRule operation. The "output" return +// CreatePartnerEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the CreatePartnerEventSource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DescribeRule for more information on using the DescribeRule +// See CreatePartnerEventSource for more information on using the CreatePartnerEventSource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DescribeRuleRequest method. -// req, resp := client.DescribeRuleRequest(params) +// // Example sending a request using the CreatePartnerEventSourceRequest method. +// req, resp := client.CreatePartnerEventSourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeRule -func (c *CloudWatchEvents) DescribeRuleRequest(input *DescribeRuleInput) (req *request.Request, output *DescribeRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/CreatePartnerEventSource +func (c *CloudWatchEvents) CreatePartnerEventSourceRequest(input *CreatePartnerEventSourceInput) (req *request.Request, output *CreatePartnerEventSourceOutput) { op := &request.Operation{ - Name: opDescribeRule, + Name: opCreatePartnerEventSource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeRuleInput{} + input = &CreatePartnerEventSourceInput{} } - output = &DescribeRuleOutput{} + output = &CreatePartnerEventSourceOutput{} req = c.newRequest(op, input, output) return } -// DescribeRule API operation for Amazon CloudWatch Events. +// CreatePartnerEventSource API operation for Amazon CloudWatch Events. // -// Describes the specified rule. +// Called by an SaaS partner to create a partner event source. // -// DescribeRule does not list the targets of a rule. To see the targets associated -// with a rule, use ListTargetsByRule. +// This operation is not used by AWS customers. +// +// Each partner event source can be used by one AWS account to create a matching +// partner event bus in that AWS account. A SaaS partner must create one partner +// event source for each AWS account that wants to receive those event types. +// +// A partner event source creates events based on resources in the SaaS partner's +// service or application. +// +// An AWS account that creates a partner event bus that matches the partner +// event source can use that event bus to receive events from the partner, and +// then process them using AWS Events rules and targets. +// +// Partner event source names follow this format: +// +// aws.partner/partner_name/event_namespace/event_name +// +// * partner_name is determined during partner registration and identifies +// the partner to AWS customers. +// +// * For event_namespace, we recommend that partners use a string that identifies +// the AWS customer within the partner's system. This should not be the customer's +// AWS account ID. +// +// * event_name is determined by the partner, and should uniquely identify +// an event-generating resource within the partner system. This should help +// AWS customers decide whether to create an event bus to receive these events. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DescribeRule for usage and error information. +// API operation CreatePartnerEventSource for usage and error information. // // Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource that you're trying to create already exists. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeRule -func (c *CloudWatchEvents) DescribeRule(input *DescribeRuleInput) (*DescribeRuleOutput, error) { - req, out := c.DescribeRuleRequest(input) +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/CreatePartnerEventSource +func (c *CloudWatchEvents) CreatePartnerEventSource(input *CreatePartnerEventSourceInput) (*CreatePartnerEventSourceOutput, error) { + req, out := c.CreatePartnerEventSourceRequest(input) return out, req.Send() } -// DescribeRuleWithContext is the same as DescribeRule with the addition of +// CreatePartnerEventSourceWithContext is the same as CreatePartnerEventSource with the addition of // the ability to pass a context and additional request options. // -// See DescribeRule for details on how to use this API operation. +// See CreatePartnerEventSource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) DescribeRuleWithContext(ctx aws.Context, input *DescribeRuleInput, opts ...request.Option) (*DescribeRuleOutput, error) { - req, out := c.DescribeRuleRequest(input) +func (c *CloudWatchEvents) CreatePartnerEventSourceWithContext(ctx aws.Context, input *CreatePartnerEventSourceInput, opts ...request.Option) (*CreatePartnerEventSourceOutput, error) { + req, out := c.CreatePartnerEventSourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDisableRule = "DisableRule" +const opDeactivateEventSource = "DeactivateEventSource" -// DisableRuleRequest generates a "aws/request.Request" representing the -// client's request for the DisableRule operation. The "output" return +// DeactivateEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DeactivateEventSource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See DisableRule for more information on using the DisableRule +// See DeactivateEventSource for more information on using the DeactivateEventSource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the DisableRuleRequest method. -// req, resp := client.DisableRuleRequest(params) +// // Example sending a request using the DeactivateEventSourceRequest method. +// req, resp := client.DeactivateEventSourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DisableRule -func (c *CloudWatchEvents) DisableRuleRequest(input *DisableRuleInput) (req *request.Request, output *DisableRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeactivateEventSource +func (c *CloudWatchEvents) DeactivateEventSourceRequest(input *DeactivateEventSourceInput) (req *request.Request, output *DeactivateEventSourceOutput) { op := &request.Operation{ - Name: opDisableRule, + Name: opDeactivateEventSource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DisableRuleInput{} + input = &DeactivateEventSourceInput{} } - output = &DisableRuleOutput{} + output = &DeactivateEventSourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DisableRule API operation for Amazon CloudWatch Events. +// DeactivateEventSource API operation for Amazon CloudWatch Events. // -// Disables the specified rule. A disabled rule won't match any events, and -// won't self-trigger if it has a schedule expression. +// An AWS customer uses this operation to temporarily stop receiving events +// from the specified partner event source. The matching event bus isn't deleted. // -// When you disable a rule, incoming events might continue to match to the disabled -// rule. Allow a short period of time for changes to take effect. +// When you deactivate a partner event source, the source goes into PENDING +// state. If it remains in PENDING state for more than two weeks, it's deleted. +// +// To activate a deactivated partner event source, use ActivateEventSource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation DisableRule for usage and error information. +// API operation DeactivateEventSource for usage and error information. // // Returned Error Codes: // * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. +// An entity that you specified doesn't exist. // -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. +// * ErrCodeInvalidStateException "InvalidStateException" +// The specified state isn't a valid state for an event source. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DisableRule -func (c *CloudWatchEvents) DisableRule(input *DisableRuleInput) (*DisableRuleOutput, error) { - req, out := c.DisableRuleRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeactivateEventSource +func (c *CloudWatchEvents) DeactivateEventSource(input *DeactivateEventSourceInput) (*DeactivateEventSourceOutput, error) { + req, out := c.DeactivateEventSourceRequest(input) return out, req.Send() } -// DisableRuleWithContext is the same as DisableRule with the addition of +// DeactivateEventSourceWithContext is the same as DeactivateEventSource with the addition of // the ability to pass a context and additional request options. // -// See DisableRule for details on how to use this API operation. +// See DeactivateEventSource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) DisableRuleWithContext(ctx aws.Context, input *DisableRuleInput, opts ...request.Option) (*DisableRuleOutput, error) { - req, out := c.DisableRuleRequest(input) +func (c *CloudWatchEvents) DeactivateEventSourceWithContext(ctx aws.Context, input *DeactivateEventSourceInput, opts ...request.Option) (*DeactivateEventSourceOutput, error) { + req, out := c.DeactivateEventSourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opEnableRule = "EnableRule" +const opDeleteEventBus = "DeleteEventBus" -// EnableRuleRequest generates a "aws/request.Request" representing the -// client's request for the EnableRule operation. The "output" return +// DeleteEventBusRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEventBus operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See EnableRule for more information on using the EnableRule +// See DeleteEventBus for more information on using the DeleteEventBus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the EnableRuleRequest method. -// req, resp := client.EnableRuleRequest(params) +// // Example sending a request using the DeleteEventBusRequest method. +// req, resp := client.DeleteEventBusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/EnableRule -func (c *CloudWatchEvents) EnableRuleRequest(input *EnableRuleInput) (req *request.Request, output *EnableRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteEventBus +func (c *CloudWatchEvents) DeleteEventBusRequest(input *DeleteEventBusInput) (req *request.Request, output *DeleteEventBusOutput) { op := &request.Operation{ - Name: opEnableRule, + Name: opDeleteEventBus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &EnableRuleInput{} + input = &DeleteEventBusInput{} } - output = &EnableRuleOutput{} + output = &DeleteEventBusOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// EnableRule API operation for Amazon CloudWatch Events. +// DeleteEventBus API operation for Amazon CloudWatch Events. // -// Enables the specified rule. If the rule does not exist, the operation fails. +// Deletes the specified custom event bus or partner event bus. All rules associated +// with this event bus are also deleted. You can't delete your account's default +// event bus. // -// When you enable a rule, incoming events might not immediately start matching -// to a newly enabled rule. Allow a short period of time for changes to take -// effect. +// This operation is performed by AWS customers, not by SaaS partners. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation EnableRule for usage and error information. +// API operation DeleteEventBus for usage and error information. // // Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. -// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/EnableRule -func (c *CloudWatchEvents) EnableRule(input *EnableRuleInput) (*EnableRuleOutput, error) { - req, out := c.EnableRuleRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteEventBus +func (c *CloudWatchEvents) DeleteEventBus(input *DeleteEventBusInput) (*DeleteEventBusOutput, error) { + req, out := c.DeleteEventBusRequest(input) return out, req.Send() } -// EnableRuleWithContext is the same as EnableRule with the addition of +// DeleteEventBusWithContext is the same as DeleteEventBus with the addition of // the ability to pass a context and additional request options. // -// See EnableRule for details on how to use this API operation. +// See DeleteEventBus for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) EnableRuleWithContext(ctx aws.Context, input *EnableRuleInput, opts ...request.Option) (*EnableRuleOutput, error) { - req, out := c.EnableRuleRequest(input) +func (c *CloudWatchEvents) DeleteEventBusWithContext(ctx aws.Context, input *DeleteEventBusInput, opts ...request.Option) (*DeleteEventBusOutput, error) { + req, out := c.DeleteEventBusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListRuleNamesByTarget = "ListRuleNamesByTarget" +const opDeletePartnerEventSource = "DeletePartnerEventSource" -// ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the -// client's request for the ListRuleNamesByTarget operation. The "output" return +// DeletePartnerEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DeletePartnerEventSource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListRuleNamesByTarget for more information on using the ListRuleNamesByTarget +// See DeletePartnerEventSource for more information on using the DeletePartnerEventSource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListRuleNamesByTargetRequest method. -// req, resp := client.ListRuleNamesByTargetRequest(params) +// // Example sending a request using the DeletePartnerEventSourceRequest method. +// req, resp := client.DeletePartnerEventSourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRuleNamesByTarget -func (c *CloudWatchEvents) ListRuleNamesByTargetRequest(input *ListRuleNamesByTargetInput) (req *request.Request, output *ListRuleNamesByTargetOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeletePartnerEventSource +func (c *CloudWatchEvents) DeletePartnerEventSourceRequest(input *DeletePartnerEventSourceInput) (req *request.Request, output *DeletePartnerEventSourceOutput) { op := &request.Operation{ - Name: opListRuleNamesByTarget, + Name: opDeletePartnerEventSource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListRuleNamesByTargetInput{} + input = &DeletePartnerEventSourceInput{} } - output = &ListRuleNamesByTargetOutput{} + output = &DeletePartnerEventSourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// ListRuleNamesByTarget API operation for Amazon CloudWatch Events. +// DeletePartnerEventSource API operation for Amazon CloudWatch Events. +// +// This operation is used by SaaS partners to delete a partner event source. +// AWS customers don't use this operation. // -// Lists the rules for the specified target. You can see which of the rules -// in Amazon CloudWatch Events can invoke a specific target in your account. +// When you delete an event source, the status of the corresponding partner +// event bus in the AWS customer account becomes DELETED. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation ListRuleNamesByTarget for usage and error information. +// API operation DeletePartnerEventSource for usage and error information. // // Returned Error Codes: // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRuleNamesByTarget -func (c *CloudWatchEvents) ListRuleNamesByTarget(input *ListRuleNamesByTargetInput) (*ListRuleNamesByTargetOutput, error) { - req, out := c.ListRuleNamesByTargetRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeletePartnerEventSource +func (c *CloudWatchEvents) DeletePartnerEventSource(input *DeletePartnerEventSourceInput) (*DeletePartnerEventSourceOutput, error) { + req, out := c.DeletePartnerEventSourceRequest(input) return out, req.Send() } -// ListRuleNamesByTargetWithContext is the same as ListRuleNamesByTarget with the addition of +// DeletePartnerEventSourceWithContext is the same as DeletePartnerEventSource with the addition of // the ability to pass a context and additional request options. // -// See ListRuleNamesByTarget for details on how to use this API operation. +// See DeletePartnerEventSource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) ListRuleNamesByTargetWithContext(ctx aws.Context, input *ListRuleNamesByTargetInput, opts ...request.Option) (*ListRuleNamesByTargetOutput, error) { - req, out := c.ListRuleNamesByTargetRequest(input) +func (c *CloudWatchEvents) DeletePartnerEventSourceWithContext(ctx aws.Context, input *DeletePartnerEventSourceInput, opts ...request.Option) (*DeletePartnerEventSourceOutput, error) { + req, out := c.DeletePartnerEventSourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListRules = "ListRules" +const opDeleteRule = "DeleteRule" -// ListRulesRequest generates a "aws/request.Request" representing the -// client's request for the ListRules operation. The "output" return +// DeleteRuleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListRules for more information on using the ListRules +// See DeleteRule for more information on using the DeleteRule // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListRulesRequest method. -// req, resp := client.ListRulesRequest(params) +// // Example sending a request using the DeleteRuleRequest method. +// req, resp := client.DeleteRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRules -func (c *CloudWatchEvents) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteRule +func (c *CloudWatchEvents) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { op := &request.Operation{ - Name: opListRules, + Name: opDeleteRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListRulesInput{} + input = &DeleteRuleInput{} } - output = &ListRulesOutput{} + output = &DeleteRuleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// ListRules API operation for Amazon CloudWatch Events. +// DeleteRule API operation for Amazon CloudWatch Events. // -// Lists your Amazon CloudWatch Events rules. You can either list all the rules -// or you can provide a prefix to match to the rule names. +// Deletes the specified rule. // -// ListRules does not list the targets of a rule. To see the targets associated -// with a rule, use ListTargetsByRule. +// Before you can delete the rule, you must remove all targets, using RemoveTargets. +// +// When you delete a rule, incoming events might continue to match to the deleted +// rule. Allow a short period of time for changes to take effect. +// +// Managed rules are rules created and managed by another AWS service on your +// behalf. These rules are created by those other AWS services to support functionality +// in those services. You can delete these rules using the Force option, but +// you should do so only if you're sure that the other service isn't still using +// that rule. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation ListRules for usage and error information. +// API operation DeleteRule for usage and error information. // // Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRules -func (c *CloudWatchEvents) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteRule +func (c *CloudWatchEvents) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { + req, out := c.DeleteRuleRequest(input) return out, req.Send() } -// ListRulesWithContext is the same as ListRules with the addition of +// DeleteRuleWithContext is the same as DeleteRule with the addition of // the ability to pass a context and additional request options. // -// See ListRules for details on how to use this API operation. +// See DeleteRule for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) ListRulesWithContext(ctx aws.Context, input *ListRulesInput, opts ...request.Option) (*ListRulesOutput, error) { - req, out := c.ListRulesRequest(input) +func (c *CloudWatchEvents) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { + req, out := c.DeleteRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListTagsForResource = "ListTagsForResource" +const opDescribeEventBus = "DescribeEventBus" -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return +// DescribeEventBusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventBus operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsForResource for more information on using the ListTagsForResource +// See DescribeEventBus for more information on using the DescribeEventBus // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) +// // Example sending a request using the DescribeEventBusRequest method. +// req, resp := client.DescribeEventBusRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTagsForResource -func (c *CloudWatchEvents) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventBus +func (c *CloudWatchEvents) DescribeEventBusRequest(input *DescribeEventBusInput) (req *request.Request, output *DescribeEventBusOutput) { op := &request.Operation{ - Name: opListTagsForResource, + Name: opDescribeEventBus, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListTagsForResourceInput{} + input = &DescribeEventBusInput{} } - output = &ListTagsForResourceOutput{} + output = &DescribeEventBusOutput{} req = c.newRequest(op, input, output) return } -// ListTagsForResource API operation for Amazon CloudWatch Events. +// DescribeEventBus API operation for Amazon CloudWatch Events. +// +// Displays details about an event bus in your account. This can include the +// external AWS accounts that are permitted to write events to your default +// event bus, and the associated policy. For custom event buses and partner +// event buses, it displays the name, ARN, policy, state, and creation time. +// +// To enable your account to receive events from other accounts on its default +// event bus, use PutPermission. // -// Displays the tags associated with a CloudWatch Events resource. In CloudWatch -// Events, rules can be tagged. +// For more information about partner event buses, see CreateEventBus. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation ListTagsForResource for usage and error information. +// API operation DescribeEventBus for usage and error information. // // Returned Error Codes: // * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. +// An entity that you specified doesn't exist. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTagsForResource -func (c *CloudWatchEvents) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventBus +func (c *CloudWatchEvents) DescribeEventBus(input *DescribeEventBusInput) (*DescribeEventBusOutput, error) { + req, out := c.DescribeEventBusRequest(input) return out, req.Send() } -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// DescribeEventBusWithContext is the same as DescribeEventBus with the addition of // the ability to pass a context and additional request options. // -// See ListTagsForResource for details on how to use this API operation. +// See DescribeEventBus for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +func (c *CloudWatchEvents) DescribeEventBusWithContext(ctx aws.Context, input *DescribeEventBusInput, opts ...request.Option) (*DescribeEventBusOutput, error) { + req, out := c.DescribeEventBusRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListTargetsByRule = "ListTargetsByRule" +const opDescribeEventSource = "DescribeEventSource" -// ListTargetsByRuleRequest generates a "aws/request.Request" representing the -// client's request for the ListTargetsByRule operation. The "output" return +// DescribeEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventSource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTargetsByRule for more information on using the ListTargetsByRule +// See DescribeEventSource for more information on using the DescribeEventSource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListTargetsByRuleRequest method. -// req, resp := client.ListTargetsByRuleRequest(params) +// // Example sending a request using the DescribeEventSourceRequest method. +// req, resp := client.DescribeEventSourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTargetsByRule -func (c *CloudWatchEvents) ListTargetsByRuleRequest(input *ListTargetsByRuleInput) (req *request.Request, output *ListTargetsByRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventSource +func (c *CloudWatchEvents) DescribeEventSourceRequest(input *DescribeEventSourceInput) (req *request.Request, output *DescribeEventSourceOutput) { op := &request.Operation{ - Name: opListTargetsByRule, + Name: opDescribeEventSource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListTargetsByRuleInput{} + input = &DescribeEventSourceInput{} } - output = &ListTargetsByRuleOutput{} + output = &DescribeEventSourceOutput{} req = c.newRequest(op, input, output) return } -// ListTargetsByRule API operation for Amazon CloudWatch Events. +// DescribeEventSource API operation for Amazon CloudWatch Events. // -// Lists the targets assigned to the specified rule. +// This operation lists details about a partner event source that is shared +// with your account. +// +// This operation is run by AWS customers, not by SaaS partners. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation ListTargetsByRule for usage and error information. +// API operation DescribeEventSource for usage and error information. // // Returned Error Codes: // * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. +// An entity that you specified doesn't exist. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTargetsByRule -func (c *CloudWatchEvents) ListTargetsByRule(input *ListTargetsByRuleInput) (*ListTargetsByRuleOutput, error) { - req, out := c.ListTargetsByRuleRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeEventSource +func (c *CloudWatchEvents) DescribeEventSource(input *DescribeEventSourceInput) (*DescribeEventSourceOutput, error) { + req, out := c.DescribeEventSourceRequest(input) return out, req.Send() } -// ListTargetsByRuleWithContext is the same as ListTargetsByRule with the addition of +// DescribeEventSourceWithContext is the same as DescribeEventSource with the addition of // the ability to pass a context and additional request options. // -// See ListTargetsByRule for details on how to use this API operation. +// See DescribeEventSource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) ListTargetsByRuleWithContext(ctx aws.Context, input *ListTargetsByRuleInput, opts ...request.Option) (*ListTargetsByRuleOutput, error) { - req, out := c.ListTargetsByRuleRequest(input) +func (c *CloudWatchEvents) DescribeEventSourceWithContext(ctx aws.Context, input *DescribeEventSourceInput, opts ...request.Option) (*DescribeEventSourceOutput, error) { + req, out := c.DescribeEventSourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutEvents = "PutEvents" +const opDescribePartnerEventSource = "DescribePartnerEventSource" -// PutEventsRequest generates a "aws/request.Request" representing the -// client's request for the PutEvents operation. The "output" return +// DescribePartnerEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DescribePartnerEventSource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutEvents for more information on using the PutEvents +// See DescribePartnerEventSource for more information on using the DescribePartnerEventSource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PutEventsRequest method. -// req, resp := client.PutEventsRequest(params) +// // Example sending a request using the DescribePartnerEventSourceRequest method. +// req, resp := client.DescribePartnerEventSourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutEvents -func (c *CloudWatchEvents) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribePartnerEventSource +func (c *CloudWatchEvents) DescribePartnerEventSourceRequest(input *DescribePartnerEventSourceInput) (req *request.Request, output *DescribePartnerEventSourceOutput) { op := &request.Operation{ - Name: opPutEvents, + Name: opDescribePartnerEventSource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutEventsInput{} + input = &DescribePartnerEventSourceInput{} } - output = &PutEventsOutput{} + output = &DescribePartnerEventSourceOutput{} req = c.newRequest(op, input, output) return } -// PutEvents API operation for Amazon CloudWatch Events. +// DescribePartnerEventSource API operation for Amazon CloudWatch Events. // -// Sends custom events to Amazon CloudWatch Events so that they can be matched -// to rules. +// An SaaS partner can use this operation to list details about a partner event +// source that they have created. +// +// AWS customers do not use this operation. Instead, AWS customers can use DescribeEventSource +// to see details about a partner event source that is shared with them. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutEvents for usage and error information. +// API operation DescribePartnerEventSource for usage and error information. // // Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutEvents -func (c *CloudWatchEvents) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { - req, out := c.PutEventsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribePartnerEventSource +func (c *CloudWatchEvents) DescribePartnerEventSource(input *DescribePartnerEventSourceInput) (*DescribePartnerEventSourceOutput, error) { + req, out := c.DescribePartnerEventSourceRequest(input) return out, req.Send() } -// PutEventsWithContext is the same as PutEvents with the addition of +// DescribePartnerEventSourceWithContext is the same as DescribePartnerEventSource with the addition of // the ability to pass a context and additional request options. // -// See PutEvents for details on how to use this API operation. +// See DescribePartnerEventSource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { - req, out := c.PutEventsRequest(input) +func (c *CloudWatchEvents) DescribePartnerEventSourceWithContext(ctx aws.Context, input *DescribePartnerEventSourceInput, opts ...request.Option) (*DescribePartnerEventSourceOutput, error) { + req, out := c.DescribePartnerEventSourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutPermission = "PutPermission" +const opDescribeRule = "DescribeRule" -// PutPermissionRequest generates a "aws/request.Request" representing the -// client's request for the PutPermission operation. The "output" return +// DescribeRuleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRule operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutPermission for more information on using the PutPermission +// See DescribeRule for more information on using the DescribeRule // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PutPermissionRequest method. -// req, resp := client.PutPermissionRequest(params) +// // Example sending a request using the DescribeRuleRequest method. +// req, resp := client.DescribeRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPermission -func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req *request.Request, output *PutPermissionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeRule +func (c *CloudWatchEvents) DescribeRuleRequest(input *DescribeRuleInput) (req *request.Request, output *DescribeRuleOutput) { op := &request.Operation{ - Name: opPutPermission, + Name: opDescribeRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutPermissionInput{} + input = &DescribeRuleInput{} } - output = &PutPermissionOutput{} + output = &DescribeRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutPermission API operation for Amazon CloudWatch Events. -// -// Running PutPermission permits the specified AWS account or AWS organization -// to put events to your account's default event bus. CloudWatch Events rules -// in your account are triggered by these events arriving to your default event -// bus. -// -// For another account to send events to your account, that external account -// must have a CloudWatch Events rule with your account's default event bus -// as a target. -// -// To enable multiple AWS accounts to put events to your default event bus, -// run PutPermission once for each of these accounts. Or, if all the accounts -// are members of the same AWS organization, you can run PutPermission once -// specifying Principal as "*" and specifying the AWS organization ID in Condition, -// to grant permissions to all accounts in that organization. +// DescribeRule API operation for Amazon CloudWatch Events. // -// If you grant permissions using an organization, then accounts in that organization -// must specify a RoleArn with proper permissions when they use PutTarget to -// add your account's event bus as a target. For more information, see Sending -// and Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) -// in the Amazon CloudWatch Events User Guide. +// Describes the specified rule. // -// The permission policy on the default event bus cannot exceed 10 KB in size. +// DescribeRule doesn't list the targets of a rule. To see the targets associated +// with a rule, use ListTargetsByRule. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutPermission for usage and error information. +// API operation DescribeRule for usage and error information. // // Returned Error Codes: // * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException" -// The event bus policy is too long. For more information, see the limits. +// An entity that you specified doesn't exist. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPermission -func (c *CloudWatchEvents) PutPermission(input *PutPermissionInput) (*PutPermissionOutput, error) { - req, out := c.PutPermissionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeRule +func (c *CloudWatchEvents) DescribeRule(input *DescribeRuleInput) (*DescribeRuleOutput, error) { + req, out := c.DescribeRuleRequest(input) return out, req.Send() } -// PutPermissionWithContext is the same as PutPermission with the addition of +// DescribeRuleWithContext is the same as DescribeRule with the addition of // the ability to pass a context and additional request options. // -// See PutPermission for details on how to use this API operation. +// See DescribeRule for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) PutPermissionWithContext(ctx aws.Context, input *PutPermissionInput, opts ...request.Option) (*PutPermissionOutput, error) { - req, out := c.PutPermissionRequest(input) +func (c *CloudWatchEvents) DescribeRuleWithContext(ctx aws.Context, input *DescribeRuleInput, opts ...request.Option) (*DescribeRuleOutput, error) { + req, out := c.DescribeRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutRule = "PutRule" +const opDisableRule = "DisableRule" -// PutRuleRequest generates a "aws/request.Request" representing the -// client's request for the PutRule operation. The "output" return +// DisableRuleRequest generates a "aws/request.Request" representing the +// client's request for the DisableRule operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutRule for more information on using the PutRule +// See DisableRule for more information on using the DisableRule // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PutRuleRequest method. -// req, resp := client.PutRuleRequest(params) +// // Example sending a request using the DisableRuleRequest method. +// req, resp := client.DisableRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutRule -func (c *CloudWatchEvents) PutRuleRequest(input *PutRuleInput) (req *request.Request, output *PutRuleOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DisableRule +func (c *CloudWatchEvents) DisableRuleRequest(input *DisableRuleInput) (req *request.Request, output *DisableRuleOutput) { op := &request.Operation{ - Name: opPutRule, + Name: opDisableRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutRuleInput{} + input = &DisableRuleInput{} } - output = &PutRuleOutput{} + output = &DisableRuleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutRule API operation for Amazon CloudWatch Events. -// -// Creates or updates the specified rule. Rules are enabled by default, or based -// on value of the state. You can disable a rule using DisableRule. -// -// If you are updating an existing rule, the rule is replaced with what you -// specify in this PutRule command. If you omit arguments in PutRule, the old -// values for those arguments are not kept. Instead, they are replaced with -// null values. -// -// When you create or update a rule, incoming events might not immediately start -// matching to new or updated rules. Allow a short period of time for changes -// to take effect. -// -// A rule must contain at least an EventPattern or ScheduleExpression. Rules -// with EventPatterns are triggered when a matching event is observed. Rules -// with ScheduleExpressions self-trigger based on the given schedule. A rule -// can have both an EventPattern and a ScheduleExpression, in which case the -// rule triggers on matching events as well as on a schedule. -// -// When you initially create a rule, you can optionally assign one or more tags -// to the rule. Tags can help you organize and categorize your resources. You -// can also use them to scope user permissions, by granting a user permission -// to access or change only rules with certain tag values. To use the PutRule -// operation and assign tags, you must have both the events:PutRule and events:TagResource -// permissions. -// -// If you are updating an existing rule, any tags you specify in the PutRule -// operation are ignored. To update the tags of an existing rule, use TagResource -// and UntagResource. -// -// Most services in AWS treat : or / as the same character in Amazon Resource -// Names (ARNs). However, CloudWatch Events uses an exact match in event patterns -// and rules. Be sure to use the correct ARN characters when creating event -// patterns so that they match the ARN syntax in the event you want to match. -// -// In CloudWatch Events, it is possible to create rules that lead to infinite -// loops, where a rule is fired repeatedly. For example, a rule might detect -// that ACLs have changed on an S3 bucket, and trigger software to change them -// to the desired state. If the rule is not written carefully, the subsequent -// change to the ACLs fires the rule again, creating an infinite loop. +// DisableRule API operation for Amazon CloudWatch Events. // -// To prevent this, write the rules so that the triggered actions do not re-fire -// the same rule. For example, your rule could fire only if ACLs are found to -// be in a bad state, instead of after any change. +// Disables the specified rule. A disabled rule won't match any events and won't +// self-trigger if it has a schedule expression. // -// An infinite loop can quickly cause higher than expected charges. We recommend -// that you use budgeting, which alerts you when charges exceed your specified -// limit. For more information, see Managing Your Costs with Budgets (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html). +// When you disable a rule, incoming events might continue to match to the disabled +// rule. Allow a short period of time for changes to take effect. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutRule for usage and error information. +// API operation DisableRule for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" -// The event pattern is not valid. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You tried to create more rules or add more targets to a rule than is allowed. +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. +// There is concurrent modification on a resource. // // * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutRule -func (c *CloudWatchEvents) PutRule(input *PutRuleInput) (*PutRuleOutput, error) { - req, out := c.PutRuleRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DisableRule +func (c *CloudWatchEvents) DisableRule(input *DisableRuleInput) (*DisableRuleOutput, error) { + req, out := c.DisableRuleRequest(input) return out, req.Send() } -// PutRuleWithContext is the same as PutRule with the addition of +// DisableRuleWithContext is the same as DisableRule with the addition of // the ability to pass a context and additional request options. // -// See PutRule for details on how to use this API operation. +// See DisableRule for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) PutRuleWithContext(ctx aws.Context, input *PutRuleInput, opts ...request.Option) (*PutRuleOutput, error) { - req, out := c.PutRuleRequest(input) +func (c *CloudWatchEvents) DisableRuleWithContext(ctx aws.Context, input *DisableRuleInput, opts ...request.Option) (*DisableRuleOutput, error) { + req, out := c.DisableRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutTargets = "PutTargets" +const opEnableRule = "EnableRule" -// PutTargetsRequest generates a "aws/request.Request" representing the -// client's request for the PutTargets operation. The "output" return +// EnableRuleRequest generates a "aws/request.Request" representing the +// client's request for the EnableRule operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See PutTargets for more information on using the PutTargets +// See EnableRule for more information on using the EnableRule // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the PutTargetsRequest method. -// req, resp := client.PutTargetsRequest(params) +// // Example sending a request using the EnableRuleRequest method. +// req, resp := client.EnableRuleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutTargets -func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *request.Request, output *PutTargetsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/EnableRule +func (c *CloudWatchEvents) EnableRuleRequest(input *EnableRuleInput) (req *request.Request, output *EnableRuleOutput) { op := &request.Operation{ - Name: opPutTargets, + Name: opEnableRule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutTargetsInput{} + input = &EnableRuleInput{} } - output = &PutTargetsOutput{} + output = &EnableRuleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutTargets API operation for Amazon CloudWatch Events. +// EnableRule API operation for Amazon CloudWatch Events. // -// Adds the specified targets to the specified rule, or updates the targets -// if they are already associated with the rule. +// Enables the specified rule. If the rule doesn't exist, the operation fails. // -// Targets are the resources that are invoked when a rule is triggered. +// When you enable a rule, incoming events might not immediately start matching +// to a newly enabled rule. Allow a short period of time for changes to take +// effect. // -// You can configure the following as targets for CloudWatch Events: +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. // -// * EC2 instances +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation EnableRule for usage and error information. // -// * SSM Run Command +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. // -// * SSM Automation +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. // -// * AWS Lambda functions +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. // -// * Data streams in Amazon Kinesis Data Streams +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. // -// * Data delivery streams in Amazon Kinesis Data Firehose +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/EnableRule +func (c *CloudWatchEvents) EnableRule(input *EnableRuleInput) (*EnableRuleOutput, error) { + req, out := c.EnableRuleRequest(input) + return out, req.Send() +} + +// EnableRuleWithContext is the same as EnableRule with the addition of +// the ability to pass a context and additional request options. // -// * Amazon ECS tasks -// -// * AWS Step Functions state machines -// -// * AWS Batch jobs -// -// * AWS CodeBuild projects -// -// * Pipelines in AWS CodePipeline -// -// * Amazon Inspector assessment templates -// -// * Amazon SNS topics -// -// * Amazon SQS queues, including FIFO queues -// -// * The default event bus of another AWS account -// -// Creating rules with built-in targets is supported only in the AWS Management -// Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances -// API call, EC2 StopInstances API call, and EC2 TerminateInstances API call. -// -// For some target types, PutTargets provides target-specific parameters. If -// the target is a Kinesis data stream, you can optionally specify which shard -// the event goes to by using the KinesisParameters argument. To invoke a command -// on multiple EC2 instances with one rule, you can use the RunCommandParameters -// field. -// -// To be able to make API calls against the resources that you own, Amazon CloudWatch -// Events needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, -// CloudWatch Events relies on resource-based policies. For EC2 instances, Kinesis -// data streams, and AWS Step Functions state machines, CloudWatch Events relies -// on IAM roles that you specify in the RoleARN argument in PutTargets. For -// more information, see Authentication and Access Control (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/auth-and-access-control-cwe.html) -// in the Amazon CloudWatch Events User Guide. -// -// If another AWS account is in the same region and has granted you permission -// (using PutPermission), you can send events to that account. Set that account's -// event bus as a target of the rules in your account. To send the matched events -// to the other account, specify that account's event bus as the Arn value when -// you run PutTargets. If your account sends events to another account, your -// account is charged for each sent event. Each event sent to another account -// is charged as a custom event. The account receiving the event is not charged. -// For more information, see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). -// -// If you are setting the event bus of another account as the target, and that -// account granted permission to your account through an organization instead -// of directly by the account ID, then you must specify a RoleArn with proper -// permissions in the Target structure. For more information, see Sending and -// Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) -// in the Amazon CloudWatch Events User Guide. -// -// For more information about enabling cross-account events, see PutPermission. -// -// Input, InputPath, and InputTransformer are mutually exclusive and optional -// parameters of a target. When a rule is triggered due to a matched event: -// -// * If none of the following arguments are specified for a target, then -// the entire event is passed to the target in JSON format (unless the target -// is Amazon EC2 Run Command or Amazon ECS task, in which case nothing from -// the event is passed to the target). -// -// * If Input is specified in the form of valid JSON, then the matched event -// is overridden with this constant. -// -// * If InputPath is specified in the form of JSONPath (for example, $.detail), -// then only the part of the event specified in the path is passed to the -// target (for example, only the detail part of the event is passed). -// -// * If InputTransformer is specified, then one or more specified JSONPaths -// are extracted from the event and used as values in a template that you -// specify as the input to the target. -// -// When you specify InputPath or InputTransformer, you must use JSON dot notation, -// not bracket notation. -// -// When you add targets to a rule and the associated rule triggers soon after, -// new or updated targets might not be immediately invoked. Allow a short period -// of time for changes to take effect. -// -// This action can partially fail if too many requests are made at the same -// time. If that happens, FailedEntryCount is non-zero in the response and each -// entry in FailedEntries provides the ID of the failed target and the error -// code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon CloudWatch Events's -// API operation PutTargets for usage and error information. -// -// Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeLimitExceededException "LimitExceededException" -// You tried to create more rules or add more targets to a rule than is allowed. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. -// -// * ErrCodeInternalException "InternalException" -// This exception occurs due to unexpected causes. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutTargets -func (c *CloudWatchEvents) PutTargets(input *PutTargetsInput) (*PutTargetsOutput, error) { - req, out := c.PutTargetsRequest(input) - return out, req.Send() -} - -// PutTargetsWithContext is the same as PutTargets with the addition of -// the ability to pass a context and additional request options. -// -// See PutTargets for details on how to use this API operation. +// See EnableRule for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) PutTargetsWithContext(ctx aws.Context, input *PutTargetsInput, opts ...request.Option) (*PutTargetsOutput, error) { - req, out := c.PutTargetsRequest(input) +func (c *CloudWatchEvents) EnableRuleWithContext(ctx aws.Context, input *EnableRuleInput, opts ...request.Option) (*EnableRuleOutput, error) { + req, out := c.EnableRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRemovePermission = "RemovePermission" +const opListEventBuses = "ListEventBuses" -// RemovePermissionRequest generates a "aws/request.Request" representing the -// client's request for the RemovePermission operation. The "output" return +// ListEventBusesRequest generates a "aws/request.Request" representing the +// client's request for the ListEventBuses operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RemovePermission for more information on using the RemovePermission +// See ListEventBuses for more information on using the ListEventBuses // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RemovePermissionRequest method. -// req, resp := client.RemovePermissionRequest(params) +// // Example sending a request using the ListEventBusesRequest method. +// req, resp := client.ListEventBusesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemovePermission -func (c *CloudWatchEvents) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListEventBuses +func (c *CloudWatchEvents) ListEventBusesRequest(input *ListEventBusesInput) (req *request.Request, output *ListEventBusesOutput) { op := &request.Operation{ - Name: opRemovePermission, + Name: opListEventBuses, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RemovePermissionInput{} + input = &ListEventBusesInput{} } - output = &RemovePermissionOutput{} + output = &ListEventBusesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// RemovePermission API operation for Amazon CloudWatch Events. +// ListEventBuses API operation for Amazon CloudWatch Events. // -// Revokes the permission of another AWS account to be able to put events to -// your default event bus. Specify the account to revoke by the StatementId -// value that you associated with the account when you granted it permission -// with PutPermission. You can find the StatementId by using DescribeEventBus. +// Lists all the event buses in your account, including the default event bus, +// custom event buses, and partner event buses. +// +// This operation is run by AWS customers, not by SaaS partners. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation RemovePermission for usage and error information. +// API operation ListEventBuses for usage and error information. // // Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemovePermission -func (c *CloudWatchEvents) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListEventBuses +func (c *CloudWatchEvents) ListEventBuses(input *ListEventBusesInput) (*ListEventBusesOutput, error) { + req, out := c.ListEventBusesRequest(input) return out, req.Send() } -// RemovePermissionWithContext is the same as RemovePermission with the addition of +// ListEventBusesWithContext is the same as ListEventBuses with the addition of // the ability to pass a context and additional request options. // -// See RemovePermission for details on how to use this API operation. +// See ListEventBuses for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) +func (c *CloudWatchEvents) ListEventBusesWithContext(ctx aws.Context, input *ListEventBusesInput, opts ...request.Option) (*ListEventBusesOutput, error) { + req, out := c.ListEventBusesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRemoveTargets = "RemoveTargets" +const opListEventSources = "ListEventSources" -// RemoveTargetsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTargets operation. The "output" return +// ListEventSourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListEventSources operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See RemoveTargets for more information on using the RemoveTargets +// See ListEventSources for more information on using the ListEventSources // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the RemoveTargetsRequest method. -// req, resp := client.RemoveTargetsRequest(params) +// // Example sending a request using the ListEventSourcesRequest method. +// req, resp := client.ListEventSourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemoveTargets -func (c *CloudWatchEvents) RemoveTargetsRequest(input *RemoveTargetsInput) (req *request.Request, output *RemoveTargetsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListEventSources +func (c *CloudWatchEvents) ListEventSourcesRequest(input *ListEventSourcesInput) (req *request.Request, output *ListEventSourcesOutput) { op := &request.Operation{ - Name: opRemoveTargets, + Name: opListEventSources, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RemoveTargetsInput{} + input = &ListEventSourcesInput{} } - output = &RemoveTargetsOutput{} + output = &ListEventSourcesOutput{} req = c.newRequest(op, input, output) return } -// RemoveTargets API operation for Amazon CloudWatch Events. +// ListEventSources API operation for Amazon CloudWatch Events. // -// Removes the specified targets from the specified rule. When the rule is triggered, -// those targets are no longer be invoked. -// -// When you remove a target, when the associated rule triggers, removed targets -// might continue to be invoked. Allow a short period of time for changes to -// take effect. +// You can use this to see all the partner event sources that have been shared +// with your AWS account. For more information about partner event sources, +// see CreateEventBus. // -// This action can partially fail if too many requests are made at the same -// time. If that happens, FailedEntryCount is non-zero in the response and each -// entry in FailedEntries provides the ID of the failed target and the error -// code. +// This operation is run by AWS customers, not by SaaS partners. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation RemoveTargets for usage and error information. +// API operation ListEventSources for usage and error information. // // Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. -// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemoveTargets -func (c *CloudWatchEvents) RemoveTargets(input *RemoveTargetsInput) (*RemoveTargetsOutput, error) { - req, out := c.RemoveTargetsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListEventSources +func (c *CloudWatchEvents) ListEventSources(input *ListEventSourcesInput) (*ListEventSourcesOutput, error) { + req, out := c.ListEventSourcesRequest(input) return out, req.Send() } -// RemoveTargetsWithContext is the same as RemoveTargets with the addition of +// ListEventSourcesWithContext is the same as ListEventSources with the addition of // the ability to pass a context and additional request options. // -// See RemoveTargets for details on how to use this API operation. +// See ListEventSources for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) RemoveTargetsWithContext(ctx aws.Context, input *RemoveTargetsInput, opts ...request.Option) (*RemoveTargetsOutput, error) { - req, out := c.RemoveTargetsRequest(input) +func (c *CloudWatchEvents) ListEventSourcesWithContext(ctx aws.Context, input *ListEventSourcesInput, opts ...request.Option) (*ListEventSourcesOutput, error) { + req, out := c.ListEventSourcesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource" +const opListPartnerEventSourceAccounts = "ListPartnerEventSourceAccounts" -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return +// ListPartnerEventSourceAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListPartnerEventSourceAccounts operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TagResource for more information on using the TagResource +// See ListPartnerEventSourceAccounts for more information on using the ListPartnerEventSourceAccounts // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) +// // Example sending a request using the ListPartnerEventSourceAccountsRequest method. +// req, resp := client.ListPartnerEventSourceAccountsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TagResource -func (c *CloudWatchEvents) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListPartnerEventSourceAccounts +func (c *CloudWatchEvents) ListPartnerEventSourceAccountsRequest(input *ListPartnerEventSourceAccountsInput) (req *request.Request, output *ListPartnerEventSourceAccountsOutput) { op := &request.Operation{ - Name: opTagResource, + Name: opListPartnerEventSourceAccounts, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &TagResourceInput{} + input = &ListPartnerEventSourceAccountsInput{} } - output = &TagResourceOutput{} + output = &ListPartnerEventSourceAccountsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// TagResource API operation for Amazon CloudWatch Events. -// -// Assigns one or more tags (key-value pairs) to the specified CloudWatch Events -// resource. Tags can help you organize and categorize your resources. You can -// also use them to scope user permissions by granting a user permission to -// access or change only resources with certain tag values. In CloudWatch Events, -// rules can be tagged. -// -// Tags don't have any semantic meaning to AWS and are interpreted strictly -// as strings of characters. +// ListPartnerEventSourceAccounts API operation for Amazon CloudWatch Events. // -// You can use the TagResource action with a rule that already has tags. If -// you specify a new tag key for the rule, this tag is appended to the list -// of tags associated with the rule. If you specify a tag key that is already -// associated with the rule, the new tag value that you specify replaces the -// previous value for that tag. +// An SaaS partner can use this operation to display the AWS account ID that +// a particular partner event source name is associated with. // -// You can associate as many as 50 tags with a resource. +// This operation is used by SaaS partners, not by AWS customers. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation TagResource for usage and error information. +// API operation ListPartnerEventSourceAccounts for usage and error information. // // Returned Error Codes: // * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. +// An entity that you specified doesn't exist. // // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TagResource -func (c *CloudWatchEvents) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListPartnerEventSourceAccounts +func (c *CloudWatchEvents) ListPartnerEventSourceAccounts(input *ListPartnerEventSourceAccountsInput) (*ListPartnerEventSourceAccountsOutput, error) { + req, out := c.ListPartnerEventSourceAccountsRequest(input) return out, req.Send() } -// TagResourceWithContext is the same as TagResource with the addition of +// ListPartnerEventSourceAccountsWithContext is the same as ListPartnerEventSourceAccounts with the addition of // the ability to pass a context and additional request options. // -// See TagResource for details on how to use this API operation. +// See ListPartnerEventSourceAccounts for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +func (c *CloudWatchEvents) ListPartnerEventSourceAccountsWithContext(ctx aws.Context, input *ListPartnerEventSourceAccountsInput, opts ...request.Option) (*ListPartnerEventSourceAccountsOutput, error) { + req, out := c.ListPartnerEventSourceAccountsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTestEventPattern = "TestEventPattern" +const opListPartnerEventSources = "ListPartnerEventSources" -// TestEventPatternRequest generates a "aws/request.Request" representing the -// client's request for the TestEventPattern operation. The "output" return +// ListPartnerEventSourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListPartnerEventSources operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See TestEventPattern for more information on using the TestEventPattern +// See ListPartnerEventSources for more information on using the ListPartnerEventSources // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the TestEventPatternRequest method. -// req, resp := client.TestEventPatternRequest(params) +// // Example sending a request using the ListPartnerEventSourcesRequest method. +// req, resp := client.ListPartnerEventSourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TestEventPattern -func (c *CloudWatchEvents) TestEventPatternRequest(input *TestEventPatternInput) (req *request.Request, output *TestEventPatternOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListPartnerEventSources +func (c *CloudWatchEvents) ListPartnerEventSourcesRequest(input *ListPartnerEventSourcesInput) (req *request.Request, output *ListPartnerEventSourcesOutput) { op := &request.Operation{ - Name: opTestEventPattern, + Name: opListPartnerEventSources, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &TestEventPatternInput{} + input = &ListPartnerEventSourcesInput{} } - output = &TestEventPatternOutput{} + output = &ListPartnerEventSourcesOutput{} req = c.newRequest(op, input, output) return } -// TestEventPattern API operation for Amazon CloudWatch Events. +// ListPartnerEventSources API operation for Amazon CloudWatch Events. // -// Tests whether the specified event pattern matches the provided event. +// An SaaS partner can use this operation to list all the partner event source +// names that they have created. // -// Most services in AWS treat : or / as the same character in Amazon Resource -// Names (ARNs). However, CloudWatch Events uses an exact match in event patterns -// and rules. Be sure to use the correct ARN characters when creating event -// patterns so that they match the ARN syntax in the event you want to match. +// This operation is not used by AWS customers. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation TestEventPattern for usage and error information. +// API operation ListPartnerEventSources for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" -// The event pattern is not valid. -// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TestEventPattern -func (c *CloudWatchEvents) TestEventPattern(input *TestEventPatternInput) (*TestEventPatternOutput, error) { - req, out := c.TestEventPatternRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListPartnerEventSources +func (c *CloudWatchEvents) ListPartnerEventSources(input *ListPartnerEventSourcesInput) (*ListPartnerEventSourcesOutput, error) { + req, out := c.ListPartnerEventSourcesRequest(input) return out, req.Send() } -// TestEventPatternWithContext is the same as TestEventPattern with the addition of +// ListPartnerEventSourcesWithContext is the same as ListPartnerEventSources with the addition of // the ability to pass a context and additional request options. // -// See TestEventPattern for details on how to use this API operation. +// See ListPartnerEventSources for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) TestEventPatternWithContext(ctx aws.Context, input *TestEventPatternInput, opts ...request.Option) (*TestEventPatternOutput, error) { - req, out := c.TestEventPatternRequest(input) +func (c *CloudWatchEvents) ListPartnerEventSourcesWithContext(ctx aws.Context, input *ListPartnerEventSourcesInput, opts ...request.Option) (*ListPartnerEventSourcesOutput, error) { + req, out := c.ListPartnerEventSourcesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUntagResource = "UntagResource" +const opListRuleNamesByTarget = "ListRuleNamesByTarget" -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return +// ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the +// client's request for the ListRuleNamesByTarget operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UntagResource for more information on using the UntagResource +// See ListRuleNamesByTarget for more information on using the ListRuleNamesByTarget // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) +// // Example sending a request using the ListRuleNamesByTargetRequest method. +// req, resp := client.ListRuleNamesByTargetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/UntagResource -func (c *CloudWatchEvents) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRuleNamesByTarget +func (c *CloudWatchEvents) ListRuleNamesByTargetRequest(input *ListRuleNamesByTargetInput) (req *request.Request, output *ListRuleNamesByTargetOutput) { op := &request.Operation{ - Name: opUntagResource, + Name: opListRuleNamesByTarget, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UntagResourceInput{} + input = &ListRuleNamesByTargetInput{} } - output = &UntagResourceOutput{} + output = &ListRuleNamesByTargetOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UntagResource API operation for Amazon CloudWatch Events. +// ListRuleNamesByTarget API operation for Amazon CloudWatch Events. // -// Removes one or more tags from the specified CloudWatch Events resource. In -// CloudWatch Events, rules can be tagged. +// Lists the rules for the specified target. You can see which rules can invoke +// a specific target in your account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon CloudWatch Events's -// API operation UntagResource for usage and error information. +// API operation ListRuleNamesByTarget for usage and error information. // // Returned Error Codes: -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// An entity that you specified does not exist. -// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // -// * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// There is concurrent modification on a rule or target. -// -// * ErrCodeManagedRuleException "ManagedRuleException" -// This rule was created by an AWS service on behalf of your account. It is -// managed by that service. If you see this error in response to DeleteRule -// or RemoveTargets, you can use the Force parameter in those calls to delete -// the rule or remove targets from the rule. You cannot modify these managed -// rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, -// or UntagResource. +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/UntagResource -func (c *CloudWatchEvents) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRuleNamesByTarget +func (c *CloudWatchEvents) ListRuleNamesByTarget(input *ListRuleNamesByTargetInput) (*ListRuleNamesByTargetOutput, error) { + req, out := c.ListRuleNamesByTargetRequest(input) return out, req.Send() } -// UntagResourceWithContext is the same as UntagResource with the addition of +// ListRuleNamesByTargetWithContext is the same as ListRuleNamesByTarget with the addition of // the ability to pass a context and additional request options. // -// See UntagResource for details on how to use this API operation. +// See ListRuleNamesByTarget for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *CloudWatchEvents) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +func (c *CloudWatchEvents) ListRuleNamesByTargetWithContext(ctx aws.Context, input *ListRuleNamesByTargetInput, opts ...request.Option) (*ListRuleNamesByTargetOutput, error) { + req, out := c.ListRuleNamesByTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListRules = "ListRules" + +// ListRulesRequest generates a "aws/request.Request" representing the +// client's request for the ListRules operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRules for more information on using the ListRules +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRulesRequest method. +// req, resp := client.ListRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRules +func (c *CloudWatchEvents) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) { + op := &request.Operation{ + Name: opListRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListRulesInput{} + } + + output = &ListRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRules API operation for Amazon CloudWatch Events. +// +// Lists your EventBridge rules. You can either list all the rules or provide +// a prefix to match to the rule names. +// +// ListRules doesn't list the targets of a rule. To see the targets associated +// with a rule, use ListTargetsByRule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation ListRules for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRules +func (c *CloudWatchEvents) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { + req, out := c.ListRulesRequest(input) + return out, req.Send() +} + +// ListRulesWithContext is the same as ListRules with the addition of +// the ability to pass a context and additional request options. +// +// See ListRules for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) ListRulesWithContext(ctx aws.Context, input *ListRulesInput, opts ...request.Option) (*ListRulesOutput, error) { + req, out := c.ListRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTagsForResource +func (c *CloudWatchEvents) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon CloudWatch Events. +// +// Displays the tags associated with an EventBridge resource. In EventBridge, +// rules can be tagged. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTagsForResource +func (c *CloudWatchEvents) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTargetsByRule = "ListTargetsByRule" + +// ListTargetsByRuleRequest generates a "aws/request.Request" representing the +// client's request for the ListTargetsByRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTargetsByRule for more information on using the ListTargetsByRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTargetsByRuleRequest method. +// req, resp := client.ListTargetsByRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTargetsByRule +func (c *CloudWatchEvents) ListTargetsByRuleRequest(input *ListTargetsByRuleInput) (req *request.Request, output *ListTargetsByRuleOutput) { + op := &request.Operation{ + Name: opListTargetsByRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTargetsByRuleInput{} + } + + output = &ListTargetsByRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTargetsByRule API operation for Amazon CloudWatch Events. +// +// Lists the targets assigned to the specified rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation ListTargetsByRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTargetsByRule +func (c *CloudWatchEvents) ListTargetsByRule(input *ListTargetsByRuleInput) (*ListTargetsByRuleOutput, error) { + req, out := c.ListTargetsByRuleRequest(input) + return out, req.Send() +} + +// ListTargetsByRuleWithContext is the same as ListTargetsByRule with the addition of +// the ability to pass a context and additional request options. +// +// See ListTargetsByRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) ListTargetsByRuleWithContext(ctx aws.Context, input *ListTargetsByRuleInput, opts ...request.Option) (*ListTargetsByRuleOutput, error) { + req, out := c.ListTargetsByRuleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// This structure specifies the VPC subnets and security groups for the task, -// and whether a public IP address is to be used. This structure is relevant -// only for ECS tasks that use the awsvpc network mode. -type AwsVpcConfiguration struct { +const opPutEvents = "PutEvents" + +// PutEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutEvents for more information on using the PutEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutEventsRequest method. +// req, resp := client.PutEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutEvents +func (c *CloudWatchEvents) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { + op := &request.Operation{ + Name: opPutEvents, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutEventsInput{} + } + + output = &PutEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutEvents API operation for Amazon CloudWatch Events. +// +// Sends custom events to EventBridge so that they can be matched to rules. +// These events can be from your custom applications and services. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation PutEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutEvents +func (c *CloudWatchEvents) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + return out, req.Send() +} + +// PutEventsWithContext is the same as PutEvents with the addition of +// the ability to pass a context and additional request options. +// +// See PutEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPartnerEvents = "PutPartnerEvents" + +// PutPartnerEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutPartnerEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPartnerEvents for more information on using the PutPartnerEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPartnerEventsRequest method. +// req, resp := client.PutPartnerEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPartnerEvents +func (c *CloudWatchEvents) PutPartnerEventsRequest(input *PutPartnerEventsInput) (req *request.Request, output *PutPartnerEventsOutput) { + op := &request.Operation{ + Name: opPutPartnerEvents, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPartnerEventsInput{} + } + + output = &PutPartnerEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutPartnerEvents API operation for Amazon CloudWatch Events. +// +// This is used by SaaS partners to write events to a customer's partner event +// bus. +// +// AWS customers do not use this operation. Instead, AWS customers can use PutEvents +// to write custom events from their own applications to an event bus. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation PutPartnerEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPartnerEvents +func (c *CloudWatchEvents) PutPartnerEvents(input *PutPartnerEventsInput) (*PutPartnerEventsOutput, error) { + req, out := c.PutPartnerEventsRequest(input) + return out, req.Send() +} + +// PutPartnerEventsWithContext is the same as PutPartnerEvents with the addition of +// the ability to pass a context and additional request options. +// +// See PutPartnerEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) PutPartnerEventsWithContext(ctx aws.Context, input *PutPartnerEventsInput, opts ...request.Option) (*PutPartnerEventsOutput, error) { + req, out := c.PutPartnerEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPermission = "PutPermission" + +// PutPermissionRequest generates a "aws/request.Request" representing the +// client's request for the PutPermission operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPermission for more information on using the PutPermission +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPermissionRequest method. +// req, resp := client.PutPermissionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPermission +func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req *request.Request, output *PutPermissionOutput) { + op := &request.Operation{ + Name: opPutPermission, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPermissionInput{} + } + + output = &PutPermissionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutPermission API operation for Amazon CloudWatch Events. +// +// Running PutPermission permits the specified AWS account or AWS organization +// to put events to the specified event bus. Rules in your account are triggered +// by these events arriving to an event bus in your account. +// +// For another account to send events to your account, that external account +// must have a rule with your account's event bus as a target. +// +// To enable multiple AWS accounts to put events to an event bus, run PutPermission +// once for each of these accounts. Or, if all the accounts are members of the +// same AWS organization, you can run PutPermission once specifying Principal +// as "*" and specifying the AWS organization ID in Condition, to grant permissions +// to all accounts in that organization. +// +// If you grant permissions using an organization, then accounts in that organization +// must specify a RoleArn with proper permissions when they use PutTarget to +// add your account's event bus as a target. For more information, see Sending +// and Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) +// in the Amazon EventBridge User Guide. +// +// The permission policy on an event bus can't exceed 10 KB in size. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation PutPermission for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException" +// The event bus policy is too long. For more information, see the limits. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutPermission +func (c *CloudWatchEvents) PutPermission(input *PutPermissionInput) (*PutPermissionOutput, error) { + req, out := c.PutPermissionRequest(input) + return out, req.Send() +} + +// PutPermissionWithContext is the same as PutPermission with the addition of +// the ability to pass a context and additional request options. +// +// See PutPermission for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) PutPermissionWithContext(ctx aws.Context, input *PutPermissionInput, opts ...request.Option) (*PutPermissionOutput, error) { + req, out := c.PutPermissionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutRule = "PutRule" + +// PutRuleRequest generates a "aws/request.Request" representing the +// client's request for the PutRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutRule for more information on using the PutRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutRuleRequest method. +// req, resp := client.PutRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutRule +func (c *CloudWatchEvents) PutRuleRequest(input *PutRuleInput) (req *request.Request, output *PutRuleOutput) { + op := &request.Operation{ + Name: opPutRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutRuleInput{} + } + + output = &PutRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutRule API operation for Amazon CloudWatch Events. +// +// Creates or updates the specified rule. Rules are enabled by default or based +// on value of the state. You can disable a rule using DisableRule. +// +// A single rule watches for events from a single event bus. Events generated +// by AWS services go to your account's default event bus. Events generated +// by SaaS partner services or applications go to the matching partner event +// bus. If you have custom applications or services, you can specify whether +// their events go to your default event bus or a custom event bus that you +// have created. For more information, see CreateEventBus. +// +// If you're updating an existing rule, the rule is replaced with what you specify +// in this PutRule command. If you omit arguments in PutRule, the old values +// for those arguments aren't kept. Instead, they're replaced with null values. +// +// When you create or update a rule, incoming events might not immediately start +// matching to new or updated rules. Allow a short period of time for changes +// to take effect. +// +// A rule must contain at least an EventPattern or ScheduleExpression. Rules +// with EventPatterns are triggered when a matching event is observed. Rules +// with ScheduleExpressions self-trigger based on the given schedule. A rule +// can have both an EventPattern and a ScheduleExpression, in which case the +// rule triggers on matching events as well as on a schedule. +// +// When you initially create a rule, you can optionally assign one or more tags +// to the rule. Tags can help you organize and categorize your resources. You +// can also use them to scope user permissions, by granting a user permission +// to access or change only rules with certain tag values. To use the PutRule +// operation and assign tags, you must have both the events:PutRule and events:TagResource +// permissions. +// +// If you are updating an existing rule, any tags you specify in the PutRule +// operation are ignored. To update the tags of an existing rule, use TagResource +// and UntagResource. +// +// Most services in AWS treat : or / as the same character in Amazon Resource +// Names (ARNs). However, EventBridge uses an exact match in event patterns +// and rules. Be sure to use the correct ARN characters when creating event +// patterns so that they match the ARN syntax in the event that you want to +// match. +// +// In EventBridge, you could create rules that lead to infinite loops, where +// a rule is fired repeatedly. For example, a rule might detect that ACLs have +// changed on an S3 bucket, and trigger software to change them to the desired +// state. If you don't write the rule carefully, the subsequent change to the +// ACLs fires the rule again, creating an infinite loop. +// +// To prevent this, write the rules so that the triggered actions don't refire +// the same rule. For example, your rule could fire only if ACLs are found to +// be in a bad state, instead of after any change. +// +// An infinite loop can quickly cause higher than expected charges. We recommend +// that you use budgeting, which alerts you when charges exceed your specified +// limit. For more information, see Managing Your Costs with Budgets (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation PutRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" +// The event pattern isn't valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutRule +func (c *CloudWatchEvents) PutRule(input *PutRuleInput) (*PutRuleOutput, error) { + req, out := c.PutRuleRequest(input) + return out, req.Send() +} + +// PutRuleWithContext is the same as PutRule with the addition of +// the ability to pass a context and additional request options. +// +// See PutRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) PutRuleWithContext(ctx aws.Context, input *PutRuleInput, opts ...request.Option) (*PutRuleOutput, error) { + req, out := c.PutRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutTargets = "PutTargets" + +// PutTargetsRequest generates a "aws/request.Request" representing the +// client's request for the PutTargets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutTargets for more information on using the PutTargets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutTargetsRequest method. +// req, resp := client.PutTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutTargets +func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *request.Request, output *PutTargetsOutput) { + op := &request.Operation{ + Name: opPutTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutTargetsInput{} + } + + output = &PutTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutTargets API operation for Amazon CloudWatch Events. +// +// Adds the specified targets to the specified rule, or updates the targets +// if they're already associated with the rule. +// +// Targets are the resources that are invoked when a rule is triggered. +// +// You can configure the following as targets in EventBridge: +// +// * EC2 instances +// +// * SSM Run Command +// +// * SSM Automation +// +// * AWS Lambda functions +// +// * Data streams in Amazon Kinesis Data Streams +// +// * Data delivery streams in Amazon Kinesis Data Firehose +// +// * Amazon ECS tasks +// +// * AWS Step Functions state machines +// +// * AWS Batch jobs +// +// * AWS CodeBuild projects +// +// * Pipelines in AWS CodePipeline +// +// * Amazon Inspector assessment templates +// +// * Amazon SNS topics +// +// * Amazon SQS queues, including FIFO queues +// +// * The default event bus of another AWS account +// +// Creating rules with built-in targets is supported only on the AWS Management +// Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances +// API call, EC2 StopInstances API call, and EC2 TerminateInstances API call. +// +// For some target types, PutTargets provides target-specific parameters. If +// the target is a Kinesis data stream, you can optionally specify which shard +// the event goes to by using the KinesisParameters argument. To invoke a command +// on multiple EC2 instances with one rule, you can use the RunCommandParameters +// field. +// +// To be able to make API calls against the resources that you own, Amazon EventBridge +// needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, +// EventBridge relies on resource-based policies. For EC2 instances, Kinesis +// data streams, and AWS Step Functions state machines, EventBridge relies on +// IAM roles that you specify in the RoleARN argument in PutTargets. For more +// information, see Authentication and Access Control (https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html) +// in the Amazon EventBridge User Guide. +// +// If another AWS account is in the same Region and has granted you permission +// (using PutPermission), you can send events to that account. Set that account's +// event bus as a target of the rules in your account. To send the matched events +// to the other account, specify that account's event bus as the Arn value when +// you run PutTargets. If your account sends events to another account, your +// account is charged for each sent event. Each event sent to another account +// is charged as a custom event. The account receiving the event isn't charged. +// For more information, see Amazon EventBridge Pricing (https://aws.amazon.com/eventbridge/pricing/). +// +// If you're setting an event bus in another account as the target and that +// account granted permission to your account through an organization instead +// of directly by the account ID, you must specify a RoleArn with proper permissions +// in the Target structure. For more information, see Sending and Receiving +// Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) +// in the Amazon EventBridge User Guide. +// +// For more information about enabling cross-account events, see PutPermission. +// +// Input, InputPath, and InputTransformer are mutually exclusive and optional +// parameters of a target. When a rule is triggered due to a matched event: +// +// * If none of the following arguments are specified for a target, the entire +// event is passed to the target in JSON format (unless the target is Amazon +// EC2 Run Command or Amazon ECS task, in which case nothing from the event +// is passed to the target). +// +// * If Input is specified in the form of valid JSON, then the matched event +// is overridden with this constant. +// +// * If InputPath is specified in the form of JSONPath (for example, $.detail), +// only the part of the event specified in the path is passed to the target +// (for example, only the detail part of the event is passed). +// +// * If InputTransformer is specified, one or more specified JSONPaths are +// extracted from the event and used as values in a template that you specify +// as the input to the target. +// +// When you specify InputPath or InputTransformer, you must use JSON dot notation, +// not bracket notation. +// +// When you add targets to a rule and the associated rule triggers soon after, +// new or updated targets might not be immediately invoked. Allow a short period +// of time for changes to take effect. +// +// This action can partially fail if too many requests are made at the same +// time. If that happens, FailedEntryCount is nonzero in the response, and each +// entry in FailedEntries provides the ID of the failed target and the error +// code. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation PutTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutTargets +func (c *CloudWatchEvents) PutTargets(input *PutTargetsInput) (*PutTargetsOutput, error) { + req, out := c.PutTargetsRequest(input) + return out, req.Send() +} + +// PutTargetsWithContext is the same as PutTargets with the addition of +// the ability to pass a context and additional request options. +// +// See PutTargets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) PutTargetsWithContext(ctx aws.Context, input *PutTargetsInput, opts ...request.Option) (*PutTargetsOutput, error) { + req, out := c.PutTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemovePermission = "RemovePermission" + +// RemovePermissionRequest generates a "aws/request.Request" representing the +// client's request for the RemovePermission operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemovePermission for more information on using the RemovePermission +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemovePermissionRequest method. +// req, resp := client.RemovePermissionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemovePermission +func (c *CloudWatchEvents) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { + op := &request.Operation{ + Name: opRemovePermission, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemovePermissionInput{} + } + + output = &RemovePermissionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemovePermission API operation for Amazon CloudWatch Events. +// +// Revokes the permission of another AWS account to be able to put events to +// the specified event bus. Specify the account to revoke by the StatementId +// value that you associated with the account when you granted it permission +// with PutPermission. You can find the StatementId by using DescribeEventBus. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation RemovePermission for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemovePermission +func (c *CloudWatchEvents) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { + req, out := c.RemovePermissionRequest(input) + return out, req.Send() +} + +// RemovePermissionWithContext is the same as RemovePermission with the addition of +// the ability to pass a context and additional request options. +// +// See RemovePermission for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { + req, out := c.RemovePermissionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveTargets = "RemoveTargets" + +// RemoveTargetsRequest generates a "aws/request.Request" representing the +// client's request for the RemoveTargets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveTargets for more information on using the RemoveTargets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveTargetsRequest method. +// req, resp := client.RemoveTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemoveTargets +func (c *CloudWatchEvents) RemoveTargetsRequest(input *RemoveTargetsInput) (req *request.Request, output *RemoveTargetsOutput) { + op := &request.Operation{ + Name: opRemoveTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveTargetsInput{} + } + + output = &RemoveTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveTargets API operation for Amazon CloudWatch Events. +// +// Removes the specified targets from the specified rule. When the rule is triggered, +// those targets are no longer be invoked. +// +// When you remove a target, when the associated rule triggers, removed targets +// might continue to be invoked. Allow a short period of time for changes to +// take effect. +// +// This action can partially fail if too many requests are made at the same +// time. If that happens, FailedEntryCount is non-zero in the response and each +// entry in FailedEntries provides the ID of the failed target and the error +// code. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation RemoveTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemoveTargets +func (c *CloudWatchEvents) RemoveTargets(input *RemoveTargetsInput) (*RemoveTargetsOutput, error) { + req, out := c.RemoveTargetsRequest(input) + return out, req.Send() +} + +// RemoveTargetsWithContext is the same as RemoveTargets with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveTargets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) RemoveTargetsWithContext(ctx aws.Context, input *RemoveTargetsInput, opts ...request.Option) (*RemoveTargetsOutput, error) { + req, out := c.RemoveTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TagResource +func (c *CloudWatchEvents) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon CloudWatch Events. +// +// Assigns one or more tags (key-value pairs) to the specified EventBridge resource. +// Tags can help you organize and categorize your resources. You can also use +// them to scope user permissions by granting a user permission to access or +// change only resources with certain tag values. In EventBridge, rules can +// be tagged. +// +// Tags don't have any semantic meaning to AWS and are interpreted strictly +// as strings of characters. +// +// You can use the TagResource action with a rule that already has tags. If +// you specify a new tag key for the rule, this tag is appended to the list +// of tags associated with the rule. If you specify a tag key that is already +// associated with the rule, the new tag value that you specify replaces the +// previous value for that tag. +// +// You can associate as many as 50 tags with a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TagResource +func (c *CloudWatchEvents) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTestEventPattern = "TestEventPattern" + +// TestEventPatternRequest generates a "aws/request.Request" representing the +// client's request for the TestEventPattern operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TestEventPattern for more information on using the TestEventPattern +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TestEventPatternRequest method. +// req, resp := client.TestEventPatternRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TestEventPattern +func (c *CloudWatchEvents) TestEventPatternRequest(input *TestEventPatternInput) (req *request.Request, output *TestEventPatternOutput) { + op := &request.Operation{ + Name: opTestEventPattern, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TestEventPatternInput{} + } + + output = &TestEventPatternOutput{} + req = c.newRequest(op, input, output) + return +} + +// TestEventPattern API operation for Amazon CloudWatch Events. +// +// Tests whether the specified event pattern matches the provided event. +// +// Most services in AWS treat : or / as the same character in Amazon Resource +// Names (ARNs). However, EventBridge uses an exact match in event patterns +// and rules. Be sure to use the correct ARN characters when creating event +// patterns so that they match the ARN syntax in the event that you want to +// match. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation TestEventPattern for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" +// The event pattern isn't valid. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TestEventPattern +func (c *CloudWatchEvents) TestEventPattern(input *TestEventPatternInput) (*TestEventPatternOutput, error) { + req, out := c.TestEventPatternRequest(input) + return out, req.Send() +} + +// TestEventPatternWithContext is the same as TestEventPattern with the addition of +// the ability to pass a context and additional request options. +// +// See TestEventPattern for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) TestEventPatternWithContext(ctx aws.Context, input *TestEventPatternInput, opts ...request.Option) (*TestEventPatternOutput, error) { + req, out := c.TestEventPatternRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/UntagResource +func (c *CloudWatchEvents) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon CloudWatch Events. +// +// Removes one or more tags from the specified EventBridge resource. In EventBridge, +// rules can be tagged. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudWatch Events's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/UntagResource +func (c *CloudWatchEvents) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudWatchEvents) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type ActivateEventSourceInput struct { + _ struct{} `type:"structure"` + + // The name of the partner event source to activate. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ActivateEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActivateEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActivateEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ActivateEventSourceInput) SetName(v string) *ActivateEventSourceInput { + s.Name = &v + return s +} + +type ActivateEventSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ActivateEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateEventSourceOutput) GoString() string { + return s.String() +} + +// This structure specifies the VPC subnets and security groups for the task +// and whether a public IP address is to be used. This structure is relevant +// only for ECS tasks that use the awsvpc network mode. +type AwsVpcConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies whether the task's elastic network interface receives a public + // IP address. You can specify ENABLED only when LaunchType in EcsParameters + // is set to FARGATE. + AssignPublicIp *string `type:"string" enum:"AssignPublicIp"` + + // Specifies the security groups associated with the task. These security groups + // must all be in the same VPC. You can specify as many as five security groups. + // If you don't specify a security group, the default security group for the + // VPC is used. + SecurityGroups []*string `type:"list"` + + // Specifies the subnets associated with the task. These subnets must all be + // in the same VPC. You can specify as many as 16 subnets. + // + // Subnets is a required field + Subnets []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s AwsVpcConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsVpcConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsVpcConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssignPublicIp sets the AssignPublicIp field's value. +func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration { + s.AssignPublicIp = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { + s.SecurityGroups = v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { + s.Subnets = v + return s +} + +// The array properties for the submitted job, such as the size of the array. +// The array size can be between 2 and 10,000. If you specify array properties +// for a job, it becomes an array job. This parameter is used only if the target +// is an AWS Batch job. +type BatchArrayProperties struct { + _ struct{} `type:"structure"` + + // The size of the array, if this is an array batch job. Valid values are integers + // between 2 and 10,000. + Size *int64 `type:"integer"` +} + +// String returns the string representation +func (s BatchArrayProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchArrayProperties) GoString() string { + return s.String() +} + +// SetSize sets the Size field's value. +func (s *BatchArrayProperties) SetSize(v int64) *BatchArrayProperties { + s.Size = &v + return s +} + +// The custom parameters to be used when the target is an AWS Batch job. +type BatchParameters struct { + _ struct{} `type:"structure"` + + // The array properties for the submitted job, such as the size of the array. + // The array size can be between 2 and 10,000. If you specify array properties + // for a job, it becomes an array job. This parameter is used only if the target + // is an AWS Batch job. + ArrayProperties *BatchArrayProperties `type:"structure"` + + // The ARN or name of the job definition to use if the event target is an AWS + // Batch job. This job definition must already exist. + // + // JobDefinition is a required field + JobDefinition *string `type:"string" required:"true"` + + // The name to use for this execution of the job, if the target is an AWS Batch + // job. + // + // JobName is a required field + JobName *string `type:"string" required:"true"` + + // The retry strategy to use for failed jobs if the target is an AWS Batch job. + // The retry strategy is the number of times to retry the failed job execution. + // Valid values are 1–10. When you specify a retry strategy here, it overrides + // the retry strategy defined in the job definition. + RetryStrategy *BatchRetryStrategy `type:"structure"` +} + +// String returns the string representation +func (s BatchParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchParameters"} + if s.JobDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("JobDefinition")) + } + if s.JobName == nil { + invalidParams.Add(request.NewErrParamRequired("JobName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArrayProperties sets the ArrayProperties field's value. +func (s *BatchParameters) SetArrayProperties(v *BatchArrayProperties) *BatchParameters { + s.ArrayProperties = v + return s +} + +// SetJobDefinition sets the JobDefinition field's value. +func (s *BatchParameters) SetJobDefinition(v string) *BatchParameters { + s.JobDefinition = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *BatchParameters) SetJobName(v string) *BatchParameters { + s.JobName = &v + return s +} + +// SetRetryStrategy sets the RetryStrategy field's value. +func (s *BatchParameters) SetRetryStrategy(v *BatchRetryStrategy) *BatchParameters { + s.RetryStrategy = v + return s +} + +// The retry strategy to use for failed jobs if the target is an AWS Batch job. +// If you specify a retry strategy here, it overrides the retry strategy defined +// in the job definition. +type BatchRetryStrategy struct { + _ struct{} `type:"structure"` + + // The number of times to attempt to retry, if the job fails. Valid values are + // 1–10. + Attempts *int64 `type:"integer"` +} + +// String returns the string representation +func (s BatchRetryStrategy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchRetryStrategy) GoString() string { + return s.String() +} + +// SetAttempts sets the Attempts field's value. +func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { + s.Attempts = &v + return s +} + +// A JSON string that you can use to limit the event bus permissions that you're +// granting to only accounts that fulfill the condition. Currently, the only +// supported condition is membership in a certain AWS organization. The string +// must contain Type, Key, and Value fields. The Value field specifies the ID +// of the AWS organization. The following is an example value for Condition: +// +// '{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' +type Condition struct { + _ struct{} `type:"structure"` + + // The key for the condition. Currently, the only supported key is aws:PrincipalOrgID. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // The type of condition. Currently, the only supported value is StringEquals. + // + // Type is a required field + Type *string `type:"string" required:"true"` + + // The value for the key. Currently, this must be the ID of the organization. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Condition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Condition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Condition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Condition"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Condition) SetKey(v string) *Condition { + s.Key = &v + return s +} + +// SetType sets the Type field's value. +func (s *Condition) SetType(v string) *Condition { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Condition) SetValue(v string) *Condition { + s.Value = &v + return s +} + +type CreateEventBusInput struct { + _ struct{} `type:"structure"` + + // If you're creating a partner event bus, this specifies the partner event + // source that the new event bus will be matched with. + EventSourceName *string `min:"1" type:"string"` + + // The name of the new event bus. + // + // The names of custom event buses can't contain the / character. You can't + // use the name default for a custom event bus because this name is already + // used for your account's default event bus. + // + // If this is a partner event bus, the name must exactly match the name of the + // partner event source that this event bus is matched to. This name will include + // the / character. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateEventBusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEventBusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEventBusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEventBusInput"} + if s.EventSourceName != nil && len(*s.EventSourceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventSourceName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventSourceName sets the EventSourceName field's value. +func (s *CreateEventBusInput) SetEventSourceName(v string) *CreateEventBusInput { + s.EventSourceName = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateEventBusInput) SetName(v string) *CreateEventBusInput { + s.Name = &v + return s +} + +type CreateEventBusOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the new event bus. + EventBusArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateEventBusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEventBusOutput) GoString() string { + return s.String() +} + +// SetEventBusArn sets the EventBusArn field's value. +func (s *CreateEventBusOutput) SetEventBusArn(v string) *CreateEventBusOutput { + s.EventBusArn = &v + return s +} + +type CreatePartnerEventSourceInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID of the customer who is permitted to create a matching + // partner event bus for this partner event source. + // + // Account is a required field + Account *string `min:"12" type:"string" required:"true"` + + // The name of the partner event source. This name must be unique and must be + // in the format partner_name/event_namespace/event_name . The AWS account that + // wants to use this partner event source must create a partner event bus with + // a name that matches the name of the partner event source. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreatePartnerEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePartnerEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePartnerEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePartnerEventSourceInput"} + if s.Account == nil { + invalidParams.Add(request.NewErrParamRequired("Account")) + } + if s.Account != nil && len(*s.Account) < 12 { + invalidParams.Add(request.NewErrParamMinLen("Account", 12)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccount sets the Account field's value. +func (s *CreatePartnerEventSourceInput) SetAccount(v string) *CreatePartnerEventSourceInput { + s.Account = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreatePartnerEventSourceInput) SetName(v string) *CreatePartnerEventSourceInput { + s.Name = &v + return s +} + +type CreatePartnerEventSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the partner event source. + EventSourceArn *string `type:"string"` +} + +// String returns the string representation +func (s CreatePartnerEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePartnerEventSourceOutput) GoString() string { + return s.String() +} + +// SetEventSourceArn sets the EventSourceArn field's value. +func (s *CreatePartnerEventSourceOutput) SetEventSourceArn(v string) *CreatePartnerEventSourceOutput { + s.EventSourceArn = &v + return s +} + +type DeactivateEventSourceInput struct { + _ struct{} `type:"structure"` + + // The name of the partner event source to deactivate. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeactivateEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeactivateEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeactivateEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeactivateEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeactivateEventSourceInput) SetName(v string) *DeactivateEventSourceInput { + s.Name = &v + return s +} + +type DeactivateEventSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeactivateEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeactivateEventSourceOutput) GoString() string { + return s.String() +} + +type DeleteEventBusInput struct { + _ struct{} `type:"structure"` + + // The name of the event bus to delete. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEventBusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventBusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventBusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventBusInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteEventBusInput) SetName(v string) *DeleteEventBusInput { + s.Name = &v + return s +} + +type DeleteEventBusOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteEventBusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventBusOutput) GoString() string { + return s.String() +} + +type DeletePartnerEventSourceInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID of the AWS customer that the event source was created + // for. + // + // Account is a required field + Account *string `min:"12" type:"string" required:"true"` + + // The name of the event source to delete. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePartnerEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePartnerEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePartnerEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePartnerEventSourceInput"} + if s.Account == nil { + invalidParams.Add(request.NewErrParamRequired("Account")) + } + if s.Account != nil && len(*s.Account) < 12 { + invalidParams.Add(request.NewErrParamMinLen("Account", 12)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccount sets the Account field's value. +func (s *DeletePartnerEventSourceInput) SetAccount(v string) *DeletePartnerEventSourceInput { + s.Account = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeletePartnerEventSourceInput) SetName(v string) *DeletePartnerEventSourceInput { + s.Name = &v + return s +} + +type DeletePartnerEventSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePartnerEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePartnerEventSourceOutput) GoString() string { + return s.String() +} + +type DeleteRuleInput struct { + _ struct{} `type:"structure"` + + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // If this is a managed rule, created by an AWS service on your behalf, you + // must specify Force as True to delete the rule. This parameter is ignored + // for rules that are not managed rules. You can check whether a rule is a managed + // rule by using DescribeRule or ListRules and checking the ManagedBy field + // of the response. + Force *bool `type:"boolean"` + + // The name of the rule. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *DeleteRuleInput) SetEventBusName(v string) *DeleteRuleInput { + s.EventBusName = &v + return s +} + +// SetForce sets the Force field's value. +func (s *DeleteRuleInput) SetForce(v bool) *DeleteRuleInput { + s.Force = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteRuleInput) SetName(v string) *DeleteRuleInput { + s.Name = &v + return s +} + +type DeleteRuleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRuleOutput) GoString() string { + return s.String() +} + +type DescribeEventBusInput struct { + _ struct{} `type:"structure"` + + // The name of the event bus to show details for. If you omit this, the default + // event bus is displayed. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeEventBusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventBusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventBusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventBusInput"} + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribeEventBusInput) SetName(v string) *DescribeEventBusInput { + s.Name = &v + return s +} + +type DescribeEventBusOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the account permitted to write events to + // the current account. + Arn *string `type:"string"` + + // The name of the event bus. Currently, this is always default. + Name *string `type:"string"` + + // The policy that enables the external account to send events to your account. + Policy *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventBusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventBusOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeEventBusOutput) SetArn(v string) *DescribeEventBusOutput { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeEventBusOutput) SetName(v string) *DescribeEventBusOutput { + s.Name = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *DescribeEventBusOutput) SetPolicy(v string) *DescribeEventBusOutput { + s.Policy = &v + return s +} + +type DescribeEventSourceInput struct { _ struct{} `type:"structure"` - // Specifies whether the task's elastic network interface receives a public - // IP address. You can specify ENABLED only when LaunchType in EcsParameters - // is set to FARGATE. - AssignPublicIp *string `type:"string" enum:"AssignPublicIp"` + // The name of the partner event source to display the details of. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} - // Specifies the security groups associated with the task. These security groups - // must all be in the same VPC. You can specify as many as five security groups. - // If you do not specify a security group, the default security group for the - // VPC is used. - SecurityGroups []*string `type:"list"` +// String returns the string representation +func (s DescribeEventSourceInput) String() string { + return awsutil.Prettify(s) +} - // Specifies the subnets associated with the task. These subnets must all be - // in the same VPC. You can specify as many as 16 subnets. +// GoString returns the string representation +func (s DescribeEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribeEventSourceInput) SetName(v string) *DescribeEventSourceInput { + s.Name = &v + return s +} + +type DescribeEventSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the partner event source. + Arn *string `type:"string"` + + // The name of the SaaS partner that created the event source. + CreatedBy *string `type:"string"` + + // The date and time that the event source was created. + CreationTime *time.Time `type:"timestamp"` + + // The date and time that the event source will expire if you don't create a + // matching event bus. + ExpirationTime *time.Time `type:"timestamp"` + + // The name of the partner event source. + Name *string `type:"string"` + + // The state of the event source. If it's ACTIVE, you have already created a + // matching event bus for this event source, and that event bus is active. If + // it's PENDING, either you haven't yet created a matching event bus, or that + // event bus is deactivated. If it's DELETED, you have created a matching event + // bus, but the event source has since been deleted. + State *string `type:"string" enum:"EventSourceState"` +} + +// String returns the string representation +func (s DescribeEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventSourceOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeEventSourceOutput) SetArn(v string) *DescribeEventSourceOutput { + s.Arn = &v + return s +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *DescribeEventSourceOutput) SetCreatedBy(v string) *DescribeEventSourceOutput { + s.CreatedBy = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeEventSourceOutput) SetCreationTime(v time.Time) *DescribeEventSourceOutput { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *DescribeEventSourceOutput) SetExpirationTime(v time.Time) *DescribeEventSourceOutput { + s.ExpirationTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeEventSourceOutput) SetName(v string) *DescribeEventSourceOutput { + s.Name = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeEventSourceOutput) SetState(v string) *DescribeEventSourceOutput { + s.State = &v + return s +} + +type DescribePartnerEventSourceInput struct { + _ struct{} `type:"structure"` + + // The name of the event source to display. // - // Subnets is a required field - Subnets []*string `type:"list" required:"true"` + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s AwsVpcConfiguration) String() string { +func (s DescribePartnerEventSourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AwsVpcConfiguration) GoString() string { +func (s DescribePartnerEventSourceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AwsVpcConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) +func (s *DescribePartnerEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePartnerEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { @@ -1868,99 +3976,229 @@ func (s *AwsVpcConfiguration) Validate() error { return nil } -// SetAssignPublicIp sets the AssignPublicIp field's value. -func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration { - s.AssignPublicIp = &v +// SetName sets the Name field's value. +func (s *DescribePartnerEventSourceInput) SetName(v string) *DescribePartnerEventSourceInput { + s.Name = &v return s } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { - s.SecurityGroups = v +type DescribePartnerEventSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the event source. + Arn *string `type:"string"` + + // The name of the event source. + Name *string `type:"string"` +} + +// String returns the string representation +func (s DescribePartnerEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePartnerEventSourceOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribePartnerEventSourceOutput) SetArn(v string) *DescribePartnerEventSourceOutput { + s.Arn = &v return s } -// SetSubnets sets the Subnets field's value. -func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { - s.Subnets = v +// SetName sets the Name field's value. +func (s *DescribePartnerEventSourceOutput) SetName(v string) *DescribePartnerEventSourceOutput { + s.Name = &v return s } -// The array properties for the submitted job, such as the size of the array. -// The array size can be between 2 and 10,000. If you specify array properties -// for a job, it becomes an array job. This parameter is used only if the target -// is an AWS Batch job. -type BatchArrayProperties struct { +type DescribeRuleInput struct { _ struct{} `type:"structure"` - // The size of the array, if this is an array batch job. Valid values are integers - // between 2 and 10,000. - Size *int64 `type:"integer"` + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // The name of the rule. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *DescribeRuleInput) SetEventBusName(v string) *DescribeRuleInput { + s.EventBusName = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeRuleInput) SetName(v string) *DescribeRuleInput { + s.Name = &v + return s +} + +type DescribeRuleOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the rule. + Arn *string `min:"1" type:"string"` + + // The description of the rule. + Description *string `type:"string"` + + // The event bus associated with the rule. + EventBusName *string `min:"1" type:"string"` + + // The event pattern. For more information, see Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // in the Amazon EventBridge User Guide. + EventPattern *string `type:"string"` + + // If this is a managed rule, created by an AWS service on your behalf, this + // field displays the principal name of the AWS service that created the rule. + ManagedBy *string `min:"1" type:"string"` + + // The name of the rule. + Name *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the IAM role associated with the rule. + RoleArn *string `min:"1" type:"string"` + + // The scheduling expression: for example, "cron(0 20 * * ? *)" or "rate(5 minutes)". + ScheduleExpression *string `type:"string"` + + // Specifies whether the rule is enabled or disabled. + State *string `type:"string" enum:"RuleState"` +} + +// String returns the string representation +func (s DescribeRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRuleOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeRuleOutput) SetArn(v string) *DescribeRuleOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DescribeRuleOutput) SetDescription(v string) *DescribeRuleOutput { + s.Description = &v + return s +} + +// SetEventBusName sets the EventBusName field's value. +func (s *DescribeRuleOutput) SetEventBusName(v string) *DescribeRuleOutput { + s.EventBusName = &v + return s +} + +// SetEventPattern sets the EventPattern field's value. +func (s *DescribeRuleOutput) SetEventPattern(v string) *DescribeRuleOutput { + s.EventPattern = &v + return s +} + +// SetManagedBy sets the ManagedBy field's value. +func (s *DescribeRuleOutput) SetManagedBy(v string) *DescribeRuleOutput { + s.ManagedBy = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeRuleOutput) SetName(v string) *DescribeRuleOutput { + s.Name = &v + return s } -// String returns the string representation -func (s BatchArrayProperties) String() string { - return awsutil.Prettify(s) +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeRuleOutput) SetRoleArn(v string) *DescribeRuleOutput { + s.RoleArn = &v + return s } -// GoString returns the string representation -func (s BatchArrayProperties) GoString() string { - return s.String() +// SetScheduleExpression sets the ScheduleExpression field's value. +func (s *DescribeRuleOutput) SetScheduleExpression(v string) *DescribeRuleOutput { + s.ScheduleExpression = &v + return s } -// SetSize sets the Size field's value. -func (s *BatchArrayProperties) SetSize(v int64) *BatchArrayProperties { - s.Size = &v +// SetState sets the State field's value. +func (s *DescribeRuleOutput) SetState(v string) *DescribeRuleOutput { + s.State = &v return s } -// The custom parameters to be used when the target is an AWS Batch job. -type BatchParameters struct { +type DisableRuleInput struct { _ struct{} `type:"structure"` - // The array properties for the submitted job, such as the size of the array. - // The array size can be between 2 and 10,000. If you specify array properties - // for a job, it becomes an array job. This parameter is used only if the target - // is an AWS Batch job. - ArrayProperties *BatchArrayProperties `type:"structure"` - - // The ARN or name of the job definition to use if the event target is an AWS - // Batch job. This job definition must already exist. - // - // JobDefinition is a required field - JobDefinition *string `type:"string" required:"true"` + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` - // The name to use for this execution of the job, if the target is an AWS Batch - // job. + // The name of the rule. // - // JobName is a required field - JobName *string `type:"string" required:"true"` - - // The retry strategy to use for failed jobs, if the target is an AWS Batch - // job. The retry strategy is the number of times to retry the failed job execution. - // Valid values are 1–10. When you specify a retry strategy here, it overrides - // the retry strategy defined in the job definition. - RetryStrategy *BatchRetryStrategy `type:"structure"` + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s BatchParameters) String() string { +func (s DisableRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s BatchParameters) GoString() string { +func (s DisableRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *BatchParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BatchParameters"} - if s.JobDefinition == nil { - invalidParams.Add(request.NewErrParamRequired("JobDefinition")) +func (s *DisableRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) } - if s.JobName == nil { - invalidParams.Add(request.NewErrParamRequired("JobName")) + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { @@ -1969,105 +4207,100 @@ func (s *BatchParameters) Validate() error { return nil } -// SetArrayProperties sets the ArrayProperties field's value. -func (s *BatchParameters) SetArrayProperties(v *BatchArrayProperties) *BatchParameters { - s.ArrayProperties = v - return s -} - -// SetJobDefinition sets the JobDefinition field's value. -func (s *BatchParameters) SetJobDefinition(v string) *BatchParameters { - s.JobDefinition = &v - return s -} - -// SetJobName sets the JobName field's value. -func (s *BatchParameters) SetJobName(v string) *BatchParameters { - s.JobName = &v +// SetEventBusName sets the EventBusName field's value. +func (s *DisableRuleInput) SetEventBusName(v string) *DisableRuleInput { + s.EventBusName = &v return s } -// SetRetryStrategy sets the RetryStrategy field's value. -func (s *BatchParameters) SetRetryStrategy(v *BatchRetryStrategy) *BatchParameters { - s.RetryStrategy = v +// SetName sets the Name field's value. +func (s *DisableRuleInput) SetName(v string) *DisableRuleInput { + s.Name = &v return s } -// The retry strategy to use for failed jobs, if the target is an AWS Batch -// job. If you specify a retry strategy here, it overrides the retry strategy -// defined in the job definition. -type BatchRetryStrategy struct { +type DisableRuleOutput struct { _ struct{} `type:"structure"` - - // The number of times to attempt to retry, if the job fails. Valid values are - // 1–10. - Attempts *int64 `type:"integer"` } // String returns the string representation -func (s BatchRetryStrategy) String() string { +func (s DisableRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s BatchRetryStrategy) GoString() string { +func (s DisableRuleOutput) GoString() string { return s.String() } -// SetAttempts sets the Attempts field's value. -func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { - s.Attempts = &v - return s -} - -// A JSON string which you can use to limit the event bus permissions you are -// granting to only accounts that fulfill the condition. Currently, the only -// supported condition is membership in a certain AWS organization. The string -// must contain Type, Key, and Value fields. The Value field specifies the ID -// of the AWS organization. Following is an example value for Condition: -// -// '{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' -type Condition struct { +// The custom parameters to be used when the target is an Amazon ECS task. +type EcsParameters struct { _ struct{} `type:"structure"` - // Specifies the key for the condition. Currently the only supported key is - // aws:PrincipalOrgID. + // Specifies an ECS task group for the task. The maximum length is 255 characters. + Group *string `type:"string"` + + // Specifies the launch type on which your task is running. The launch type + // that you specify here must match one of the launch type (compatibilities) + // of the target task. The FARGATE value is supported only in the Regions where + // AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate + // on Amazon ECS (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) + // in the Amazon Elastic Container Service Developer Guide. + LaunchType *string `type:"string" enum:"LaunchType"` + + // Use this structure if the ECS task uses the awsvpc network mode. This structure + // specifies the VPC subnets and security groups associated with the task and + // whether a public IP address is to be used. This structure is required if + // LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. // - // Key is a required field - Key *string `type:"string" required:"true"` + // If you specify NetworkConfiguration when the target ECS task doesn't use + // the awsvpc network mode, the task fails. + NetworkConfiguration *NetworkConfiguration `type:"structure"` - // Specifies the type of condition. Currently the only supported value is StringEquals. + // Specifies the platform version for the task. Specify only the numeric portion + // of the platform version, such as 1.1.0. // - // Type is a required field - Type *string `type:"string" required:"true"` + // This structure is used only if LaunchType is FARGATE. For more information + // about valid platform versions, see AWS Fargate Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. + PlatformVersion *string `type:"string"` + + // The number of tasks to create based on TaskDefinition. The default is 1. + TaskCount *int64 `min:"1" type:"integer"` - // Specifies the value for the key. Currently, this must be the ID of the organization. + // The ARN of the task definition to use if the event target is an Amazon ECS + // task. // - // Value is a required field - Value *string `type:"string" required:"true"` + // TaskDefinitionArn is a required field + TaskDefinitionArn *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s Condition) String() string { +func (s EcsParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Condition) GoString() string { +func (s EcsParameters) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *Condition) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Condition"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) +func (s *EcsParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EcsParameters"} + if s.TaskCount != nil && *s.TaskCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("TaskCount", 1)) } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) + if s.TaskDefinitionArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDefinitionArn")) } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) + if s.TaskDefinitionArn != nil && len(*s.TaskDefinitionArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskDefinitionArn", 1)) + } + if s.NetworkConfiguration != nil { + if err := s.NetworkConfiguration.Validate(); err != nil { + invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -2076,33 +4309,48 @@ func (s *Condition) Validate() error { return nil } -// SetKey sets the Key field's value. -func (s *Condition) SetKey(v string) *Condition { - s.Key = &v +// SetGroup sets the Group field's value. +func (s *EcsParameters) SetGroup(v string) *EcsParameters { + s.Group = &v return s } -// SetType sets the Type field's value. -func (s *Condition) SetType(v string) *Condition { - s.Type = &v +// SetLaunchType sets the LaunchType field's value. +func (s *EcsParameters) SetLaunchType(v string) *EcsParameters { + s.LaunchType = &v return s } -// SetValue sets the Value field's value. -func (s *Condition) SetValue(v string) *Condition { - s.Value = &v +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *EcsParameters) SetNetworkConfiguration(v *NetworkConfiguration) *EcsParameters { + s.NetworkConfiguration = v return s } -type DeleteRuleInput struct { +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *EcsParameters) SetPlatformVersion(v string) *EcsParameters { + s.PlatformVersion = &v + return s +} + +// SetTaskCount sets the TaskCount field's value. +func (s *EcsParameters) SetTaskCount(v int64) *EcsParameters { + s.TaskCount = &v + return s +} + +// SetTaskDefinitionArn sets the TaskDefinitionArn field's value. +func (s *EcsParameters) SetTaskDefinitionArn(v string) *EcsParameters { + s.TaskDefinitionArn = &v + return s +} + +type EnableRuleInput struct { _ struct{} `type:"structure"` - // If this is a managed rule, created by an AWS service on your behalf, you - // must specify Force as True to delete the rule. This parameter is ignored - // for rules that are not managed rules. You can check whether a rule is a managed - // rule by using DescribeRule or ListRules and checking the ManagedBy field - // of the response. - Force *bool `type:"boolean"` + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` // The name of the rule. // @@ -2111,18 +4359,21 @@ type DeleteRuleInput struct { } // String returns the string representation -func (s DeleteRuleInput) String() string { +func (s EnableRuleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRuleInput) GoString() string { +func (s EnableRuleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} +func (s *EnableRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -2136,115 +4387,231 @@ func (s *DeleteRuleInput) Validate() error { return nil } -// SetForce sets the Force field's value. -func (s *DeleteRuleInput) SetForce(v bool) *DeleteRuleInput { - s.Force = &v +// SetEventBusName sets the EventBusName field's value. +func (s *EnableRuleInput) SetEventBusName(v string) *EnableRuleInput { + s.EventBusName = &v return s } // SetName sets the Name field's value. -func (s *DeleteRuleInput) SetName(v string) *DeleteRuleInput { +func (s *EnableRuleInput) SetName(v string) *EnableRuleInput { s.Name = &v return s } -type DeleteRuleOutput struct { +type EnableRuleOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteRuleOutput) String() string { +func (s EnableRuleOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRuleOutput) GoString() string { +func (s EnableRuleOutput) GoString() string { return s.String() } -type DescribeEventBusInput struct { +// An event bus receives events from a source and routes them to rules associated +// with that event bus. Your account's default event bus receives rules from +// AWS services. A custom event bus can receive rules from AWS services as well +// as your custom applications and services. A partner event bus receives events +// from an event source created by an SaaS partner. These events come from the +// partners services or applications. +type EventBus struct { _ struct{} `type:"structure"` + + // The ARN of the event bus. + Arn *string `type:"string"` + + // The name of the event bus. + Name *string `type:"string"` + + // The permissions policy of the event bus, describing which other AWS accounts + // can write events to this event bus. + Policy *string `type:"string"` } // String returns the string representation -func (s DescribeEventBusInput) String() string { +func (s EventBus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventBusInput) GoString() string { +func (s EventBus) GoString() string { return s.String() } -type DescribeEventBusOutput struct { +// SetArn sets the Arn field's value. +func (s *EventBus) SetArn(v string) *EventBus { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *EventBus) SetName(v string) *EventBus { + s.Name = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *EventBus) SetPolicy(v string) *EventBus { + s.Policy = &v + return s +} + +// A partner event source is created by an SaaS partner. If a customer creates +// a partner event bus that matches this event source, that AWS account can +// receive events from the partner's applications or services. +type EventSource struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the account permitted to write events to - // the current account. + // The ARN of the event source. Arn *string `type:"string"` - // The name of the event bus. Currently, this is always default. + // The name of the partner that created the event source. + CreatedBy *string `type:"string"` + + // The date and time when the event source was created. + CreationTime *time.Time `type:"timestamp"` + + // The date and time when the event source will expire if the AWS account doesn't + // create a matching event bus for it. + ExpirationTime *time.Time `type:"timestamp"` + + // The name of the event source. Name *string `type:"string"` - // The policy that enables the external account to send events to your account. - Policy *string `type:"string"` + // The state of the event source. If it's ACTIVE, you have already created a + // matching event bus for this event source, and that event bus is active. If + // it's PENDING, either you haven't yet created a matching event bus, or that + // event bus is deactivated. If it's DELETED, you have created a matching event + // bus, but the event source has since been deleted. + State *string `type:"string" enum:"EventSourceState"` } // String returns the string representation -func (s DescribeEventBusOutput) String() string { +func (s EventSource) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEventBusOutput) GoString() string { +func (s EventSource) GoString() string { return s.String() } // SetArn sets the Arn field's value. -func (s *DescribeEventBusOutput) SetArn(v string) *DescribeEventBusOutput { +func (s *EventSource) SetArn(v string) *EventSource { s.Arn = &v return s } +// SetCreatedBy sets the CreatedBy field's value. +func (s *EventSource) SetCreatedBy(v string) *EventSource { + s.CreatedBy = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *EventSource) SetCreationTime(v time.Time) *EventSource { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *EventSource) SetExpirationTime(v time.Time) *EventSource { + s.ExpirationTime = &v + return s +} + // SetName sets the Name field's value. -func (s *DescribeEventBusOutput) SetName(v string) *DescribeEventBusOutput { +func (s *EventSource) SetName(v string) *EventSource { s.Name = &v return s } -// SetPolicy sets the Policy field's value. -func (s *DescribeEventBusOutput) SetPolicy(v string) *DescribeEventBusOutput { - s.Policy = &v +// SetState sets the State field's value. +func (s *EventSource) SetState(v string) *EventSource { + s.State = &v return s } -type DescribeRuleInput struct { +// Contains the parameters needed for you to provide custom input to a target +// based on one or more pieces of data extracted from the event. +type InputTransformer struct { _ struct{} `type:"structure"` - // The name of the rule. + // Map of JSON paths to be extracted from the event. You can then insert these + // in the template in InputTemplate to produce the output to be sent to the + // target. // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` + // InputPathsMap is an array key-value pairs, where each value is a valid JSON + // path. You can have as many as 10 key-value pairs. You must use JSON dot notation, + // not bracket notation. + // + // The keys can't start with "AWS". + InputPathsMap map[string]*string `type:"map"` + + // Input template where you specify placeholders that will be filled with the + // values of the keys from InputPathsMap to customize the data sent to the target. + // Enclose each InputPathsMaps value in brackets: . The InputTemplate + // must be valid JSON. + // + // If InputTemplate is a JSON object (surrounded by curly braces), the following + // restrictions apply: + // + // * The placeholder can't be used as an object key + // + // * Object values can't include quote marks + // + // The following example shows the syntax for using InputPathsMap and InputTemplate. + // + // "InputTransformer": + // + // { + // + // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, + // + // "InputTemplate": " is in state " + // + // } + // + // To have the InputTemplate include quote marks within a JSON string, escape + // each quote marks with a slash, as in the following example: + // + // "InputTransformer": + // + // { + // + // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, + // + // "InputTemplate": " is in state \"\"" + // + // } + // + // InputTemplate is a required field + InputTemplate *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s DescribeRuleInput) String() string { +func (s InputTransformer) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeRuleInput) GoString() string { +func (s InputTransformer) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *InputTransformer) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputTransformer"} + if s.InputTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("InputTemplate")) } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + if s.InputTemplate != nil && len(*s.InputTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputTemplate", 1)) } if invalidParams.Len() > 0 { @@ -2253,127 +4620,99 @@ func (s *DescribeRuleInput) Validate() error { return nil } -// SetName sets the Name field's value. -func (s *DescribeRuleInput) SetName(v string) *DescribeRuleInput { - s.Name = &v +// SetInputPathsMap sets the InputPathsMap field's value. +func (s *InputTransformer) SetInputPathsMap(v map[string]*string) *InputTransformer { + s.InputPathsMap = v return s } -type DescribeRuleOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the rule. - Arn *string `min:"1" type:"string"` - - // The description of the rule. - Description *string `type:"string"` - - // The event pattern. For more information, see Events and Event Patterns (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. - EventPattern *string `type:"string"` - - // If this is a managed rule, created by an AWS service on your behalf, this - // field displays the principal name of the AWS service that created the rule. - ManagedBy *string `min:"1" type:"string"` - - // The name of the rule. - Name *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the IAM role associated with the rule. - RoleArn *string `min:"1" type:"string"` +// SetInputTemplate sets the InputTemplate field's value. +func (s *InputTransformer) SetInputTemplate(v string) *InputTransformer { + s.InputTemplate = &v + return s +} - // The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". - ScheduleExpression *string `type:"string"` +// This object enables you to specify a JSON path to extract from the event +// and use as the partition key for the Amazon Kinesis data stream so that you +// can control the shard that the event goes to. If you don't include this parameter, +// the default is to use the eventId as the partition key. +type KinesisParameters struct { + _ struct{} `type:"structure"` - // Specifies whether the rule is enabled or disabled. - State *string `type:"string" enum:"RuleState"` + // The JSON path to be extracted from the event and used as the partition key. + // For more information, see Amazon Kinesis Streams Key Concepts (https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key) + // in the Amazon Kinesis Streams Developer Guide. + // + // PartitionKeyPath is a required field + PartitionKeyPath *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeRuleOutput) String() string { +func (s KinesisParameters) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeRuleOutput) GoString() string { +func (s KinesisParameters) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *DescribeRuleOutput) SetArn(v string) *DescribeRuleOutput { - s.Arn = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeRuleOutput) SetDescription(v string) *DescribeRuleOutput { - s.Description = &v - return s -} - -// SetEventPattern sets the EventPattern field's value. -func (s *DescribeRuleOutput) SetEventPattern(v string) *DescribeRuleOutput { - s.EventPattern = &v - return s -} - -// SetManagedBy sets the ManagedBy field's value. -func (s *DescribeRuleOutput) SetManagedBy(v string) *DescribeRuleOutput { - s.ManagedBy = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisParameters"} + if s.PartitionKeyPath == nil { + invalidParams.Add(request.NewErrParamRequired("PartitionKeyPath")) + } -// SetName sets the Name field's value. -func (s *DescribeRuleOutput) SetName(v string) *DescribeRuleOutput { - s.Name = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetRoleArn sets the RoleArn field's value. -func (s *DescribeRuleOutput) SetRoleArn(v string) *DescribeRuleOutput { - s.RoleArn = &v +// SetPartitionKeyPath sets the PartitionKeyPath field's value. +func (s *KinesisParameters) SetPartitionKeyPath(v string) *KinesisParameters { + s.PartitionKeyPath = &v return s } -// SetScheduleExpression sets the ScheduleExpression field's value. -func (s *DescribeRuleOutput) SetScheduleExpression(v string) *DescribeRuleOutput { - s.ScheduleExpression = &v - return s -} +type ListEventBusesInput struct { + _ struct{} `type:"structure"` -// SetState sets the State field's value. -func (s *DescribeRuleOutput) SetState(v string) *DescribeRuleOutput { - s.State = &v - return s -} + // Specifying this limits the number of results returned by this operation. + // The operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` -type DisableRuleInput struct { - _ struct{} `type:"structure"` + // Specifying this limits the results to only those event buses with names that + // start with the specified prefix. + NamePrefix *string `min:"1" type:"string"` - // The name of the rule. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` + // The token returned by a previous call to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DisableRuleInput) String() string { +func (s ListEventBusesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisableRuleInput) GoString() string { +func (s ListEventBusesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisableRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *ListEventBusesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEventBusesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -2382,94 +4721,94 @@ func (s *DisableRuleInput) Validate() error { return nil } -// SetName sets the Name field's value. -func (s *DisableRuleInput) SetName(v string) *DisableRuleInput { - s.Name = &v +// SetLimit sets the Limit field's value. +func (s *ListEventBusesInput) SetLimit(v int64) *ListEventBusesInput { + s.Limit = &v return s } -type DisableRuleOutput struct { +// SetNamePrefix sets the NamePrefix field's value. +func (s *ListEventBusesInput) SetNamePrefix(v string) *ListEventBusesInput { + s.NamePrefix = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEventBusesInput) SetNextToken(v string) *ListEventBusesInput { + s.NextToken = &v + return s +} + +type ListEventBusesOutput struct { _ struct{} `type:"structure"` + + // This list of event buses. + EventBuses []*EventBus `type:"list"` + + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DisableRuleOutput) String() string { +func (s ListEventBusesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisableRuleOutput) GoString() string { +func (s ListEventBusesOutput) GoString() string { return s.String() } -// The custom parameters to be used when the target is an Amazon ECS task. -type EcsParameters struct { - _ struct{} `type:"structure"` - - // Specifies an ECS task group for the task. The maximum length is 255 characters. - Group *string `type:"string"` - - // Specifies the launch type on which your task is running. The launch type - // that you specify here must match one of the launch type (compatibilities) - // of the target task. The FARGATE value is supported only in the Regions where - // AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate - // on Amazon ECS (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) - // in the Amazon Elastic Container Service Developer Guide. - LaunchType *string `type:"string" enum:"LaunchType"` +// SetEventBuses sets the EventBuses field's value. +func (s *ListEventBusesOutput) SetEventBuses(v []*EventBus) *ListEventBusesOutput { + s.EventBuses = v + return s +} - // Use this structure if the ECS task uses the awsvpc network mode. This structure - // specifies the VPC subnets and security groups associated with the task, and - // whether a public IP address is to be used. This structure is required if - // LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. - // - // If you specify NetworkConfiguration when the target ECS task does not use - // the awsvpc network mode, the task fails. - NetworkConfiguration *NetworkConfiguration `type:"structure"` +// SetNextToken sets the NextToken field's value. +func (s *ListEventBusesOutput) SetNextToken(v string) *ListEventBusesOutput { + s.NextToken = &v + return s +} - // Specifies the platform version for the task. Specify only the numeric portion - // of the platform version, such as 1.1.0. - // - // This structure is used only if LaunchType is FARGATE. For more information - // about valid platform versions, see AWS Fargate Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) - // in the Amazon Elastic Container Service Developer Guide. - PlatformVersion *string `type:"string"` +type ListEventSourcesInput struct { + _ struct{} `type:"structure"` - // The number of tasks to create based on TaskDefinition. The default is 1. - TaskCount *int64 `min:"1" type:"integer"` + // Specifying this limits the number of results returned by this operation. + // The operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` - // The ARN of the task definition to use if the event target is an Amazon ECS - // task. - // - // TaskDefinitionArn is a required field - TaskDefinitionArn *string `min:"1" type:"string" required:"true"` + // Specifying this limits the results to only those partner event sources with + // names that start with the specified prefix. + NamePrefix *string `min:"1" type:"string"` + + // The token returned by a previous call to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s EcsParameters) String() string { +func (s ListEventSourcesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EcsParameters) GoString() string { +func (s ListEventSourcesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *EcsParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EcsParameters"} - if s.TaskCount != nil && *s.TaskCount < 1 { - invalidParams.Add(request.NewErrParamMinValue("TaskCount", 1)) - } - if s.TaskDefinitionArn == nil { - invalidParams.Add(request.NewErrParamRequired("TaskDefinitionArn")) +func (s *ListEventSourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEventSourcesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.TaskDefinitionArn != nil && len(*s.TaskDefinitionArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TaskDefinitionArn", 1)) + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) } - if s.NetworkConfiguration != nil { - if err := s.NetworkConfiguration.Validate(); err != nil { - invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) - } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -2478,69 +4817,99 @@ func (s *EcsParameters) Validate() error { return nil } -// SetGroup sets the Group field's value. -func (s *EcsParameters) SetGroup(v string) *EcsParameters { - s.Group = &v +// SetLimit sets the Limit field's value. +func (s *ListEventSourcesInput) SetLimit(v int64) *ListEventSourcesInput { + s.Limit = &v return s } -// SetLaunchType sets the LaunchType field's value. -func (s *EcsParameters) SetLaunchType(v string) *EcsParameters { - s.LaunchType = &v +// SetNamePrefix sets the NamePrefix field's value. +func (s *ListEventSourcesInput) SetNamePrefix(v string) *ListEventSourcesInput { + s.NamePrefix = &v return s } -// SetNetworkConfiguration sets the NetworkConfiguration field's value. -func (s *EcsParameters) SetNetworkConfiguration(v *NetworkConfiguration) *EcsParameters { - s.NetworkConfiguration = v +// SetNextToken sets the NextToken field's value. +func (s *ListEventSourcesInput) SetNextToken(v string) *ListEventSourcesInput { + s.NextToken = &v return s } -// SetPlatformVersion sets the PlatformVersion field's value. -func (s *EcsParameters) SetPlatformVersion(v string) *EcsParameters { - s.PlatformVersion = &v - return s +type ListEventSourcesOutput struct { + _ struct{} `type:"structure"` + + // The list of event sources. + EventSources []*EventSource `type:"list"` + + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` } -// SetTaskCount sets the TaskCount field's value. -func (s *EcsParameters) SetTaskCount(v int64) *EcsParameters { - s.TaskCount = &v +// String returns the string representation +func (s ListEventSourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEventSourcesOutput) GoString() string { + return s.String() +} + +// SetEventSources sets the EventSources field's value. +func (s *ListEventSourcesOutput) SetEventSources(v []*EventSource) *ListEventSourcesOutput { + s.EventSources = v return s } -// SetTaskDefinitionArn sets the TaskDefinitionArn field's value. -func (s *EcsParameters) SetTaskDefinitionArn(v string) *EcsParameters { - s.TaskDefinitionArn = &v +// SetNextToken sets the NextToken field's value. +func (s *ListEventSourcesOutput) SetNextToken(v string) *ListEventSourcesOutput { + s.NextToken = &v return s } -type EnableRuleInput struct { +type ListPartnerEventSourceAccountsInput struct { _ struct{} `type:"structure"` - // The name of the rule. + // The name of the partner event source to display account information about. // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` + // EventSourceName is a required field + EventSourceName *string `min:"1" type:"string" required:"true"` + + // Specifying this limits the number of results returned by this operation. + // The operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` + + // The token returned by a previous call to this operation. Specifying this + // retrieves the next set of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s EnableRuleInput) String() string { +func (s ListPartnerEventSourceAccountsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EnableRuleInput) GoString() string { +func (s ListPartnerEventSourceAccountsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *EnableRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableRuleInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *ListPartnerEventSourceAccountsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPartnerEventSourceAccountsInput"} + if s.EventSourceName == nil { + invalidParams.Add(request.NewErrParamRequired("EventSourceName")) } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + if s.EventSourceName != nil && len(*s.EventSourceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventSourceName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -2549,101 +4918,100 @@ func (s *EnableRuleInput) Validate() error { return nil } -// SetName sets the Name field's value. -func (s *EnableRuleInput) SetName(v string) *EnableRuleInput { - s.Name = &v +// SetEventSourceName sets the EventSourceName field's value. +func (s *ListPartnerEventSourceAccountsInput) SetEventSourceName(v string) *ListPartnerEventSourceAccountsInput { + s.EventSourceName = &v return s } -type EnableRuleOutput struct { +// SetLimit sets the Limit field's value. +func (s *ListPartnerEventSourceAccountsInput) SetLimit(v int64) *ListPartnerEventSourceAccountsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourceAccountsInput) SetNextToken(v string) *ListPartnerEventSourceAccountsInput { + s.NextToken = &v + return s +} + +type ListPartnerEventSourceAccountsOutput struct { _ struct{} `type:"structure"` + + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` + + // The list of partner event sources returned by the operation. + PartnerEventSourceAccounts []*PartnerEventSourceAccount `type:"list"` } // String returns the string representation -func (s EnableRuleOutput) String() string { +func (s ListPartnerEventSourceAccountsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EnableRuleOutput) GoString() string { +func (s ListPartnerEventSourceAccountsOutput) GoString() string { return s.String() } -// Contains the parameters needed for you to provide custom input to a target -// based on one or more pieces of data extracted from the event. -type InputTransformer struct { +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourceAccountsOutput) SetNextToken(v string) *ListPartnerEventSourceAccountsOutput { + s.NextToken = &v + return s +} + +// SetPartnerEventSourceAccounts sets the PartnerEventSourceAccounts field's value. +func (s *ListPartnerEventSourceAccountsOutput) SetPartnerEventSourceAccounts(v []*PartnerEventSourceAccount) *ListPartnerEventSourceAccountsOutput { + s.PartnerEventSourceAccounts = v + return s +} + +type ListPartnerEventSourcesInput struct { _ struct{} `type:"structure"` - // Map of JSON paths to be extracted from the event. You can then insert these - // in the template in InputTemplate to produce the output you want to be sent - // to the target. - // - // InputPathsMap is an array key-value pairs, where each value is a valid JSON - // path. You can have as many as 10 key-value pairs. You must use JSON dot notation, - // not bracket notation. - // - // The keys cannot start with "AWS." - InputPathsMap map[string]*string `type:"map"` + // pecifying this limits the number of results returned by this operation. The + // operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` - // Input template where you specify placeholders that will be filled with the - // values of the keys from InputPathsMap to customize the data sent to the target. - // Enclose each InputPathsMaps value in brackets: The InputTemplate - // must be valid JSON. - // - // If InputTemplate is a JSON object (surrounded by curly braces), the following - // restrictions apply: - // - // * The placeholder cannot be used as an object key. - // - // * Object values cannot include quote marks. - // - // The following example shows the syntax for using InputPathsMap and InputTemplate. + // If you specify this, the results are limited to only those partner event + // sources that start with the string you specify. // - // "InputTransformer": - // - // { - // - // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, - // - // "InputTemplate": " is in state " - // - // } - // - // To have the InputTemplate include quote marks within a JSON string, escape - // each quote marks with a slash, as in the following example: - // - // "InputTransformer": - // - // { - // - // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, - // - // "InputTemplate": " is in state \"\"" - // - // } - // - // InputTemplate is a required field - InputTemplate *string `min:"1" type:"string" required:"true"` + // NamePrefix is a required field + NamePrefix *string `min:"1" type:"string" required:"true"` + + // The token returned by a previous call to this operation. Specifying this + // retrieves the next set of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s InputTransformer) String() string { +func (s ListPartnerEventSourcesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InputTransformer) GoString() string { +func (s ListPartnerEventSourcesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *InputTransformer) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InputTransformer"} - if s.InputTemplate == nil { - invalidParams.Add(request.NewErrParamRequired("InputTemplate")) +func (s *ListPartnerEventSourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPartnerEventSourcesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } - if s.InputTemplate != nil && len(*s.InputTemplate) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InputTemplate", 1)) + if s.NamePrefix == nil { + invalidParams.Add(request.NewErrParamRequired("NamePrefix")) + } + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -2652,65 +5020,64 @@ func (s *InputTransformer) Validate() error { return nil } -// SetInputPathsMap sets the InputPathsMap field's value. -func (s *InputTransformer) SetInputPathsMap(v map[string]*string) *InputTransformer { - s.InputPathsMap = v +// SetLimit sets the Limit field's value. +func (s *ListPartnerEventSourcesInput) SetLimit(v int64) *ListPartnerEventSourcesInput { + s.Limit = &v return s } -// SetInputTemplate sets the InputTemplate field's value. -func (s *InputTransformer) SetInputTemplate(v string) *InputTransformer { - s.InputTemplate = &v +// SetNamePrefix sets the NamePrefix field's value. +func (s *ListPartnerEventSourcesInput) SetNamePrefix(v string) *ListPartnerEventSourcesInput { + s.NamePrefix = &v return s } -// This object enables you to specify a JSON path to extract from the event -// and use as the partition key for the Amazon Kinesis data stream, so that -// you can control the shard to which the event goes. If you do not include -// this parameter, the default is to use the eventId as the partition key. -type KinesisParameters struct { +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourcesInput) SetNextToken(v string) *ListPartnerEventSourcesInput { + s.NextToken = &v + return s +} + +type ListPartnerEventSourcesOutput struct { _ struct{} `type:"structure"` - // The JSON path to be extracted from the event and used as the partition key. - // For more information, see Amazon Kinesis Streams Key Concepts (https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key) - // in the Amazon Kinesis Streams Developer Guide. - // - // PartitionKeyPath is a required field - PartitionKeyPath *string `type:"string" required:"true"` + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` + + // The list of partner event sources returned by the operation. + PartnerEventSources []*PartnerEventSource `type:"list"` } // String returns the string representation -func (s KinesisParameters) String() string { +func (s ListPartnerEventSourcesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s KinesisParameters) GoString() string { +func (s ListPartnerEventSourcesOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisParameters"} - if s.PartitionKeyPath == nil { - invalidParams.Add(request.NewErrParamRequired("PartitionKeyPath")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourcesOutput) SetNextToken(v string) *ListPartnerEventSourcesOutput { + s.NextToken = &v + return s } -// SetPartitionKeyPath sets the PartitionKeyPath field's value. -func (s *KinesisParameters) SetPartitionKeyPath(v string) *KinesisParameters { - s.PartitionKeyPath = &v +// SetPartnerEventSources sets the PartnerEventSources field's value. +func (s *ListPartnerEventSourcesOutput) SetPartnerEventSources(v []*PartnerEventSource) *ListPartnerEventSourcesOutput { + s.PartnerEventSources = v return s } type ListRuleNamesByTargetInput struct { _ struct{} `type:"structure"` + // Limits the results to show only the rules associated with the specified event + // bus. + EventBusName *string `min:"1" type:"string"` + // The maximum number of results to return. Limit *int64 `min:"1" type:"integer"` @@ -2736,6 +5103,9 @@ func (s ListRuleNamesByTargetInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ListRuleNamesByTargetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListRuleNamesByTargetInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } @@ -2755,6 +5125,12 @@ func (s *ListRuleNamesByTargetInput) Validate() error { return nil } +// SetEventBusName sets the EventBusName field's value. +func (s *ListRuleNamesByTargetInput) SetEventBusName(v string) *ListRuleNamesByTargetInput { + s.EventBusName = &v + return s +} + // SetLimit sets the Limit field's value. func (s *ListRuleNamesByTargetInput) SetLimit(v int64) *ListRuleNamesByTargetInput { s.Limit = &v @@ -2809,6 +5185,10 @@ func (s *ListRuleNamesByTargetOutput) SetRuleNames(v []*string) *ListRuleNamesBy type ListRulesInput struct { _ struct{} `type:"structure"` + // Limits the results to show only the rules associated with the specified event + // bus. + EventBusName *string `min:"1" type:"string"` + // The maximum number of results to return. Limit *int64 `min:"1" type:"integer"` @@ -2832,6 +5212,9 @@ func (s ListRulesInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ListRulesInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } @@ -2848,6 +5231,12 @@ func (s *ListRulesInput) Validate() error { return nil } +// SetEventBusName sets the EventBusName field's value. +func (s *ListRulesInput) SetEventBusName(v string) *ListRulesInput { + s.EventBusName = &v + return s +} + // SetLimit sets the Limit field's value. func (s *ListRulesInput) SetLimit(v int64) *ListRulesInput { s.Limit = &v @@ -2902,7 +5291,7 @@ func (s *ListRulesOutput) SetRules(v []*Rule) *ListRulesOutput { type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the CloudWatch Events rule for which you want to view tags. + // The ARN of the rule for which you want to view tags. // // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` @@ -2943,7 +5332,7 @@ func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResource type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` - // The list of tag keys and values associated with the rule you specified + // The list of tag keys and values associated with the rule that you specified. Tags []*Tag `type:"list"` } @@ -2966,6 +5355,10 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput type ListTargetsByRuleInput struct { _ struct{} `type:"structure"` + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + // The maximum number of results to return. Limit *int64 `min:"1" type:"integer"` @@ -2991,6 +5384,9 @@ func (s ListTargetsByRuleInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ListTargetsByRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListTargetsByRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) } @@ -3010,6 +5406,12 @@ func (s *ListTargetsByRuleInput) Validate() error { return nil } +// SetEventBusName sets the EventBusName field's value. +func (s *ListTargetsByRuleInput) SetEventBusName(v string) *ListTargetsByRuleInput { + s.EventBusName = &v + return s +} + // SetLimit sets the Limit field's value. func (s *ListTargetsByRuleInput) SetLimit(v int64) *ListTargetsByRuleInput { s.Limit = &v @@ -3066,7 +5468,7 @@ type NetworkConfiguration struct { _ struct{} `type:"structure"` // Use this structure to specify the VPC subnets and security groups for the - // task, and whether a public IP address is to be used. This structure is relevant + // task and whether a public IP address is to be used. This structure is relevant // only for ECS tasks that use the awsvpc network mode. AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` } @@ -3102,6 +5504,97 @@ func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *N return s } +// A partner event source is created by an SaaS partner. If a customer creates +// a partner event bus that matches this event source, that AWS account can +// receive events from the partner's applications or services. +type PartnerEventSource struct { + _ struct{} `type:"structure"` + + // The ARN of the partner event source. + Arn *string `type:"string"` + + // The name of the partner event source. + Name *string `type:"string"` +} + +// String returns the string representation +func (s PartnerEventSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PartnerEventSource) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *PartnerEventSource) SetArn(v string) *PartnerEventSource { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *PartnerEventSource) SetName(v string) *PartnerEventSource { + s.Name = &v + return s +} + +// The AWS account that a partner event source has been offered to. +type PartnerEventSourceAccount struct { + _ struct{} `type:"structure"` + + // The AWS account ID that the partner event source was offered to. + Account *string `min:"12" type:"string"` + + // The date and time when the event source was created. + CreationTime *time.Time `type:"timestamp"` + + // The date and time when the event source will expire if the AWS account doesn't + // create a matching event bus for it. + ExpirationTime *time.Time `type:"timestamp"` + + // The state of the event source. If it's ACTIVE, you have already created a + // matching event bus for this event source, and that event bus is active. If + // it's PENDING, either you haven't yet created a matching event bus, or that + // event bus is deactivated. If it's DELETED, you have created a matching event + // bus, but the event source has since been deleted. + State *string `type:"string" enum:"EventSourceState"` +} + +// String returns the string representation +func (s PartnerEventSourceAccount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PartnerEventSourceAccount) GoString() string { + return s.String() +} + +// SetAccount sets the Account field's value. +func (s *PartnerEventSourceAccount) SetAccount(v string) *PartnerEventSourceAccount { + s.Account = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *PartnerEventSourceAccount) SetCreationTime(v time.Time) *PartnerEventSourceAccount { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *PartnerEventSourceAccount) SetExpirationTime(v time.Time) *PartnerEventSourceAccount { + s.ExpirationTime = &v + return s +} + +// SetState sets the State field's value. +func (s *PartnerEventSourceAccount) SetState(v string) *PartnerEventSourceAccount { + s.State = &v + return s +} + type PutEventsInput struct { _ struct{} `type:"structure"` @@ -3132,6 +5625,16 @@ func (s *PutEventsInput) Validate() error { if s.Entries != nil && len(s.Entries) < 1 { invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) } + if s.Entries != nil { + for i, v := range s.Entries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3183,22 +5686,26 @@ func (s *PutEventsOutput) SetFailedEntryCount(v int64) *PutEventsOutput { type PutEventsRequestEntry struct { _ struct{} `type:"structure"` - // A valid JSON string. There is no other schema imposed. The JSON string may + // A valid JSON string. There is no other schema imposed. The JSON string can // contain fields and nested subobjects. Detail *string `type:"string"` - // Free-form string used to decide what fields to expect in the event detail. + // Free-form string used to decide which fields to expect in the event detail. DetailType *string `type:"string"` - // AWS resources, identified by Amazon Resource Name (ARN), which the event - // primarily concerns. Any number, including zero, may be present. + // The event bus that will receive the event. Only the rules that are associated + // with this event bus can match the event. + EventBusName *string `min:"1" type:"string"` + + // AWS resources, identified by Amazon Resource Name (ARN), that the event primarily + // concerns. Any number, including zero, can be present. Resources []*string `type:"list"` // The source of the event. This field is required. Source *string `type:"string"` - // The time stamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). - // If no time stamp is provided, the time stamp of the PutEvents call is used. + // The timestamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). + // If no timestamp is provided, the timestamp of the PutEvents call is used. Time *time.Time `type:"timestamp"` } @@ -3212,6 +5719,19 @@ func (s PutEventsRequestEntry) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventsRequestEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventsRequestEntry"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDetail sets the Detail field's value. func (s *PutEventsRequestEntry) SetDetail(v string) *PutEventsRequestEntry { s.Detail = &v @@ -3224,6 +5744,12 @@ func (s *PutEventsRequestEntry) SetDetailType(v string) *PutEventsRequestEntry { return s } +// SetEventBusName sets the EventBusName field's value. +func (s *PutEventsRequestEntry) SetEventBusName(v string) *PutEventsRequestEntry { + s.EventBusName = &v + return s +} + // SetResources sets the Resources field's value. func (s *PutEventsRequestEntry) SetResources(v []*string) *PutEventsRequestEntry { s.Resources = v @@ -3284,10 +5810,189 @@ func (s *PutEventsResultEntry) SetEventId(v string) *PutEventsResultEntry { return s } +type PutPartnerEventsInput struct { + _ struct{} `type:"structure"` + + // The list of events to write to the event bus. + // + // Entries is a required field + Entries []*PutPartnerEventsRequestEntry `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s PutPartnerEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPartnerEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPartnerEventsInput"} + if s.Entries == nil { + invalidParams.Add(request.NewErrParamRequired("Entries")) + } + if s.Entries != nil && len(s.Entries) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEntries sets the Entries field's value. +func (s *PutPartnerEventsInput) SetEntries(v []*PutPartnerEventsRequestEntry) *PutPartnerEventsInput { + s.Entries = v + return s +} + +type PutPartnerEventsOutput struct { + _ struct{} `type:"structure"` + + // The list of events from this operation that were successfully written to + // the partner event bus. + Entries []*PutPartnerEventsResultEntry `type:"list"` + + // The number of events from this operation that couldn't be written to the + // partner event bus. + FailedEntryCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s PutPartnerEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsOutput) GoString() string { + return s.String() +} + +// SetEntries sets the Entries field's value. +func (s *PutPartnerEventsOutput) SetEntries(v []*PutPartnerEventsResultEntry) *PutPartnerEventsOutput { + s.Entries = v + return s +} + +// SetFailedEntryCount sets the FailedEntryCount field's value. +func (s *PutPartnerEventsOutput) SetFailedEntryCount(v int64) *PutPartnerEventsOutput { + s.FailedEntryCount = &v + return s +} + +// The details about an event generated by an SaaS partner. +type PutPartnerEventsRequestEntry struct { + _ struct{} `type:"structure"` + + // A valid JSON string. There is no other schema imposed. The JSON string can + // contain fields and nested subobjects. + Detail *string `type:"string"` + + // A free-form string used to decide which fields to expect in the event detail. + DetailType *string `type:"string"` + + // AWS resources, identified by Amazon Resource Name (ARN), that the event primarily + // concerns. Any number, including zero, can be present. + Resources []*string `type:"list"` + + // The event source that is generating the evntry. + Source *string `type:"string"` + + // The date and time of the event. + Time *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s PutPartnerEventsRequestEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsRequestEntry) GoString() string { + return s.String() +} + +// SetDetail sets the Detail field's value. +func (s *PutPartnerEventsRequestEntry) SetDetail(v string) *PutPartnerEventsRequestEntry { + s.Detail = &v + return s +} + +// SetDetailType sets the DetailType field's value. +func (s *PutPartnerEventsRequestEntry) SetDetailType(v string) *PutPartnerEventsRequestEntry { + s.DetailType = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *PutPartnerEventsRequestEntry) SetResources(v []*string) *PutPartnerEventsRequestEntry { + s.Resources = v + return s +} + +// SetSource sets the Source field's value. +func (s *PutPartnerEventsRequestEntry) SetSource(v string) *PutPartnerEventsRequestEntry { + s.Source = &v + return s +} + +// SetTime sets the Time field's value. +func (s *PutPartnerEventsRequestEntry) SetTime(v time.Time) *PutPartnerEventsRequestEntry { + s.Time = &v + return s +} + +// Represents an event that a partner tried to generate but failed. +type PutPartnerEventsResultEntry struct { + _ struct{} `type:"structure"` + + // The error code that indicates why the event submission failed. + ErrorCode *string `type:"string"` + + // The error message that explains why the event submission failed. + ErrorMessage *string `type:"string"` + + // The ID of the event. + EventId *string `type:"string"` +} + +// String returns the string representation +func (s PutPartnerEventsResultEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsResultEntry) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *PutPartnerEventsResultEntry) SetErrorCode(v string) *PutPartnerEventsResultEntry { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *PutPartnerEventsResultEntry) SetErrorMessage(v string) *PutPartnerEventsResultEntry { + s.ErrorMessage = &v + return s +} + +// SetEventId sets the EventId field's value. +func (s *PutPartnerEventsResultEntry) SetEventId(v string) *PutPartnerEventsResultEntry { + s.EventId = &v + return s +} + type PutPermissionInput struct { _ struct{} `type:"structure"` - // The action that you are enabling the other account to perform. Currently, + // The action that you're enabling the other account to perform. Currently, // this must be events:PutEvents. // // Action is a required field @@ -3295,31 +6000,35 @@ type PutPermissionInput struct { // This parameter enables you to limit the permission to accounts that fulfill // a certain condition, such as being a member of a certain AWS organization. - // For more information about AWS Organizations, see What Is AWS Organizations + // For more information about AWS Organizations, see What Is AWS Organizations? // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) // in the AWS Organizations User Guide. // - // If you specify Condition with an AWS organization ID, and specify "*" as - // the value for Principal, you grant permission to all the accounts in the - // named organization. + // If you specify Condition with an AWS organization ID and specify "*" as the + // value for Principal, you grant permission to all the accounts in the named + // organization. // - // The Condition is a JSON string which must contain Type, Key, and Value fields. + // The Condition is a JSON string that must contain Type, Key, and Value fields. Condition *Condition `type:"structure"` + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + // The 12-digit AWS account ID that you are permitting to put events to your // default event bus. Specify "*" to permit any account to put events to your // default event bus. // // If you specify "*" without specifying Condition, avoid creating rules that - // may match undesirable events. To create more secure rules, make sure that + // might match undesirable events. To create more secure rules, make sure that // the event pattern for each rule contains an account field with a specific - // account ID from which to receive events. Rules with an account field do not - // match any events sent from other accounts. + // account ID to receive events from. Rules with an account field don't match + // any events sent from other accounts. // // Principal is a required field Principal *string `min:"1" type:"string" required:"true"` - // An identifier string for the external account that you are granting permissions + // An identifier string for the external account that you're granting permissions // to. If you later want to revoke the permission for this external account, // specify this StatementId when you run RemovePermission. // @@ -3346,6 +6055,9 @@ func (s *PutPermissionInput) Validate() error { if s.Action != nil && len(*s.Action) < 1 { invalidParams.Add(request.NewErrParamMinLen("Action", 1)) } + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Principal == nil { invalidParams.Add(request.NewErrParamRequired("Principal")) } @@ -3382,6 +6094,12 @@ func (s *PutPermissionInput) SetCondition(v *Condition) *PutPermissionInput { return s } +// SetEventBusName sets the EventBusName field's value. +func (s *PutPermissionInput) SetEventBusName(v string) *PutPermissionInput { + s.EventBusName = &v + return s +} + // SetPrincipal sets the Principal field's value. func (s *PutPermissionInput) SetPrincipal(v string) *PutPermissionInput { s.Principal = &v @@ -3414,11 +6132,15 @@ type PutRuleInput struct { // A description of the rule. Description *string `type:"string"` - // The event pattern. For more information, see Events and Event Patterns (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. + // The event bus to associate with this rule. If you omit this, the default + // event bus is used. + EventBusName *string `min:"1" type:"string"` + + // The event pattern. For more information, see Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // in the Amazon EventBridge User Guide. EventPattern *string `type:"string"` - // The name of the rule that you are creating or updating. + // The name of the rule that you're creating or updating. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -3426,7 +6148,7 @@ type PutRuleInput struct { // The Amazon Resource Name (ARN) of the IAM role associated with the rule. RoleArn *string `min:"1" type:"string"` - // The scheduling expression. For example, "cron(0 20 * * ? *)" or "rate(5 minutes)". + // The scheduling expression: for example, "cron(0 20 * * ? *)" or "rate(5 minutes)". ScheduleExpression *string `type:"string"` // Indicates whether the rule is enabled or disabled. @@ -3449,6 +6171,9 @@ func (s PutRuleInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PutRuleInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -3481,6 +6206,12 @@ func (s *PutRuleInput) SetDescription(v string) *PutRuleInput { return s } +// SetEventBusName sets the EventBusName field's value. +func (s *PutRuleInput) SetEventBusName(v string) *PutRuleInput { + s.EventBusName = &v + return s +} + // SetEventPattern sets the EventPattern field's value. func (s *PutRuleInput) SetEventPattern(v string) *PutRuleInput { s.EventPattern = &v @@ -3543,6 +6274,10 @@ func (s *PutRuleOutput) SetRuleArn(v string) *PutRuleOutput { type PutTargetsInput struct { _ struct{} `type:"structure"` + // The name of the event bus associated with the rule. If you omit this, the + // default event bus is used. + EventBusName *string `min:"1" type:"string"` + // The name of the rule. // // Rule is a required field @@ -3567,6 +6302,9 @@ func (s PutTargetsInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PutTargetsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutTargetsInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Rule == nil { invalidParams.Add(request.NewErrParamRequired("Rule")) } @@ -3596,6 +6334,12 @@ func (s *PutTargetsInput) Validate() error { return nil } +// SetEventBusName sets the EventBusName field's value. +func (s *PutTargetsInput) SetEventBusName(v string) *PutTargetsInput { + s.EventBusName = &v + return s +} + // SetRule sets the Rule field's value. func (s *PutTargetsInput) SetRule(v string) *PutTargetsInput { s.Rule = &v @@ -3687,6 +6431,10 @@ func (s *PutTargetsResultEntry) SetTargetId(v string) *PutTargetsResultEntry { type RemovePermissionInput struct { _ struct{} `type:"structure"` + // The name of the event bus to revoke permissions for. If you omit this, the + // default event bus is used. + EventBusName *string `min:"1" type:"string"` + // The statement ID corresponding to the account that is no longer allowed to // put events to the default event bus. // @@ -3707,6 +6455,9 @@ func (s RemovePermissionInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *RemovePermissionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.StatementId == nil { invalidParams.Add(request.NewErrParamRequired("StatementId")) } @@ -3720,6 +6471,12 @@ func (s *RemovePermissionInput) Validate() error { return nil } +// SetEventBusName sets the EventBusName field's value. +func (s *RemovePermissionInput) SetEventBusName(v string) *RemovePermissionInput { + s.EventBusName = &v + return s +} + // SetStatementId sets the StatementId field's value. func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput { s.StatementId = &v @@ -3743,11 +6500,14 @@ func (s RemovePermissionOutput) GoString() string { type RemoveTargetsInput struct { _ struct{} `type:"structure"` - // If this is a managed rule, created by an AWS service on your behalf, you - // must specify Force as True to remove targets. This parameter is ignored for - // rules that are not managed rules. You can check whether a rule is a managed - // rule by using DescribeRule or ListRules and checking the ManagedBy field - // of the response. + // The name of the event bus associated with the rule. + EventBusName *string `min:"1" type:"string"` + + // If this is a managed rule created by an AWS service on your behalf, you must + // specify Force as True to remove targets. This parameter is ignored for rules + // that aren't managed rules. You can check whether a rule is a managed rule + // by using DescribeRule or ListRules and checking the ManagedBy field of the + // response. Force *bool `type:"boolean"` // The IDs of the targets to remove from the rule. @@ -3774,6 +6534,9 @@ func (s RemoveTargetsInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *RemoveTargetsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RemoveTargetsInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } if s.Ids == nil { invalidParams.Add(request.NewErrParamRequired("Ids")) } @@ -3793,6 +6556,12 @@ func (s *RemoveTargetsInput) Validate() error { return nil } +// SetEventBusName sets the EventBusName field's value. +func (s *RemoveTargetsInput) SetEventBusName(v string) *RemoveTargetsInput { + s.EventBusName = &v + return s +} + // SetForce sets the Force field's value. func (s *RemoveTargetsInput) SetForce(v bool) *RemoveTargetsInput { s.Force = &v @@ -3887,7 +6656,7 @@ func (s *RemoveTargetsResultEntry) SetTargetId(v string) *RemoveTargetsResultEnt return s } -// Contains information about a rule in Amazon CloudWatch Events. +// Contains information about a rule in Amazon EventBridge. type Rule struct { _ struct{} `type:"structure"` @@ -3897,13 +6666,15 @@ type Rule struct { // The description of the rule. Description *string `type:"string"` - // The event pattern of the rule. For more information, see Events and Event - // Patterns (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. + // The event bus associated with the rule. + EventBusName *string `min:"1" type:"string"` + + // 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) + // in the Amazon EventBridge User Guide. EventPattern *string `type:"string"` - // If the rule was created on behalf of your account by an AWS service, this - // field displays the principal name of the service that created the rule. + // If an AWS service created the rule on behalf of your account, this field + // displays the principal name of the service that created the rule. ManagedBy *string `min:"1" type:"string"` // The name of the rule. @@ -3912,7 +6683,7 @@ type Rule struct { // The Amazon Resource Name (ARN) of the role that is used for target invocation. RoleArn *string `min:"1" type:"string"` - // The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". + // The scheduling expression: for example, "cron(0 20 * * ? *)" or "rate(5 minutes)". ScheduleExpression *string `type:"string"` // The state of the rule. @@ -3941,6 +6712,12 @@ func (s *Rule) SetDescription(v string) *Rule { return s } +// SetEventBusName sets the EventBusName field's value. +func (s *Rule) SetEventBusName(v string) *Rule { + s.EventBusName = &v + return s +} + // SetEventPattern sets the EventPattern field's value. func (s *Rule) SetEventPattern(v string) *Rule { s.EventPattern = &v @@ -4033,7 +6810,7 @@ func (s *RunCommandParameters) SetRunCommandTargets(v []*RunCommandTarget) *RunC // Information about the EC2 instances that are to be sent the command, specified // as key-value pairs. Each RunCommandTarget block can include only one key, -// but this key may specify multiple values. +// but this key can specify multiple values. type RunCommandTarget struct { _ struct{} `type:"structure"` @@ -4118,13 +6895,13 @@ func (s *SqsParameters) SetMessageGroupId(v string) *SqsParameters { return s } -// A key-value pair associated with an AWS resource. In CloudWatch Events, rules -// support tagging. +// A key-value pair associated with an AWS resource. In EventBridge, rules support +// tagging. type Tag struct { _ struct{} `type:"structure"` - // A string you can use to assign a value. The combination of tag keys and values - // can help you organize and categorize your resources. + // A string that you can use to assign a value. The combination of tag keys + // and values can help you organize and categorize your resources. // // Key is a required field Key *string `min:"1" type:"string" required:"true"` @@ -4179,7 +6956,7 @@ func (s *Tag) SetValue(v string) *Tag { type TagResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the CloudWatch Events rule that you're adding tags to. + // The ARN of the rule that you're adding tags to. // // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` @@ -4258,12 +7035,12 @@ func (s TagResourceOutput) GoString() string { // Targets are the resources to be invoked when a rule is triggered. For a complete // list of services and resources that can be set as a target, see PutTargets. // -// If you are setting the event bus of another account as the target, and that +// If you're setting the event bus of another account as the target and that // account granted permission to your account through an organization instead -// of directly by the account ID, then you must specify a RoleArn with proper -// permissions in the Target structure. For more information, see Sending and -// Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) -// in the Amazon CloudWatch Events User Guide. +// of directly by the account ID, you must specify a RoleArn with proper permissions +// in the Target structure. For more information, see Sending and Receiving +// Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) +// in the Amazon EventBridge User Guide. type Target struct { _ struct{} `type:"structure"` @@ -4277,7 +7054,7 @@ type Target struct { // in the AWS Batch User Guide. BatchParameters *BatchParameters `type:"structure"` - // Contains the Amazon ECS task definition and task count to be used, if the + // Contains the Amazon ECS task definition and task count to be used if the // event target is an Amazon ECS task. For more information about Amazon ECS // tasks, see Task Definitions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) // in the Amazon EC2 Container Service Developer Guide. @@ -4303,9 +7080,9 @@ type Target struct { // then use that data to send customized input to the target. InputTransformer *InputTransformer `type:"structure"` - // The custom parameter you can use to control the shard assignment, when the - // target is a Kinesis data stream. If you do not include this parameter, the - // default is to use the eventId as the partition key. + // The custom parameter that you can use to control the shard assignment when + // the target is a Kinesis data stream. If you don't include this parameter, + // the default is to use the eventId as the partition key. KinesisParameters *KinesisParameters `type:"structure"` // The Amazon Resource Name (ARN) of the IAM role to be used for this target @@ -4457,8 +7234,8 @@ type TestEventPatternInput struct { // Event is a required field Event *string `type:"string" required:"true"` - // The event pattern. For more information, see Events and Event Patterns (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html) - // in the Amazon CloudWatch Events User Guide. + // The event pattern. For more information, see Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // in the Amazon EventBridge User Guide. // // EventPattern is a required field EventPattern *string `type:"string" required:"true"` @@ -4528,7 +7305,7 @@ func (s *TestEventPatternOutput) SetResult(v bool) *TestEventPatternOutput { type UntagResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the CloudWatch Events rule from which you are removing tags. + // The ARN of the rule that you're removing tags from. // // ResourceARN is a required field ResourceARN *string `min:"1" type:"string" required:"true"` @@ -4602,6 +7379,17 @@ const ( AssignPublicIpDisabled = "DISABLED" ) +const ( + // EventSourceStatePending is a EventSourceState enum value + EventSourceStatePending = "PENDING" + + // EventSourceStateActive is a EventSourceState enum value + EventSourceStateActive = "ACTIVE" + + // EventSourceStateDeleted is a EventSourceState enum value + EventSourceStateDeleted = "DELETED" +) + const ( // LaunchTypeEc2 is a LaunchType enum value LaunchTypeEc2 = "EC2" diff --git a/service/cloudwatchevents/cloudwatcheventsiface/interface.go b/service/cloudwatchevents/cloudwatcheventsiface/interface.go index 9e8d2cf8cf8..0110cce4a90 100644 --- a/service/cloudwatchevents/cloudwatcheventsiface/interface.go +++ b/service/cloudwatchevents/cloudwatcheventsiface/interface.go @@ -26,7 +26,7 @@ import ( // // myFunc uses an SDK service client to make a request to // // Amazon CloudWatch Events. // func myFunc(svc cloudwatcheventsiface.CloudWatchEventsAPI) bool { -// // Make svc.DeleteRule request +// // Make svc.ActivateEventSource request // } // // func main() { @@ -42,7 +42,7 @@ import ( // type mockCloudWatchEventsClient struct { // cloudwatcheventsiface.CloudWatchEventsAPI // } -// func (m *mockCloudWatchEventsClient) DeleteRule(input *cloudwatchevents.DeleteRuleInput) (*cloudwatchevents.DeleteRuleOutput, error) { +// func (m *mockCloudWatchEventsClient) ActivateEventSource(input *cloudwatchevents.ActivateEventSourceInput) (*cloudwatchevents.ActivateEventSourceOutput, error) { // // mock response/functionality // } // @@ -60,6 +60,30 @@ import ( // and waiters. Its suggested to use the pattern above for testing, or using // tooling to generate mocks to satisfy the interfaces. type CloudWatchEventsAPI interface { + ActivateEventSource(*cloudwatchevents.ActivateEventSourceInput) (*cloudwatchevents.ActivateEventSourceOutput, error) + ActivateEventSourceWithContext(aws.Context, *cloudwatchevents.ActivateEventSourceInput, ...request.Option) (*cloudwatchevents.ActivateEventSourceOutput, error) + ActivateEventSourceRequest(*cloudwatchevents.ActivateEventSourceInput) (*request.Request, *cloudwatchevents.ActivateEventSourceOutput) + + CreateEventBus(*cloudwatchevents.CreateEventBusInput) (*cloudwatchevents.CreateEventBusOutput, error) + CreateEventBusWithContext(aws.Context, *cloudwatchevents.CreateEventBusInput, ...request.Option) (*cloudwatchevents.CreateEventBusOutput, error) + CreateEventBusRequest(*cloudwatchevents.CreateEventBusInput) (*request.Request, *cloudwatchevents.CreateEventBusOutput) + + CreatePartnerEventSource(*cloudwatchevents.CreatePartnerEventSourceInput) (*cloudwatchevents.CreatePartnerEventSourceOutput, error) + CreatePartnerEventSourceWithContext(aws.Context, *cloudwatchevents.CreatePartnerEventSourceInput, ...request.Option) (*cloudwatchevents.CreatePartnerEventSourceOutput, error) + CreatePartnerEventSourceRequest(*cloudwatchevents.CreatePartnerEventSourceInput) (*request.Request, *cloudwatchevents.CreatePartnerEventSourceOutput) + + DeactivateEventSource(*cloudwatchevents.DeactivateEventSourceInput) (*cloudwatchevents.DeactivateEventSourceOutput, error) + DeactivateEventSourceWithContext(aws.Context, *cloudwatchevents.DeactivateEventSourceInput, ...request.Option) (*cloudwatchevents.DeactivateEventSourceOutput, error) + DeactivateEventSourceRequest(*cloudwatchevents.DeactivateEventSourceInput) (*request.Request, *cloudwatchevents.DeactivateEventSourceOutput) + + DeleteEventBus(*cloudwatchevents.DeleteEventBusInput) (*cloudwatchevents.DeleteEventBusOutput, error) + DeleteEventBusWithContext(aws.Context, *cloudwatchevents.DeleteEventBusInput, ...request.Option) (*cloudwatchevents.DeleteEventBusOutput, error) + DeleteEventBusRequest(*cloudwatchevents.DeleteEventBusInput) (*request.Request, *cloudwatchevents.DeleteEventBusOutput) + + DeletePartnerEventSource(*cloudwatchevents.DeletePartnerEventSourceInput) (*cloudwatchevents.DeletePartnerEventSourceOutput, error) + DeletePartnerEventSourceWithContext(aws.Context, *cloudwatchevents.DeletePartnerEventSourceInput, ...request.Option) (*cloudwatchevents.DeletePartnerEventSourceOutput, error) + DeletePartnerEventSourceRequest(*cloudwatchevents.DeletePartnerEventSourceInput) (*request.Request, *cloudwatchevents.DeletePartnerEventSourceOutput) + DeleteRule(*cloudwatchevents.DeleteRuleInput) (*cloudwatchevents.DeleteRuleOutput, error) DeleteRuleWithContext(aws.Context, *cloudwatchevents.DeleteRuleInput, ...request.Option) (*cloudwatchevents.DeleteRuleOutput, error) DeleteRuleRequest(*cloudwatchevents.DeleteRuleInput) (*request.Request, *cloudwatchevents.DeleteRuleOutput) @@ -68,6 +92,14 @@ type CloudWatchEventsAPI interface { DescribeEventBusWithContext(aws.Context, *cloudwatchevents.DescribeEventBusInput, ...request.Option) (*cloudwatchevents.DescribeEventBusOutput, error) DescribeEventBusRequest(*cloudwatchevents.DescribeEventBusInput) (*request.Request, *cloudwatchevents.DescribeEventBusOutput) + DescribeEventSource(*cloudwatchevents.DescribeEventSourceInput) (*cloudwatchevents.DescribeEventSourceOutput, error) + DescribeEventSourceWithContext(aws.Context, *cloudwatchevents.DescribeEventSourceInput, ...request.Option) (*cloudwatchevents.DescribeEventSourceOutput, error) + DescribeEventSourceRequest(*cloudwatchevents.DescribeEventSourceInput) (*request.Request, *cloudwatchevents.DescribeEventSourceOutput) + + DescribePartnerEventSource(*cloudwatchevents.DescribePartnerEventSourceInput) (*cloudwatchevents.DescribePartnerEventSourceOutput, error) + DescribePartnerEventSourceWithContext(aws.Context, *cloudwatchevents.DescribePartnerEventSourceInput, ...request.Option) (*cloudwatchevents.DescribePartnerEventSourceOutput, error) + DescribePartnerEventSourceRequest(*cloudwatchevents.DescribePartnerEventSourceInput) (*request.Request, *cloudwatchevents.DescribePartnerEventSourceOutput) + DescribeRule(*cloudwatchevents.DescribeRuleInput) (*cloudwatchevents.DescribeRuleOutput, error) DescribeRuleWithContext(aws.Context, *cloudwatchevents.DescribeRuleInput, ...request.Option) (*cloudwatchevents.DescribeRuleOutput, error) DescribeRuleRequest(*cloudwatchevents.DescribeRuleInput) (*request.Request, *cloudwatchevents.DescribeRuleOutput) @@ -80,6 +112,22 @@ type CloudWatchEventsAPI interface { EnableRuleWithContext(aws.Context, *cloudwatchevents.EnableRuleInput, ...request.Option) (*cloudwatchevents.EnableRuleOutput, error) EnableRuleRequest(*cloudwatchevents.EnableRuleInput) (*request.Request, *cloudwatchevents.EnableRuleOutput) + ListEventBuses(*cloudwatchevents.ListEventBusesInput) (*cloudwatchevents.ListEventBusesOutput, error) + ListEventBusesWithContext(aws.Context, *cloudwatchevents.ListEventBusesInput, ...request.Option) (*cloudwatchevents.ListEventBusesOutput, error) + ListEventBusesRequest(*cloudwatchevents.ListEventBusesInput) (*request.Request, *cloudwatchevents.ListEventBusesOutput) + + ListEventSources(*cloudwatchevents.ListEventSourcesInput) (*cloudwatchevents.ListEventSourcesOutput, error) + ListEventSourcesWithContext(aws.Context, *cloudwatchevents.ListEventSourcesInput, ...request.Option) (*cloudwatchevents.ListEventSourcesOutput, error) + ListEventSourcesRequest(*cloudwatchevents.ListEventSourcesInput) (*request.Request, *cloudwatchevents.ListEventSourcesOutput) + + ListPartnerEventSourceAccounts(*cloudwatchevents.ListPartnerEventSourceAccountsInput) (*cloudwatchevents.ListPartnerEventSourceAccountsOutput, error) + ListPartnerEventSourceAccountsWithContext(aws.Context, *cloudwatchevents.ListPartnerEventSourceAccountsInput, ...request.Option) (*cloudwatchevents.ListPartnerEventSourceAccountsOutput, error) + ListPartnerEventSourceAccountsRequest(*cloudwatchevents.ListPartnerEventSourceAccountsInput) (*request.Request, *cloudwatchevents.ListPartnerEventSourceAccountsOutput) + + ListPartnerEventSources(*cloudwatchevents.ListPartnerEventSourcesInput) (*cloudwatchevents.ListPartnerEventSourcesOutput, error) + ListPartnerEventSourcesWithContext(aws.Context, *cloudwatchevents.ListPartnerEventSourcesInput, ...request.Option) (*cloudwatchevents.ListPartnerEventSourcesOutput, error) + ListPartnerEventSourcesRequest(*cloudwatchevents.ListPartnerEventSourcesInput) (*request.Request, *cloudwatchevents.ListPartnerEventSourcesOutput) + ListRuleNamesByTarget(*cloudwatchevents.ListRuleNamesByTargetInput) (*cloudwatchevents.ListRuleNamesByTargetOutput, error) ListRuleNamesByTargetWithContext(aws.Context, *cloudwatchevents.ListRuleNamesByTargetInput, ...request.Option) (*cloudwatchevents.ListRuleNamesByTargetOutput, error) ListRuleNamesByTargetRequest(*cloudwatchevents.ListRuleNamesByTargetInput) (*request.Request, *cloudwatchevents.ListRuleNamesByTargetOutput) @@ -100,6 +148,10 @@ type CloudWatchEventsAPI interface { PutEventsWithContext(aws.Context, *cloudwatchevents.PutEventsInput, ...request.Option) (*cloudwatchevents.PutEventsOutput, error) PutEventsRequest(*cloudwatchevents.PutEventsInput) (*request.Request, *cloudwatchevents.PutEventsOutput) + PutPartnerEvents(*cloudwatchevents.PutPartnerEventsInput) (*cloudwatchevents.PutPartnerEventsOutput, error) + PutPartnerEventsWithContext(aws.Context, *cloudwatchevents.PutPartnerEventsInput, ...request.Option) (*cloudwatchevents.PutPartnerEventsOutput, error) + PutPartnerEventsRequest(*cloudwatchevents.PutPartnerEventsInput) (*request.Request, *cloudwatchevents.PutPartnerEventsOutput) + PutPermission(*cloudwatchevents.PutPermissionInput) (*cloudwatchevents.PutPermissionOutput, error) PutPermissionWithContext(aws.Context, *cloudwatchevents.PutPermissionInput, ...request.Option) (*cloudwatchevents.PutPermissionOutput, error) PutPermissionRequest(*cloudwatchevents.PutPermissionInput) (*request.Request, *cloudwatchevents.PutPermissionOutput) diff --git a/service/cloudwatchevents/doc.go b/service/cloudwatchevents/doc.go index da232b4853a..e6efe0fa259 100644 --- a/service/cloudwatchevents/doc.go +++ b/service/cloudwatchevents/doc.go @@ -3,25 +3,25 @@ // Package cloudwatchevents provides the client and types for making API // requests to Amazon CloudWatch Events. // -// Amazon CloudWatch Events helps you to respond to state changes in your AWS -// resources. When your resources change state, they automatically send events -// into an event stream. You can create rules that match selected events in -// the stream and route them to targets to take action. You can also use rules -// to take action on a predetermined schedule. For example, you can configure -// rules to: +// Amazon EventBridge helps you to respond to state changes in your AWS resources. +// When your resources change state, they automatically send events into an +// event stream. You can create rules that match selected events in the stream +// and route them to targets to take action. You can also use rules to take +// action on a predetermined schedule. For example, you can configure rules +// to: // // * Automatically invoke an AWS Lambda function to update DNS entries when -// an event notifies you that Amazon EC2 instance enters the running state. +// an event notifies you that Amazon EC2 instance enters the running state // // * Direct specific API records from AWS CloudTrail to an Amazon Kinesis // data stream for detailed analysis of potential security or availability -// risks. +// risks // // * Periodically invoke a built-in target to create a snapshot of an Amazon -// EBS volume. +// EBS volume // -// For more information about the features of Amazon CloudWatch Events, see -// the Amazon CloudWatch Events User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events). +// For more information about the features of Amazon EventBridge, see the Amazon +// EventBridge User Guide (https://docs.aws.amazon.com/eventbridge/latest/userguide/). // // See https://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07 for more information on this service. // diff --git a/service/cloudwatchevents/errors.go b/service/cloudwatchevents/errors.go index bab0f862f5e..24efbdc1643 100644 --- a/service/cloudwatchevents/errors.go +++ b/service/cloudwatchevents/errors.go @@ -7,7 +7,7 @@ const ( // ErrCodeConcurrentModificationException for service response error code // "ConcurrentModificationException". // - // There is concurrent modification on a rule or target. + // There is concurrent modification on a resource. ErrCodeConcurrentModificationException = "ConcurrentModificationException" // ErrCodeInternalException for service response error code @@ -19,24 +19,29 @@ const ( // ErrCodeInvalidEventPatternException for service response error code // "InvalidEventPatternException". // - // The event pattern is not valid. + // The event pattern isn't valid. ErrCodeInvalidEventPatternException = "InvalidEventPatternException" + // ErrCodeInvalidStateException for service response error code + // "InvalidStateException". + // + // The specified state isn't a valid state for an event source. + ErrCodeInvalidStateException = "InvalidStateException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // - // You tried to create more rules or add more targets to a rule than is allowed. + // You tried to create more resources than is allowed. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeManagedRuleException for service response error code // "ManagedRuleException". // - // This rule was created by an AWS service on behalf of your account. It is - // managed by that service. If you see this error in response to DeleteRule - // or RemoveTargets, you can use the Force parameter in those calls to delete - // the rule or remove targets from the rule. You cannot modify these managed - // rules by using DisableRule, EnableRule, PutTargets, PutRule, TagResource, - // or UntagResource. + // An AWS service created this rule on behalf of your account. That service + // manages it. If you see this error in response to DeleteRule or RemoveTargets, + // you can use the Force parameter in those calls to delete the rule or remove + // targets from the rule. You can't modify these managed rules by using DisableRule, + // EnableRule, PutTargets, PutRule, TagResource, or UntagResource. ErrCodeManagedRuleException = "ManagedRuleException" // ErrCodePolicyLengthExceededException for service response error code @@ -45,9 +50,15 @@ const ( // The event bus policy is too long. For more information, see the limits. ErrCodePolicyLengthExceededException = "PolicyLengthExceededException" + // ErrCodeResourceAlreadyExistsException for service response error code + // "ResourceAlreadyExistsException". + // + // The resource that you're trying to create already exists. + ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" + // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // - // An entity that you specified does not exist. + // An entity that you specified doesn't exist. ErrCodeResourceNotFoundException = "ResourceNotFoundException" ) diff --git a/service/eventbridge/api.go b/service/eventbridge/api.go new file mode 100644 index 00000000000..080787769fe --- /dev/null +++ b/service/eventbridge/api.go @@ -0,0 +1,7407 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package eventbridge + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opActivateEventSource = "ActivateEventSource" + +// ActivateEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the ActivateEventSource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ActivateEventSource for more information on using the ActivateEventSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ActivateEventSourceRequest method. +// req, resp := client.ActivateEventSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ActivateEventSource +func (c *EventBridge) ActivateEventSourceRequest(input *ActivateEventSourceInput) (req *request.Request, output *ActivateEventSourceOutput) { + op := &request.Operation{ + Name: opActivateEventSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ActivateEventSourceInput{} + } + + output = &ActivateEventSourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ActivateEventSource API operation for Amazon EventBridge. +// +// Activates a partner event source that has been deactivated. Once activated, +// your matching event bus will start receiving events from the event source. +// +// This operation is performed by AWS customers, not by SaaS partners. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ActivateEventSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The specified state isn't a valid state for an event source. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ActivateEventSource +func (c *EventBridge) ActivateEventSource(input *ActivateEventSourceInput) (*ActivateEventSourceOutput, error) { + req, out := c.ActivateEventSourceRequest(input) + return out, req.Send() +} + +// ActivateEventSourceWithContext is the same as ActivateEventSource with the addition of +// the ability to pass a context and additional request options. +// +// See ActivateEventSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ActivateEventSourceWithContext(ctx aws.Context, input *ActivateEventSourceInput, opts ...request.Option) (*ActivateEventSourceOutput, error) { + req, out := c.ActivateEventSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateEventBus = "CreateEventBus" + +// CreateEventBusRequest generates a "aws/request.Request" representing the +// client's request for the CreateEventBus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateEventBus for more information on using the CreateEventBus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateEventBusRequest method. +// req, resp := client.CreateEventBusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreateEventBus +func (c *EventBridge) CreateEventBusRequest(input *CreateEventBusInput) (req *request.Request, output *CreateEventBusOutput) { + op := &request.Operation{ + Name: opCreateEventBus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateEventBusInput{} + } + + output = &CreateEventBusOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateEventBus API operation for Amazon EventBridge. +// +// Creates a new event bus within your account. This can be a custom event bus +// which you can use to receive events from your own custom applications and +// services, or it can be a partner event bus which can be matched to a partner +// event source. +// +// This operation is used by AWS customers, not by SaaS partners. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation CreateEventBus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource that you're trying to create already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The specified state isn't a valid state for an event source. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreateEventBus +func (c *EventBridge) CreateEventBus(input *CreateEventBusInput) (*CreateEventBusOutput, error) { + req, out := c.CreateEventBusRequest(input) + return out, req.Send() +} + +// CreateEventBusWithContext is the same as CreateEventBus with the addition of +// the ability to pass a context and additional request options. +// +// See CreateEventBus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) CreateEventBusWithContext(ctx aws.Context, input *CreateEventBusInput, opts ...request.Option) (*CreateEventBusOutput, error) { + req, out := c.CreateEventBusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePartnerEventSource = "CreatePartnerEventSource" + +// CreatePartnerEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the CreatePartnerEventSource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePartnerEventSource for more information on using the CreatePartnerEventSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePartnerEventSourceRequest method. +// req, resp := client.CreatePartnerEventSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreatePartnerEventSource +func (c *EventBridge) CreatePartnerEventSourceRequest(input *CreatePartnerEventSourceInput) (req *request.Request, output *CreatePartnerEventSourceOutput) { + op := &request.Operation{ + Name: opCreatePartnerEventSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreatePartnerEventSourceInput{} + } + + output = &CreatePartnerEventSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePartnerEventSource API operation for Amazon EventBridge. +// +// Called by an SaaS partner to create a partner event source. +// +// This operation is not used by AWS customers. +// +// Each partner event source can be used by one AWS account to create a matching +// partner event bus in that AWS account. A SaaS partner must create one partner +// event source for each AWS account that wants to receive those event types. +// +// A partner event source creates events based on resources in the SaaS partner's +// service or application. +// +// An AWS account that creates a partner event bus that matches the partner +// event source can use that event bus to receive events from the partner, and +// then process them using AWS Events rules and targets. +// +// Partner event source names follow this format: +// +// aws.partner/partner_name/event_namespace/event_name +// +// * partner_name is determined during partner registration and identifies +// the partner to AWS customers. +// +// * For event_namespace, we recommend that partners use a string that identifies +// the AWS customer within the partner's system. This should not be the customer's +// AWS account ID. +// +// * event_name is determined by the partner, and should uniquely identify +// an event-generating resource within the partner system. This should help +// AWS customers decide whether to create an event bus to receive these events. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation CreatePartnerEventSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource that you're trying to create already exists. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/CreatePartnerEventSource +func (c *EventBridge) CreatePartnerEventSource(input *CreatePartnerEventSourceInput) (*CreatePartnerEventSourceOutput, error) { + req, out := c.CreatePartnerEventSourceRequest(input) + return out, req.Send() +} + +// CreatePartnerEventSourceWithContext is the same as CreatePartnerEventSource with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePartnerEventSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) CreatePartnerEventSourceWithContext(ctx aws.Context, input *CreatePartnerEventSourceInput, opts ...request.Option) (*CreatePartnerEventSourceOutput, error) { + req, out := c.CreatePartnerEventSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeactivateEventSource = "DeactivateEventSource" + +// DeactivateEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DeactivateEventSource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeactivateEventSource for more information on using the DeactivateEventSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeactivateEventSourceRequest method. +// req, resp := client.DeactivateEventSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeactivateEventSource +func (c *EventBridge) DeactivateEventSourceRequest(input *DeactivateEventSourceInput) (req *request.Request, output *DeactivateEventSourceOutput) { + op := &request.Operation{ + Name: opDeactivateEventSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeactivateEventSourceInput{} + } + + output = &DeactivateEventSourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeactivateEventSource API operation for Amazon EventBridge. +// +// An AWS customer uses this operation to temporarily stop receiving events +// from the specified partner event source. The matching event bus isn't deleted. +// +// When you deactivate a partner event source, the source goes into PENDING +// state. If it remains in PENDING state for more than two weeks, it's deleted. +// +// To activate a deactivated partner event source, use ActivateEventSource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DeactivateEventSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// The specified state isn't a valid state for an event source. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeactivateEventSource +func (c *EventBridge) DeactivateEventSource(input *DeactivateEventSourceInput) (*DeactivateEventSourceOutput, error) { + req, out := c.DeactivateEventSourceRequest(input) + return out, req.Send() +} + +// DeactivateEventSourceWithContext is the same as DeactivateEventSource with the addition of +// the ability to pass a context and additional request options. +// +// See DeactivateEventSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DeactivateEventSourceWithContext(ctx aws.Context, input *DeactivateEventSourceInput, opts ...request.Option) (*DeactivateEventSourceOutput, error) { + req, out := c.DeactivateEventSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEventBus = "DeleteEventBus" + +// DeleteEventBusRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEventBus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteEventBus for more information on using the DeleteEventBus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteEventBusRequest method. +// req, resp := client.DeleteEventBusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteEventBus +func (c *EventBridge) DeleteEventBusRequest(input *DeleteEventBusInput) (req *request.Request, output *DeleteEventBusOutput) { + op := &request.Operation{ + Name: opDeleteEventBus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteEventBusInput{} + } + + output = &DeleteEventBusOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteEventBus API operation for Amazon EventBridge. +// +// Deletes the specified custom event bus or partner event bus. All rules associated +// with this event bus are also deleted. You can't delete your account's default +// event bus. +// +// This operation is performed by AWS customers, not by SaaS partners. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DeleteEventBus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteEventBus +func (c *EventBridge) DeleteEventBus(input *DeleteEventBusInput) (*DeleteEventBusOutput, error) { + req, out := c.DeleteEventBusRequest(input) + return out, req.Send() +} + +// DeleteEventBusWithContext is the same as DeleteEventBus with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEventBus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DeleteEventBusWithContext(ctx aws.Context, input *DeleteEventBusInput, opts ...request.Option) (*DeleteEventBusOutput, error) { + req, out := c.DeleteEventBusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePartnerEventSource = "DeletePartnerEventSource" + +// DeletePartnerEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DeletePartnerEventSource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePartnerEventSource for more information on using the DeletePartnerEventSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePartnerEventSourceRequest method. +// req, resp := client.DeletePartnerEventSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeletePartnerEventSource +func (c *EventBridge) DeletePartnerEventSourceRequest(input *DeletePartnerEventSourceInput) (req *request.Request, output *DeletePartnerEventSourceOutput) { + op := &request.Operation{ + Name: opDeletePartnerEventSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePartnerEventSourceInput{} + } + + output = &DeletePartnerEventSourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePartnerEventSource API operation for Amazon EventBridge. +// +// This operation is used by SaaS partners to delete a partner event source. +// AWS customers don't use this operation. +// +// When you delete an event source, the status of the corresponding partner +// event bus in the AWS customer account becomes DELETED. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DeletePartnerEventSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeletePartnerEventSource +func (c *EventBridge) DeletePartnerEventSource(input *DeletePartnerEventSourceInput) (*DeletePartnerEventSourceOutput, error) { + req, out := c.DeletePartnerEventSourceRequest(input) + return out, req.Send() +} + +// DeletePartnerEventSourceWithContext is the same as DeletePartnerEventSource with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePartnerEventSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DeletePartnerEventSourceWithContext(ctx aws.Context, input *DeletePartnerEventSourceInput, opts ...request.Option) (*DeletePartnerEventSourceOutput, error) { + req, out := c.DeletePartnerEventSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteRule = "DeleteRule" + +// DeleteRuleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRule for more information on using the DeleteRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRuleRequest method. +// req, resp := client.DeleteRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteRule +func (c *EventBridge) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { + op := &request.Operation{ + Name: opDeleteRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteRuleInput{} + } + + output = &DeleteRuleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRule API operation for Amazon EventBridge. +// +// Deletes the specified rule. +// +// Before you can delete the rule, you must remove all targets, using RemoveTargets. +// +// When you delete a rule, incoming events might continue to match to the deleted +// rule. Allow a short period of time for changes to take effect. +// +// Managed rules are rules created and managed by another AWS service on your +// behalf. These rules are created by those other AWS services to support functionality +// in those services. You can delete these rules using the Force option, but +// you should do so only if you're sure that the other service isn't still using +// that rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DeleteRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DeleteRule +func (c *EventBridge) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { + req, out := c.DeleteRuleRequest(input) + return out, req.Send() +} + +// DeleteRuleWithContext is the same as DeleteRule with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { + req, out := c.DeleteRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEventBus = "DescribeEventBus" + +// DescribeEventBusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventBus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEventBus for more information on using the DescribeEventBus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEventBusRequest method. +// req, resp := client.DescribeEventBusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventBus +func (c *EventBridge) DescribeEventBusRequest(input *DescribeEventBusInput) (req *request.Request, output *DescribeEventBusOutput) { + op := &request.Operation{ + Name: opDescribeEventBus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEventBusInput{} + } + + output = &DescribeEventBusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEventBus API operation for Amazon EventBridge. +// +// Displays details about an event bus in your account. This can include the +// external AWS accounts that are permitted to write events to your default +// event bus, and the associated policy. For custom event buses and partner +// event buses, it displays the name, ARN, policy, state, and creation time. +// +// To enable your account to receive events from other accounts on its default +// event bus, use PutPermission. +// +// For more information about partner event buses, see CreateEventBus. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DescribeEventBus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventBus +func (c *EventBridge) DescribeEventBus(input *DescribeEventBusInput) (*DescribeEventBusOutput, error) { + req, out := c.DescribeEventBusRequest(input) + return out, req.Send() +} + +// DescribeEventBusWithContext is the same as DescribeEventBus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEventBus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DescribeEventBusWithContext(ctx aws.Context, input *DescribeEventBusInput, opts ...request.Option) (*DescribeEventBusOutput, error) { + req, out := c.DescribeEventBusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEventSource = "DescribeEventSource" + +// DescribeEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventSource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEventSource for more information on using the DescribeEventSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEventSourceRequest method. +// req, resp := client.DescribeEventSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventSource +func (c *EventBridge) DescribeEventSourceRequest(input *DescribeEventSourceInput) (req *request.Request, output *DescribeEventSourceOutput) { + op := &request.Operation{ + Name: opDescribeEventSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEventSourceInput{} + } + + output = &DescribeEventSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEventSource API operation for Amazon EventBridge. +// +// This operation lists details about a partner event source that is shared +// with your account. +// +// This operation is run by AWS customers, not by SaaS partners. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DescribeEventSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeEventSource +func (c *EventBridge) DescribeEventSource(input *DescribeEventSourceInput) (*DescribeEventSourceOutput, error) { + req, out := c.DescribeEventSourceRequest(input) + return out, req.Send() +} + +// DescribeEventSourceWithContext is the same as DescribeEventSource with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEventSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DescribeEventSourceWithContext(ctx aws.Context, input *DescribeEventSourceInput, opts ...request.Option) (*DescribeEventSourceOutput, error) { + req, out := c.DescribeEventSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribePartnerEventSource = "DescribePartnerEventSource" + +// DescribePartnerEventSourceRequest generates a "aws/request.Request" representing the +// client's request for the DescribePartnerEventSource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribePartnerEventSource for more information on using the DescribePartnerEventSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribePartnerEventSourceRequest method. +// req, resp := client.DescribePartnerEventSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribePartnerEventSource +func (c *EventBridge) DescribePartnerEventSourceRequest(input *DescribePartnerEventSourceInput) (req *request.Request, output *DescribePartnerEventSourceOutput) { + op := &request.Operation{ + Name: opDescribePartnerEventSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePartnerEventSourceInput{} + } + + output = &DescribePartnerEventSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePartnerEventSource API operation for Amazon EventBridge. +// +// An SaaS partner can use this operation to list details about a partner event +// source that they have created. +// +// AWS customers do not use this operation. Instead, AWS customers can use DescribeEventSource +// to see details about a partner event source that is shared with them. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DescribePartnerEventSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribePartnerEventSource +func (c *EventBridge) DescribePartnerEventSource(input *DescribePartnerEventSourceInput) (*DescribePartnerEventSourceOutput, error) { + req, out := c.DescribePartnerEventSourceRequest(input) + return out, req.Send() +} + +// DescribePartnerEventSourceWithContext is the same as DescribePartnerEventSource with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePartnerEventSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DescribePartnerEventSourceWithContext(ctx aws.Context, input *DescribePartnerEventSourceInput, opts ...request.Option) (*DescribePartnerEventSourceOutput, error) { + req, out := c.DescribePartnerEventSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeRule = "DescribeRule" + +// DescribeRuleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeRule for more information on using the DescribeRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeRuleRequest method. +// req, resp := client.DescribeRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeRule +func (c *EventBridge) DescribeRuleRequest(input *DescribeRuleInput) (req *request.Request, output *DescribeRuleOutput) { + op := &request.Operation{ + Name: opDescribeRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeRuleInput{} + } + + output = &DescribeRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRule API operation for Amazon EventBridge. +// +// Describes the specified rule. +// +// DescribeRule doesn't list the targets of a rule. To see the targets associated +// with a rule, use ListTargetsByRule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DescribeRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DescribeRule +func (c *EventBridge) DescribeRule(input *DescribeRuleInput) (*DescribeRuleOutput, error) { + req, out := c.DescribeRuleRequest(input) + return out, req.Send() +} + +// DescribeRuleWithContext is the same as DescribeRule with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DescribeRuleWithContext(ctx aws.Context, input *DescribeRuleInput, opts ...request.Option) (*DescribeRuleOutput, error) { + req, out := c.DescribeRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableRule = "DisableRule" + +// DisableRuleRequest generates a "aws/request.Request" representing the +// client's request for the DisableRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisableRule for more information on using the DisableRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisableRuleRequest method. +// req, resp := client.DisableRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DisableRule +func (c *EventBridge) DisableRuleRequest(input *DisableRuleInput) (req *request.Request, output *DisableRuleOutput) { + op := &request.Operation{ + Name: opDisableRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableRuleInput{} + } + + output = &DisableRuleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableRule API operation for Amazon EventBridge. +// +// Disables the specified rule. A disabled rule won't match any events and won't +// self-trigger if it has a schedule expression. +// +// When you disable a rule, incoming events might continue to match to the disabled +// rule. Allow a short period of time for changes to take effect. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation DisableRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/DisableRule +func (c *EventBridge) DisableRule(input *DisableRuleInput) (*DisableRuleOutput, error) { + req, out := c.DisableRuleRequest(input) + return out, req.Send() +} + +// DisableRuleWithContext is the same as DisableRule with the addition of +// the ability to pass a context and additional request options. +// +// See DisableRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) DisableRuleWithContext(ctx aws.Context, input *DisableRuleInput, opts ...request.Option) (*DisableRuleOutput, error) { + req, out := c.DisableRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableRule = "EnableRule" + +// EnableRuleRequest generates a "aws/request.Request" representing the +// client's request for the EnableRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableRule for more information on using the EnableRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableRuleRequest method. +// req, resp := client.EnableRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/EnableRule +func (c *EventBridge) EnableRuleRequest(input *EnableRuleInput) (req *request.Request, output *EnableRuleOutput) { + op := &request.Operation{ + Name: opEnableRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableRuleInput{} + } + + output = &EnableRuleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// EnableRule API operation for Amazon EventBridge. +// +// Enables the specified rule. If the rule doesn't exist, the operation fails. +// +// When you enable a rule, incoming events might not immediately start matching +// to a newly enabled rule. Allow a short period of time for changes to take +// effect. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation EnableRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/EnableRule +func (c *EventBridge) EnableRule(input *EnableRuleInput) (*EnableRuleOutput, error) { + req, out := c.EnableRuleRequest(input) + return out, req.Send() +} + +// EnableRuleWithContext is the same as EnableRule with the addition of +// the ability to pass a context and additional request options. +// +// See EnableRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) EnableRuleWithContext(ctx aws.Context, input *EnableRuleInput, opts ...request.Option) (*EnableRuleOutput, error) { + req, out := c.EnableRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListEventBuses = "ListEventBuses" + +// ListEventBusesRequest generates a "aws/request.Request" representing the +// client's request for the ListEventBuses operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEventBuses for more information on using the ListEventBuses +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEventBusesRequest method. +// req, resp := client.ListEventBusesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventBuses +func (c *EventBridge) ListEventBusesRequest(input *ListEventBusesInput) (req *request.Request, output *ListEventBusesOutput) { + op := &request.Operation{ + Name: opListEventBuses, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListEventBusesInput{} + } + + output = &ListEventBusesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEventBuses API operation for Amazon EventBridge. +// +// Lists all the event buses in your account, including the default event bus, +// custom event buses, and partner event buses. +// +// This operation is run by AWS customers, not by SaaS partners. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListEventBuses for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventBuses +func (c *EventBridge) ListEventBuses(input *ListEventBusesInput) (*ListEventBusesOutput, error) { + req, out := c.ListEventBusesRequest(input) + return out, req.Send() +} + +// ListEventBusesWithContext is the same as ListEventBuses with the addition of +// the ability to pass a context and additional request options. +// +// See ListEventBuses for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListEventBusesWithContext(ctx aws.Context, input *ListEventBusesInput, opts ...request.Option) (*ListEventBusesOutput, error) { + req, out := c.ListEventBusesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListEventSources = "ListEventSources" + +// ListEventSourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListEventSources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEventSources for more information on using the ListEventSources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEventSourcesRequest method. +// req, resp := client.ListEventSourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventSources +func (c *EventBridge) ListEventSourcesRequest(input *ListEventSourcesInput) (req *request.Request, output *ListEventSourcesOutput) { + op := &request.Operation{ + Name: opListEventSources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListEventSourcesInput{} + } + + output = &ListEventSourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEventSources API operation for Amazon EventBridge. +// +// You can use this to see all the partner event sources that have been shared +// with your AWS account. For more information about partner event sources, +// see CreateEventBus. +// +// This operation is run by AWS customers, not by SaaS partners. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListEventSources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListEventSources +func (c *EventBridge) ListEventSources(input *ListEventSourcesInput) (*ListEventSourcesOutput, error) { + req, out := c.ListEventSourcesRequest(input) + return out, req.Send() +} + +// ListEventSourcesWithContext is the same as ListEventSources with the addition of +// the ability to pass a context and additional request options. +// +// See ListEventSources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListEventSourcesWithContext(ctx aws.Context, input *ListEventSourcesInput, opts ...request.Option) (*ListEventSourcesOutput, error) { + req, out := c.ListEventSourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListPartnerEventSourceAccounts = "ListPartnerEventSourceAccounts" + +// ListPartnerEventSourceAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListPartnerEventSourceAccounts operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPartnerEventSourceAccounts for more information on using the ListPartnerEventSourceAccounts +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPartnerEventSourceAccountsRequest method. +// req, resp := client.ListPartnerEventSourceAccountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSourceAccounts +func (c *EventBridge) ListPartnerEventSourceAccountsRequest(input *ListPartnerEventSourceAccountsInput) (req *request.Request, output *ListPartnerEventSourceAccountsOutput) { + op := &request.Operation{ + Name: opListPartnerEventSourceAccounts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListPartnerEventSourceAccountsInput{} + } + + output = &ListPartnerEventSourceAccountsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPartnerEventSourceAccounts API operation for Amazon EventBridge. +// +// An SaaS partner can use this operation to display the AWS account ID that +// a particular partner event source name is associated with. +// +// This operation is used by SaaS partners, not by AWS customers. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListPartnerEventSourceAccounts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSourceAccounts +func (c *EventBridge) ListPartnerEventSourceAccounts(input *ListPartnerEventSourceAccountsInput) (*ListPartnerEventSourceAccountsOutput, error) { + req, out := c.ListPartnerEventSourceAccountsRequest(input) + return out, req.Send() +} + +// ListPartnerEventSourceAccountsWithContext is the same as ListPartnerEventSourceAccounts with the addition of +// the ability to pass a context and additional request options. +// +// See ListPartnerEventSourceAccounts for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListPartnerEventSourceAccountsWithContext(ctx aws.Context, input *ListPartnerEventSourceAccountsInput, opts ...request.Option) (*ListPartnerEventSourceAccountsOutput, error) { + req, out := c.ListPartnerEventSourceAccountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListPartnerEventSources = "ListPartnerEventSources" + +// ListPartnerEventSourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListPartnerEventSources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPartnerEventSources for more information on using the ListPartnerEventSources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPartnerEventSourcesRequest method. +// req, resp := client.ListPartnerEventSourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSources +func (c *EventBridge) ListPartnerEventSourcesRequest(input *ListPartnerEventSourcesInput) (req *request.Request, output *ListPartnerEventSourcesOutput) { + op := &request.Operation{ + Name: opListPartnerEventSources, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListPartnerEventSourcesInput{} + } + + output = &ListPartnerEventSourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPartnerEventSources API operation for Amazon EventBridge. +// +// An SaaS partner can use this operation to list all the partner event source +// names that they have created. +// +// This operation is not used by AWS customers. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListPartnerEventSources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListPartnerEventSources +func (c *EventBridge) ListPartnerEventSources(input *ListPartnerEventSourcesInput) (*ListPartnerEventSourcesOutput, error) { + req, out := c.ListPartnerEventSourcesRequest(input) + return out, req.Send() +} + +// ListPartnerEventSourcesWithContext is the same as ListPartnerEventSources with the addition of +// the ability to pass a context and additional request options. +// +// See ListPartnerEventSources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListPartnerEventSourcesWithContext(ctx aws.Context, input *ListPartnerEventSourcesInput, opts ...request.Option) (*ListPartnerEventSourcesOutput, error) { + req, out := c.ListPartnerEventSourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListRuleNamesByTarget = "ListRuleNamesByTarget" + +// ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the +// client's request for the ListRuleNamesByTarget operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRuleNamesByTarget for more information on using the ListRuleNamesByTarget +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRuleNamesByTargetRequest method. +// req, resp := client.ListRuleNamesByTargetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRuleNamesByTarget +func (c *EventBridge) ListRuleNamesByTargetRequest(input *ListRuleNamesByTargetInput) (req *request.Request, output *ListRuleNamesByTargetOutput) { + op := &request.Operation{ + Name: opListRuleNamesByTarget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListRuleNamesByTargetInput{} + } + + output = &ListRuleNamesByTargetOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRuleNamesByTarget API operation for Amazon EventBridge. +// +// Lists the rules for the specified target. You can see which rules can invoke +// a specific target in your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListRuleNamesByTarget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRuleNamesByTarget +func (c *EventBridge) ListRuleNamesByTarget(input *ListRuleNamesByTargetInput) (*ListRuleNamesByTargetOutput, error) { + req, out := c.ListRuleNamesByTargetRequest(input) + return out, req.Send() +} + +// ListRuleNamesByTargetWithContext is the same as ListRuleNamesByTarget with the addition of +// the ability to pass a context and additional request options. +// +// See ListRuleNamesByTarget for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListRuleNamesByTargetWithContext(ctx aws.Context, input *ListRuleNamesByTargetInput, opts ...request.Option) (*ListRuleNamesByTargetOutput, error) { + req, out := c.ListRuleNamesByTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListRules = "ListRules" + +// ListRulesRequest generates a "aws/request.Request" representing the +// client's request for the ListRules operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRules for more information on using the ListRules +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRulesRequest method. +// req, resp := client.ListRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRules +func (c *EventBridge) ListRulesRequest(input *ListRulesInput) (req *request.Request, output *ListRulesOutput) { + op := &request.Operation{ + Name: opListRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListRulesInput{} + } + + output = &ListRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRules API operation for Amazon EventBridge. +// +// Lists your EventBridge rules. You can either list all the rules or provide +// a prefix to match to the rule names. +// +// ListRules doesn't list the targets of a rule. To see the targets associated +// with a rule, use ListTargetsByRule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListRules for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRules +func (c *EventBridge) ListRules(input *ListRulesInput) (*ListRulesOutput, error) { + req, out := c.ListRulesRequest(input) + return out, req.Send() +} + +// ListRulesWithContext is the same as ListRules with the addition of +// the ability to pass a context and additional request options. +// +// See ListRules for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListRulesWithContext(ctx aws.Context, input *ListRulesInput, opts ...request.Option) (*ListRulesOutput, error) { + req, out := c.ListRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTagsForResource +func (c *EventBridge) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon EventBridge. +// +// Displays the tags associated with an EventBridge resource. In EventBridge, +// rules can be tagged. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTagsForResource +func (c *EventBridge) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTargetsByRule = "ListTargetsByRule" + +// ListTargetsByRuleRequest generates a "aws/request.Request" representing the +// client's request for the ListTargetsByRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTargetsByRule for more information on using the ListTargetsByRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTargetsByRuleRequest method. +// req, resp := client.ListTargetsByRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTargetsByRule +func (c *EventBridge) ListTargetsByRuleRequest(input *ListTargetsByRuleInput) (req *request.Request, output *ListTargetsByRuleOutput) { + op := &request.Operation{ + Name: opListTargetsByRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTargetsByRuleInput{} + } + + output = &ListTargetsByRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTargetsByRule API operation for Amazon EventBridge. +// +// Lists the targets assigned to the specified rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation ListTargetsByRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListTargetsByRule +func (c *EventBridge) ListTargetsByRule(input *ListTargetsByRuleInput) (*ListTargetsByRuleOutput, error) { + req, out := c.ListTargetsByRuleRequest(input) + return out, req.Send() +} + +// ListTargetsByRuleWithContext is the same as ListTargetsByRule with the addition of +// the ability to pass a context and additional request options. +// +// See ListTargetsByRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) ListTargetsByRuleWithContext(ctx aws.Context, input *ListTargetsByRuleInput, opts ...request.Option) (*ListTargetsByRuleOutput, error) { + req, out := c.ListTargetsByRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutEvents = "PutEvents" + +// PutEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutEvents for more information on using the PutEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutEventsRequest method. +// req, resp := client.PutEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutEvents +func (c *EventBridge) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { + op := &request.Operation{ + Name: opPutEvents, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutEventsInput{} + } + + output = &PutEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutEvents API operation for Amazon EventBridge. +// +// Sends custom events to EventBridge so that they can be matched to rules. +// These events can be from your custom applications and services. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation PutEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutEvents +func (c *EventBridge) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + return out, req.Send() +} + +// PutEventsWithContext is the same as PutEvents with the addition of +// the ability to pass a context and additional request options. +// +// See PutEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPartnerEvents = "PutPartnerEvents" + +// PutPartnerEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutPartnerEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPartnerEvents for more information on using the PutPartnerEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPartnerEventsRequest method. +// req, resp := client.PutPartnerEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPartnerEvents +func (c *EventBridge) PutPartnerEventsRequest(input *PutPartnerEventsInput) (req *request.Request, output *PutPartnerEventsOutput) { + op := &request.Operation{ + Name: opPutPartnerEvents, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPartnerEventsInput{} + } + + output = &PutPartnerEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutPartnerEvents API operation for Amazon EventBridge. +// +// This is used by SaaS partners to write events to a customer's partner event +// bus. +// +// AWS customers do not use this operation. Instead, AWS customers can use PutEvents +// to write custom events from their own applications to an event bus. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation PutPartnerEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPartnerEvents +func (c *EventBridge) PutPartnerEvents(input *PutPartnerEventsInput) (*PutPartnerEventsOutput, error) { + req, out := c.PutPartnerEventsRequest(input) + return out, req.Send() +} + +// PutPartnerEventsWithContext is the same as PutPartnerEvents with the addition of +// the ability to pass a context and additional request options. +// +// See PutPartnerEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) PutPartnerEventsWithContext(ctx aws.Context, input *PutPartnerEventsInput, opts ...request.Option) (*PutPartnerEventsOutput, error) { + req, out := c.PutPartnerEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPermission = "PutPermission" + +// PutPermissionRequest generates a "aws/request.Request" representing the +// client's request for the PutPermission operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPermission for more information on using the PutPermission +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPermissionRequest method. +// req, resp := client.PutPermissionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPermission +func (c *EventBridge) PutPermissionRequest(input *PutPermissionInput) (req *request.Request, output *PutPermissionOutput) { + op := &request.Operation{ + Name: opPutPermission, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPermissionInput{} + } + + output = &PutPermissionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutPermission API operation for Amazon EventBridge. +// +// Running PutPermission permits the specified AWS account or AWS organization +// to put events to the specified event bus. Rules in your account are triggered +// by these events arriving to an event bus in your account. +// +// For another account to send events to your account, that external account +// must have a rule with your account's event bus as a target. +// +// To enable multiple AWS accounts to put events to an event bus, run PutPermission +// once for each of these accounts. Or, if all the accounts are members of the +// same AWS organization, you can run PutPermission once specifying Principal +// as "*" and specifying the AWS organization ID in Condition, to grant permissions +// to all accounts in that organization. +// +// If you grant permissions using an organization, then accounts in that organization +// must specify a RoleArn with proper permissions when they use PutTarget to +// add your account's event bus as a target. For more information, see Sending +// and Receiving Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) +// in the Amazon EventBridge User Guide. +// +// The permission policy on an event bus can't exceed 10 KB in size. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation PutPermission for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException" +// The event bus policy is too long. For more information, see the limits. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutPermission +func (c *EventBridge) PutPermission(input *PutPermissionInput) (*PutPermissionOutput, error) { + req, out := c.PutPermissionRequest(input) + return out, req.Send() +} + +// PutPermissionWithContext is the same as PutPermission with the addition of +// the ability to pass a context and additional request options. +// +// See PutPermission for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) PutPermissionWithContext(ctx aws.Context, input *PutPermissionInput, opts ...request.Option) (*PutPermissionOutput, error) { + req, out := c.PutPermissionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutRule = "PutRule" + +// PutRuleRequest generates a "aws/request.Request" representing the +// client's request for the PutRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutRule for more information on using the PutRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutRuleRequest method. +// req, resp := client.PutRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutRule +func (c *EventBridge) PutRuleRequest(input *PutRuleInput) (req *request.Request, output *PutRuleOutput) { + op := &request.Operation{ + Name: opPutRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutRuleInput{} + } + + output = &PutRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutRule API operation for Amazon EventBridge. +// +// Creates or updates the specified rule. Rules are enabled by default or based +// on value of the state. You can disable a rule using DisableRule. +// +// A single rule watches for events from a single event bus. Events generated +// by AWS services go to your account's default event bus. Events generated +// by SaaS partner services or applications go to the matching partner event +// bus. If you have custom applications or services, you can specify whether +// their events go to your default event bus or a custom event bus that you +// have created. For more information, see CreateEventBus. +// +// If you're updating an existing rule, the rule is replaced with what you specify +// in this PutRule command. If you omit arguments in PutRule, the old values +// for those arguments aren't kept. Instead, they're replaced with null values. +// +// When you create or update a rule, incoming events might not immediately start +// matching to new or updated rules. Allow a short period of time for changes +// to take effect. +// +// A rule must contain at least an EventPattern or ScheduleExpression. Rules +// with EventPatterns are triggered when a matching event is observed. Rules +// with ScheduleExpressions self-trigger based on the given schedule. A rule +// can have both an EventPattern and a ScheduleExpression, in which case the +// rule triggers on matching events as well as on a schedule. +// +// When you initially create a rule, you can optionally assign one or more tags +// to the rule. Tags can help you organize and categorize your resources. You +// can also use them to scope user permissions, by granting a user permission +// to access or change only rules with certain tag values. To use the PutRule +// operation and assign tags, you must have both the events:PutRule and events:TagResource +// permissions. +// +// If you are updating an existing rule, any tags you specify in the PutRule +// operation are ignored. To update the tags of an existing rule, use TagResource +// and UntagResource. +// +// Most services in AWS treat : or / as the same character in Amazon Resource +// Names (ARNs). However, EventBridge uses an exact match in event patterns +// and rules. Be sure to use the correct ARN characters when creating event +// patterns so that they match the ARN syntax in the event that you want to +// match. +// +// In EventBridge, you could create rules that lead to infinite loops, where +// a rule is fired repeatedly. For example, a rule might detect that ACLs have +// changed on an S3 bucket, and trigger software to change them to the desired +// state. If you don't write the rule carefully, the subsequent change to the +// ACLs fires the rule again, creating an infinite loop. +// +// To prevent this, write the rules so that the triggered actions don't refire +// the same rule. For example, your rule could fire only if ACLs are found to +// be in a bad state, instead of after any change. +// +// An infinite loop can quickly cause higher than expected charges. We recommend +// that you use budgeting, which alerts you when charges exceed your specified +// limit. For more information, see Managing Your Costs with Budgets (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation PutRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" +// The event pattern isn't valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutRule +func (c *EventBridge) PutRule(input *PutRuleInput) (*PutRuleOutput, error) { + req, out := c.PutRuleRequest(input) + return out, req.Send() +} + +// PutRuleWithContext is the same as PutRule with the addition of +// the ability to pass a context and additional request options. +// +// See PutRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) PutRuleWithContext(ctx aws.Context, input *PutRuleInput, opts ...request.Option) (*PutRuleOutput, error) { + req, out := c.PutRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutTargets = "PutTargets" + +// PutTargetsRequest generates a "aws/request.Request" representing the +// client's request for the PutTargets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutTargets for more information on using the PutTargets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutTargetsRequest method. +// req, resp := client.PutTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutTargets +func (c *EventBridge) PutTargetsRequest(input *PutTargetsInput) (req *request.Request, output *PutTargetsOutput) { + op := &request.Operation{ + Name: opPutTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutTargetsInput{} + } + + output = &PutTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutTargets API operation for Amazon EventBridge. +// +// Adds the specified targets to the specified rule, or updates the targets +// if they're already associated with the rule. +// +// Targets are the resources that are invoked when a rule is triggered. +// +// You can configure the following as targets in EventBridge: +// +// * EC2 instances +// +// * SSM Run Command +// +// * SSM Automation +// +// * AWS Lambda functions +// +// * Data streams in Amazon Kinesis Data Streams +// +// * Data delivery streams in Amazon Kinesis Data Firehose +// +// * Amazon ECS tasks +// +// * AWS Step Functions state machines +// +// * AWS Batch jobs +// +// * AWS CodeBuild projects +// +// * Pipelines in AWS CodePipeline +// +// * Amazon Inspector assessment templates +// +// * Amazon SNS topics +// +// * Amazon SQS queues, including FIFO queues +// +// * The default event bus of another AWS account +// +// Creating rules with built-in targets is supported only on the AWS Management +// Console. The built-in targets are EC2 CreateSnapshot API call, EC2 RebootInstances +// API call, EC2 StopInstances API call, and EC2 TerminateInstances API call. +// +// For some target types, PutTargets provides target-specific parameters. If +// the target is a Kinesis data stream, you can optionally specify which shard +// the event goes to by using the KinesisParameters argument. To invoke a command +// on multiple EC2 instances with one rule, you can use the RunCommandParameters +// field. +// +// To be able to make API calls against the resources that you own, Amazon EventBridge +// needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, +// EventBridge relies on resource-based policies. For EC2 instances, Kinesis +// data streams, and AWS Step Functions state machines, EventBridge relies on +// IAM roles that you specify in the RoleARN argument in PutTargets. For more +// information, see Authentication and Access Control (https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html) +// in the Amazon EventBridge User Guide. +// +// If another AWS account is in the same Region and has granted you permission +// (using PutPermission), you can send events to that account. Set that account's +// event bus as a target of the rules in your account. To send the matched events +// to the other account, specify that account's event bus as the Arn value when +// you run PutTargets. If your account sends events to another account, your +// account is charged for each sent event. Each event sent to another account +// is charged as a custom event. The account receiving the event isn't charged. +// For more information, see Amazon EventBridge Pricing (https://aws.amazon.com/eventbridge/pricing/). +// +// If you're setting an event bus in another account as the target and that +// account granted permission to your account through an organization instead +// of directly by the account ID, you must specify a RoleArn with proper permissions +// in the Target structure. For more information, see Sending and Receiving +// Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) +// in the Amazon EventBridge User Guide. +// +// For more information about enabling cross-account events, see PutPermission. +// +// Input, InputPath, and InputTransformer are mutually exclusive and optional +// parameters of a target. When a rule is triggered due to a matched event: +// +// * If none of the following arguments are specified for a target, the entire +// event is passed to the target in JSON format (unless the target is Amazon +// EC2 Run Command or Amazon ECS task, in which case nothing from the event +// is passed to the target). +// +// * If Input is specified in the form of valid JSON, then the matched event +// is overridden with this constant. +// +// * If InputPath is specified in the form of JSONPath (for example, $.detail), +// only the part of the event specified in the path is passed to the target +// (for example, only the detail part of the event is passed). +// +// * If InputTransformer is specified, one or more specified JSONPaths are +// extracted from the event and used as values in a template that you specify +// as the input to the target. +// +// When you specify InputPath or InputTransformer, you must use JSON dot notation, +// not bracket notation. +// +// When you add targets to a rule and the associated rule triggers soon after, +// new or updated targets might not be immediately invoked. Allow a short period +// of time for changes to take effect. +// +// This action can partially fail if too many requests are made at the same +// time. If that happens, FailedEntryCount is nonzero in the response, and each +// entry in FailedEntries provides the ID of the failed target and the error +// code. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation PutTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You tried to create more resources than is allowed. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/PutTargets +func (c *EventBridge) PutTargets(input *PutTargetsInput) (*PutTargetsOutput, error) { + req, out := c.PutTargetsRequest(input) + return out, req.Send() +} + +// PutTargetsWithContext is the same as PutTargets with the addition of +// the ability to pass a context and additional request options. +// +// See PutTargets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) PutTargetsWithContext(ctx aws.Context, input *PutTargetsInput, opts ...request.Option) (*PutTargetsOutput, error) { + req, out := c.PutTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemovePermission = "RemovePermission" + +// RemovePermissionRequest generates a "aws/request.Request" representing the +// client's request for the RemovePermission operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemovePermission for more information on using the RemovePermission +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemovePermissionRequest method. +// req, resp := client.RemovePermissionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemovePermission +func (c *EventBridge) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { + op := &request.Operation{ + Name: opRemovePermission, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemovePermissionInput{} + } + + output = &RemovePermissionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemovePermission API operation for Amazon EventBridge. +// +// Revokes the permission of another AWS account to be able to put events to +// the specified event bus. Specify the account to revoke by the StatementId +// value that you associated with the account when you granted it permission +// with PutPermission. You can find the StatementId by using DescribeEventBus. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation RemovePermission for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemovePermission +func (c *EventBridge) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { + req, out := c.RemovePermissionRequest(input) + return out, req.Send() +} + +// RemovePermissionWithContext is the same as RemovePermission with the addition of +// the ability to pass a context and additional request options. +// +// See RemovePermission for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { + req, out := c.RemovePermissionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveTargets = "RemoveTargets" + +// RemoveTargetsRequest generates a "aws/request.Request" representing the +// client's request for the RemoveTargets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveTargets for more information on using the RemoveTargets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveTargetsRequest method. +// req, resp := client.RemoveTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemoveTargets +func (c *EventBridge) RemoveTargetsRequest(input *RemoveTargetsInput) (req *request.Request, output *RemoveTargetsOutput) { + op := &request.Operation{ + Name: opRemoveTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveTargetsInput{} + } + + output = &RemoveTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveTargets API operation for Amazon EventBridge. +// +// Removes the specified targets from the specified rule. When the rule is triggered, +// those targets are no longer be invoked. +// +// When you remove a target, when the associated rule triggers, removed targets +// might continue to be invoked. Allow a short period of time for changes to +// take effect. +// +// This action can partially fail if too many requests are made at the same +// time. If that happens, FailedEntryCount is non-zero in the response and each +// entry in FailedEntries provides the ID of the failed target and the error +// code. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation RemoveTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/RemoveTargets +func (c *EventBridge) RemoveTargets(input *RemoveTargetsInput) (*RemoveTargetsOutput, error) { + req, out := c.RemoveTargetsRequest(input) + return out, req.Send() +} + +// RemoveTargetsWithContext is the same as RemoveTargets with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveTargets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) RemoveTargetsWithContext(ctx aws.Context, input *RemoveTargetsInput, opts ...request.Option) (*RemoveTargetsOutput, error) { + req, out := c.RemoveTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TagResource +func (c *EventBridge) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon EventBridge. +// +// Assigns one or more tags (key-value pairs) to the specified EventBridge resource. +// Tags can help you organize and categorize your resources. You can also use +// them to scope user permissions by granting a user permission to access or +// change only resources with certain tag values. In EventBridge, rules can +// be tagged. +// +// Tags don't have any semantic meaning to AWS and are interpreted strictly +// as strings of characters. +// +// You can use the TagResource action with a rule that already has tags. If +// you specify a new tag key for the rule, this tag is appended to the list +// of tags associated with the rule. If you specify a tag key that is already +// associated with the rule, the new tag value that you specify replaces the +// previous value for that tag. +// +// You can associate as many as 50 tags with a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TagResource +func (c *EventBridge) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTestEventPattern = "TestEventPattern" + +// TestEventPatternRequest generates a "aws/request.Request" representing the +// client's request for the TestEventPattern operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TestEventPattern for more information on using the TestEventPattern +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TestEventPatternRequest method. +// req, resp := client.TestEventPatternRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TestEventPattern +func (c *EventBridge) TestEventPatternRequest(input *TestEventPatternInput) (req *request.Request, output *TestEventPatternOutput) { + op := &request.Operation{ + Name: opTestEventPattern, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TestEventPatternInput{} + } + + output = &TestEventPatternOutput{} + req = c.newRequest(op, input, output) + return +} + +// TestEventPattern API operation for Amazon EventBridge. +// +// Tests whether the specified event pattern matches the provided event. +// +// Most services in AWS treat : or / as the same character in Amazon Resource +// Names (ARNs). However, EventBridge uses an exact match in event patterns +// and rules. Be sure to use the correct ARN characters when creating event +// patterns so that they match the ARN syntax in the event that you want to +// match. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation TestEventPattern for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidEventPatternException "InvalidEventPatternException" +// The event pattern isn't valid. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/TestEventPattern +func (c *EventBridge) TestEventPattern(input *TestEventPatternInput) (*TestEventPatternOutput, error) { + req, out := c.TestEventPatternRequest(input) + return out, req.Send() +} + +// TestEventPatternWithContext is the same as TestEventPattern with the addition of +// the ability to pass a context and additional request options. +// +// See TestEventPattern for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) TestEventPatternWithContext(ctx aws.Context, input *TestEventPatternInput, opts ...request.Option) (*TestEventPatternOutput, error) { + req, out := c.TestEventPatternRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/UntagResource +func (c *EventBridge) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon EventBridge. +// +// Removes one or more tags from the specified EventBridge resource. In EventBridge, +// rules can be tagged. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EventBridge's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An entity that you specified doesn't exist. +// +// * ErrCodeInternalException "InternalException" +// This exception occurs due to unexpected causes. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// There is concurrent modification on a resource. +// +// * ErrCodeManagedRuleException "ManagedRuleException" +// An AWS service created this rule on behalf of your account. That service +// manages it. If you see this error in response to DeleteRule or RemoveTargets, +// you can use the Force parameter in those calls to delete the rule or remove +// targets from the rule. You can't modify these managed rules by using DisableRule, +// EnableRule, PutTargets, PutRule, TagResource, or UntagResource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/UntagResource +func (c *EventBridge) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EventBridge) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type ActivateEventSourceInput struct { + _ struct{} `type:"structure"` + + // The name of the partner event source to activate. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ActivateEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActivateEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActivateEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ActivateEventSourceInput) SetName(v string) *ActivateEventSourceInput { + s.Name = &v + return s +} + +type ActivateEventSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ActivateEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivateEventSourceOutput) GoString() string { + return s.String() +} + +// This structure specifies the VPC subnets and security groups for the task +// and whether a public IP address is to be used. This structure is relevant +// only for ECS tasks that use the awsvpc network mode. +type AwsVpcConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies whether the task's elastic network interface receives a public + // IP address. You can specify ENABLED only when LaunchType in EcsParameters + // is set to FARGATE. + AssignPublicIp *string `type:"string" enum:"AssignPublicIp"` + + // Specifies the security groups associated with the task. These security groups + // must all be in the same VPC. You can specify as many as five security groups. + // If you don't specify a security group, the default security group for the + // VPC is used. + SecurityGroups []*string `type:"list"` + + // Specifies the subnets associated with the task. These subnets must all be + // in the same VPC. You can specify as many as 16 subnets. + // + // Subnets is a required field + Subnets []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s AwsVpcConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsVpcConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AwsVpcConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AwsVpcConfiguration"} + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssignPublicIp sets the AssignPublicIp field's value. +func (s *AwsVpcConfiguration) SetAssignPublicIp(v string) *AwsVpcConfiguration { + s.AssignPublicIp = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *AwsVpcConfiguration) SetSecurityGroups(v []*string) *AwsVpcConfiguration { + s.SecurityGroups = v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration { + s.Subnets = v + return s +} + +// The array properties for the submitted job, such as the size of the array. +// The array size can be between 2 and 10,000. If you specify array properties +// for a job, it becomes an array job. This parameter is used only if the target +// is an AWS Batch job. +type BatchArrayProperties struct { + _ struct{} `type:"structure"` + + // The size of the array, if this is an array batch job. Valid values are integers + // between 2 and 10,000. + Size *int64 `type:"integer"` +} + +// String returns the string representation +func (s BatchArrayProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchArrayProperties) GoString() string { + return s.String() +} + +// SetSize sets the Size field's value. +func (s *BatchArrayProperties) SetSize(v int64) *BatchArrayProperties { + s.Size = &v + return s +} + +// The custom parameters to be used when the target is an AWS Batch job. +type BatchParameters struct { + _ struct{} `type:"structure"` + + // The array properties for the submitted job, such as the size of the array. + // The array size can be between 2 and 10,000. If you specify array properties + // for a job, it becomes an array job. This parameter is used only if the target + // is an AWS Batch job. + ArrayProperties *BatchArrayProperties `type:"structure"` + + // The ARN or name of the job definition to use if the event target is an AWS + // Batch job. This job definition must already exist. + // + // JobDefinition is a required field + JobDefinition *string `type:"string" required:"true"` + + // The name to use for this execution of the job, if the target is an AWS Batch + // job. + // + // JobName is a required field + JobName *string `type:"string" required:"true"` + + // The retry strategy to use for failed jobs if the target is an AWS Batch job. + // The retry strategy is the number of times to retry the failed job execution. + // Valid values are 1–10. When you specify a retry strategy here, it overrides + // the retry strategy defined in the job definition. + RetryStrategy *BatchRetryStrategy `type:"structure"` +} + +// String returns the string representation +func (s BatchParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchParameters"} + if s.JobDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("JobDefinition")) + } + if s.JobName == nil { + invalidParams.Add(request.NewErrParamRequired("JobName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArrayProperties sets the ArrayProperties field's value. +func (s *BatchParameters) SetArrayProperties(v *BatchArrayProperties) *BatchParameters { + s.ArrayProperties = v + return s +} + +// SetJobDefinition sets the JobDefinition field's value. +func (s *BatchParameters) SetJobDefinition(v string) *BatchParameters { + s.JobDefinition = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *BatchParameters) SetJobName(v string) *BatchParameters { + s.JobName = &v + return s +} + +// SetRetryStrategy sets the RetryStrategy field's value. +func (s *BatchParameters) SetRetryStrategy(v *BatchRetryStrategy) *BatchParameters { + s.RetryStrategy = v + return s +} + +// The retry strategy to use for failed jobs if the target is an AWS Batch job. +// If you specify a retry strategy here, it overrides the retry strategy defined +// in the job definition. +type BatchRetryStrategy struct { + _ struct{} `type:"structure"` + + // The number of times to attempt to retry, if the job fails. Valid values are + // 1–10. + Attempts *int64 `type:"integer"` +} + +// String returns the string representation +func (s BatchRetryStrategy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchRetryStrategy) GoString() string { + return s.String() +} + +// SetAttempts sets the Attempts field's value. +func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { + s.Attempts = &v + return s +} + +// A JSON string that you can use to limit the event bus permissions that you're +// granting to only accounts that fulfill the condition. Currently, the only +// supported condition is membership in a certain AWS organization. The string +// must contain Type, Key, and Value fields. The Value field specifies the ID +// of the AWS organization. The following is an example value for Condition: +// +// '{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' +type Condition struct { + _ struct{} `type:"structure"` + + // The key for the condition. Currently, the only supported key is aws:PrincipalOrgID. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // The type of condition. Currently, the only supported value is StringEquals. + // + // Type is a required field + Type *string `type:"string" required:"true"` + + // The value for the key. Currently, this must be the ID of the organization. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Condition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Condition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Condition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Condition"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Condition) SetKey(v string) *Condition { + s.Key = &v + return s +} + +// SetType sets the Type field's value. +func (s *Condition) SetType(v string) *Condition { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Condition) SetValue(v string) *Condition { + s.Value = &v + return s +} + +type CreateEventBusInput struct { + _ struct{} `type:"structure"` + + // If you're creating a partner event bus, this specifies the partner event + // source that the new event bus will be matched with. + EventSourceName *string `min:"1" type:"string"` + + // The name of the new event bus. + // + // The names of custom event buses can't contain the / character. You can't + // use the name default for a custom event bus because this name is already + // used for your account's default event bus. + // + // If this is a partner event bus, the name must exactly match the name of the + // partner event source that this event bus is matched to. This name will include + // the / character. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateEventBusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEventBusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEventBusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEventBusInput"} + if s.EventSourceName != nil && len(*s.EventSourceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventSourceName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventSourceName sets the EventSourceName field's value. +func (s *CreateEventBusInput) SetEventSourceName(v string) *CreateEventBusInput { + s.EventSourceName = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateEventBusInput) SetName(v string) *CreateEventBusInput { + s.Name = &v + return s +} + +type CreateEventBusOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the new event bus. + EventBusArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateEventBusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEventBusOutput) GoString() string { + return s.String() +} + +// SetEventBusArn sets the EventBusArn field's value. +func (s *CreateEventBusOutput) SetEventBusArn(v string) *CreateEventBusOutput { + s.EventBusArn = &v + return s +} + +type CreatePartnerEventSourceInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID of the customer who is permitted to create a matching + // partner event bus for this partner event source. + // + // Account is a required field + Account *string `min:"12" type:"string" required:"true"` + + // The name of the partner event source. This name must be unique and must be + // in the format partner_name/event_namespace/event_name . The AWS account that + // wants to use this partner event source must create a partner event bus with + // a name that matches the name of the partner event source. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreatePartnerEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePartnerEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePartnerEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePartnerEventSourceInput"} + if s.Account == nil { + invalidParams.Add(request.NewErrParamRequired("Account")) + } + if s.Account != nil && len(*s.Account) < 12 { + invalidParams.Add(request.NewErrParamMinLen("Account", 12)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccount sets the Account field's value. +func (s *CreatePartnerEventSourceInput) SetAccount(v string) *CreatePartnerEventSourceInput { + s.Account = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreatePartnerEventSourceInput) SetName(v string) *CreatePartnerEventSourceInput { + s.Name = &v + return s +} + +type CreatePartnerEventSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the partner event source. + EventSourceArn *string `type:"string"` +} + +// String returns the string representation +func (s CreatePartnerEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePartnerEventSourceOutput) GoString() string { + return s.String() +} + +// SetEventSourceArn sets the EventSourceArn field's value. +func (s *CreatePartnerEventSourceOutput) SetEventSourceArn(v string) *CreatePartnerEventSourceOutput { + s.EventSourceArn = &v + return s +} + +type DeactivateEventSourceInput struct { + _ struct{} `type:"structure"` + + // The name of the partner event source to deactivate. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeactivateEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeactivateEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeactivateEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeactivateEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeactivateEventSourceInput) SetName(v string) *DeactivateEventSourceInput { + s.Name = &v + return s +} + +type DeactivateEventSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeactivateEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeactivateEventSourceOutput) GoString() string { + return s.String() +} + +type DeleteEventBusInput struct { + _ struct{} `type:"structure"` + + // The name of the event bus to delete. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEventBusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventBusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventBusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventBusInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteEventBusInput) SetName(v string) *DeleteEventBusInput { + s.Name = &v + return s +} + +type DeleteEventBusOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteEventBusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventBusOutput) GoString() string { + return s.String() +} + +type DeletePartnerEventSourceInput struct { + _ struct{} `type:"structure"` + + // The AWS account ID of the AWS customer that the event source was created + // for. + // + // Account is a required field + Account *string `min:"12" type:"string" required:"true"` + + // The name of the event source to delete. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePartnerEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePartnerEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePartnerEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePartnerEventSourceInput"} + if s.Account == nil { + invalidParams.Add(request.NewErrParamRequired("Account")) + } + if s.Account != nil && len(*s.Account) < 12 { + invalidParams.Add(request.NewErrParamMinLen("Account", 12)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccount sets the Account field's value. +func (s *DeletePartnerEventSourceInput) SetAccount(v string) *DeletePartnerEventSourceInput { + s.Account = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeletePartnerEventSourceInput) SetName(v string) *DeletePartnerEventSourceInput { + s.Name = &v + return s +} + +type DeletePartnerEventSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePartnerEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePartnerEventSourceOutput) GoString() string { + return s.String() +} + +type DeleteRuleInput struct { + _ struct{} `type:"structure"` + + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // If this is a managed rule, created by an AWS service on your behalf, you + // must specify Force as True to delete the rule. This parameter is ignored + // for rules that are not managed rules. You can check whether a rule is a managed + // rule by using DescribeRule or ListRules and checking the ManagedBy field + // of the response. + Force *bool `type:"boolean"` + + // The name of the rule. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *DeleteRuleInput) SetEventBusName(v string) *DeleteRuleInput { + s.EventBusName = &v + return s +} + +// SetForce sets the Force field's value. +func (s *DeleteRuleInput) SetForce(v bool) *DeleteRuleInput { + s.Force = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteRuleInput) SetName(v string) *DeleteRuleInput { + s.Name = &v + return s +} + +type DeleteRuleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRuleOutput) GoString() string { + return s.String() +} + +type DescribeEventBusInput struct { + _ struct{} `type:"structure"` + + // The name of the event bus to show details for. If you omit this, the default + // event bus is displayed. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeEventBusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventBusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventBusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventBusInput"} + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribeEventBusInput) SetName(v string) *DescribeEventBusInput { + s.Name = &v + return s +} + +type DescribeEventBusOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the account permitted to write events to + // the current account. + Arn *string `type:"string"` + + // The name of the event bus. Currently, this is always default. + Name *string `type:"string"` + + // The policy that enables the external account to send events to your account. + Policy *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventBusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventBusOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeEventBusOutput) SetArn(v string) *DescribeEventBusOutput { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeEventBusOutput) SetName(v string) *DescribeEventBusOutput { + s.Name = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *DescribeEventBusOutput) SetPolicy(v string) *DescribeEventBusOutput { + s.Policy = &v + return s +} + +type DescribeEventSourceInput struct { + _ struct{} `type:"structure"` + + // The name of the partner event source to display the details of. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribeEventSourceInput) SetName(v string) *DescribeEventSourceInput { + s.Name = &v + return s +} + +type DescribeEventSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the partner event source. + Arn *string `type:"string"` + + // The name of the SaaS partner that created the event source. + CreatedBy *string `type:"string"` + + // The date and time that the event source was created. + CreationTime *time.Time `type:"timestamp"` + + // The date and time that the event source will expire if you don't create a + // matching event bus. + ExpirationTime *time.Time `type:"timestamp"` + + // The name of the partner event source. + Name *string `type:"string"` + + // The state of the event source. If it's ACTIVE, you have already created a + // matching event bus for this event source, and that event bus is active. If + // it's PENDING, either you haven't yet created a matching event bus, or that + // event bus is deactivated. If it's DELETED, you have created a matching event + // bus, but the event source has since been deleted. + State *string `type:"string" enum:"EventSourceState"` +} + +// String returns the string representation +func (s DescribeEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventSourceOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeEventSourceOutput) SetArn(v string) *DescribeEventSourceOutput { + s.Arn = &v + return s +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *DescribeEventSourceOutput) SetCreatedBy(v string) *DescribeEventSourceOutput { + s.CreatedBy = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeEventSourceOutput) SetCreationTime(v time.Time) *DescribeEventSourceOutput { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *DescribeEventSourceOutput) SetExpirationTime(v time.Time) *DescribeEventSourceOutput { + s.ExpirationTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeEventSourceOutput) SetName(v string) *DescribeEventSourceOutput { + s.Name = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeEventSourceOutput) SetState(v string) *DescribeEventSourceOutput { + s.State = &v + return s +} + +type DescribePartnerEventSourceInput struct { + _ struct{} `type:"structure"` + + // The name of the event source to display. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribePartnerEventSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePartnerEventSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePartnerEventSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePartnerEventSourceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DescribePartnerEventSourceInput) SetName(v string) *DescribePartnerEventSourceInput { + s.Name = &v + return s +} + +type DescribePartnerEventSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the event source. + Arn *string `type:"string"` + + // The name of the event source. + Name *string `type:"string"` +} + +// String returns the string representation +func (s DescribePartnerEventSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePartnerEventSourceOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribePartnerEventSourceOutput) SetArn(v string) *DescribePartnerEventSourceOutput { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribePartnerEventSourceOutput) SetName(v string) *DescribePartnerEventSourceOutput { + s.Name = &v + return s +} + +type DescribeRuleInput struct { + _ struct{} `type:"structure"` + + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // The name of the rule. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *DescribeRuleInput) SetEventBusName(v string) *DescribeRuleInput { + s.EventBusName = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeRuleInput) SetName(v string) *DescribeRuleInput { + s.Name = &v + return s +} + +type DescribeRuleOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the rule. + Arn *string `min:"1" type:"string"` + + // The description of the rule. + Description *string `type:"string"` + + // The event bus associated with the rule. + EventBusName *string `min:"1" type:"string"` + + // The event pattern. For more information, see Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // in the Amazon EventBridge User Guide. + EventPattern *string `type:"string"` + + // If this is a managed rule, created by an AWS service on your behalf, this + // field displays the principal name of the AWS service that created the rule. + ManagedBy *string `min:"1" type:"string"` + + // The name of the rule. + Name *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the IAM role associated with the rule. + RoleArn *string `min:"1" type:"string"` + + // The scheduling expression: for example, "cron(0 20 * * ? *)" or "rate(5 minutes)". + ScheduleExpression *string `type:"string"` + + // Specifies whether the rule is enabled or disabled. + State *string `type:"string" enum:"RuleState"` +} + +// String returns the string representation +func (s DescribeRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRuleOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeRuleOutput) SetArn(v string) *DescribeRuleOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DescribeRuleOutput) SetDescription(v string) *DescribeRuleOutput { + s.Description = &v + return s +} + +// SetEventBusName sets the EventBusName field's value. +func (s *DescribeRuleOutput) SetEventBusName(v string) *DescribeRuleOutput { + s.EventBusName = &v + return s +} + +// SetEventPattern sets the EventPattern field's value. +func (s *DescribeRuleOutput) SetEventPattern(v string) *DescribeRuleOutput { + s.EventPattern = &v + return s +} + +// SetManagedBy sets the ManagedBy field's value. +func (s *DescribeRuleOutput) SetManagedBy(v string) *DescribeRuleOutput { + s.ManagedBy = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeRuleOutput) SetName(v string) *DescribeRuleOutput { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeRuleOutput) SetRoleArn(v string) *DescribeRuleOutput { + s.RoleArn = &v + return s +} + +// SetScheduleExpression sets the ScheduleExpression field's value. +func (s *DescribeRuleOutput) SetScheduleExpression(v string) *DescribeRuleOutput { + s.ScheduleExpression = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeRuleOutput) SetState(v string) *DescribeRuleOutput { + s.State = &v + return s +} + +type DisableRuleInput struct { + _ struct{} `type:"structure"` + + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // The name of the rule. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *DisableRuleInput) SetEventBusName(v string) *DisableRuleInput { + s.EventBusName = &v + return s +} + +// SetName sets the Name field's value. +func (s *DisableRuleInput) SetName(v string) *DisableRuleInput { + s.Name = &v + return s +} + +type DisableRuleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableRuleOutput) GoString() string { + return s.String() +} + +// The custom parameters to be used when the target is an Amazon ECS task. +type EcsParameters struct { + _ struct{} `type:"structure"` + + // Specifies an ECS task group for the task. The maximum length is 255 characters. + Group *string `type:"string"` + + // Specifies the launch type on which your task is running. The launch type + // that you specify here must match one of the launch type (compatibilities) + // of the target task. The FARGATE value is supported only in the Regions where + // AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate + // on Amazon ECS (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS-Fargate.html) + // in the Amazon Elastic Container Service Developer Guide. + LaunchType *string `type:"string" enum:"LaunchType"` + + // Use this structure if the ECS task uses the awsvpc network mode. This structure + // specifies the VPC subnets and security groups associated with the task and + // whether a public IP address is to be used. This structure is required if + // LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks. + // + // If you specify NetworkConfiguration when the target ECS task doesn't use + // the awsvpc network mode, the task fails. + NetworkConfiguration *NetworkConfiguration `type:"structure"` + + // Specifies the platform version for the task. Specify only the numeric portion + // of the platform version, such as 1.1.0. + // + // This structure is used only if LaunchType is FARGATE. For more information + // about valid platform versions, see AWS Fargate Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. + PlatformVersion *string `type:"string"` + + // The number of tasks to create based on TaskDefinition. The default is 1. + TaskCount *int64 `min:"1" type:"integer"` + + // The ARN of the task definition to use if the event target is an Amazon ECS + // task. + // + // TaskDefinitionArn is a required field + TaskDefinitionArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s EcsParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EcsParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EcsParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EcsParameters"} + if s.TaskCount != nil && *s.TaskCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("TaskCount", 1)) + } + if s.TaskDefinitionArn == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDefinitionArn")) + } + if s.TaskDefinitionArn != nil && len(*s.TaskDefinitionArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskDefinitionArn", 1)) + } + if s.NetworkConfiguration != nil { + if err := s.NetworkConfiguration.Validate(); err != nil { + invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroup sets the Group field's value. +func (s *EcsParameters) SetGroup(v string) *EcsParameters { + s.Group = &v + return s +} + +// SetLaunchType sets the LaunchType field's value. +func (s *EcsParameters) SetLaunchType(v string) *EcsParameters { + s.LaunchType = &v + return s +} + +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *EcsParameters) SetNetworkConfiguration(v *NetworkConfiguration) *EcsParameters { + s.NetworkConfiguration = v + return s +} + +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *EcsParameters) SetPlatformVersion(v string) *EcsParameters { + s.PlatformVersion = &v + return s +} + +// SetTaskCount sets the TaskCount field's value. +func (s *EcsParameters) SetTaskCount(v int64) *EcsParameters { + s.TaskCount = &v + return s +} + +// SetTaskDefinitionArn sets the TaskDefinitionArn field's value. +func (s *EcsParameters) SetTaskDefinitionArn(v string) *EcsParameters { + s.TaskDefinitionArn = &v + return s +} + +type EnableRuleInput struct { + _ struct{} `type:"structure"` + + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // The name of the rule. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *EnableRuleInput) SetEventBusName(v string) *EnableRuleInput { + s.EventBusName = &v + return s +} + +// SetName sets the Name field's value. +func (s *EnableRuleInput) SetName(v string) *EnableRuleInput { + s.Name = &v + return s +} + +type EnableRuleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableRuleOutput) GoString() string { + return s.String() +} + +// An event bus receives events from a source and routes them to rules associated +// with that event bus. Your account's default event bus receives rules from +// AWS services. A custom event bus can receive rules from AWS services as well +// as your custom applications and services. A partner event bus receives events +// from an event source created by an SaaS partner. These events come from the +// partners services or applications. +type EventBus struct { + _ struct{} `type:"structure"` + + // The ARN of the event bus. + Arn *string `type:"string"` + + // The name of the event bus. + Name *string `type:"string"` + + // The permissions policy of the event bus, describing which other AWS accounts + // can write events to this event bus. + Policy *string `type:"string"` +} + +// String returns the string representation +func (s EventBus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventBus) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *EventBus) SetArn(v string) *EventBus { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *EventBus) SetName(v string) *EventBus { + s.Name = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *EventBus) SetPolicy(v string) *EventBus { + s.Policy = &v + return s +} + +// A partner event source is created by an SaaS partner. If a customer creates +// a partner event bus that matches this event source, that AWS account can +// receive events from the partner's applications or services. +type EventSource struct { + _ struct{} `type:"structure"` + + // The ARN of the event source. + Arn *string `type:"string"` + + // The name of the partner that created the event source. + CreatedBy *string `type:"string"` + + // The date and time when the event source was created. + CreationTime *time.Time `type:"timestamp"` + + // The date and time when the event source will expire if the AWS account doesn't + // create a matching event bus for it. + ExpirationTime *time.Time `type:"timestamp"` + + // The name of the event source. + Name *string `type:"string"` + + // The state of the event source. If it's ACTIVE, you have already created a + // matching event bus for this event source, and that event bus is active. If + // it's PENDING, either you haven't yet created a matching event bus, or that + // event bus is deactivated. If it's DELETED, you have created a matching event + // bus, but the event source has since been deleted. + State *string `type:"string" enum:"EventSourceState"` +} + +// String returns the string representation +func (s EventSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventSource) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *EventSource) SetArn(v string) *EventSource { + s.Arn = &v + return s +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *EventSource) SetCreatedBy(v string) *EventSource { + s.CreatedBy = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *EventSource) SetCreationTime(v time.Time) *EventSource { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *EventSource) SetExpirationTime(v time.Time) *EventSource { + s.ExpirationTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *EventSource) SetName(v string) *EventSource { + s.Name = &v + return s +} + +// SetState sets the State field's value. +func (s *EventSource) SetState(v string) *EventSource { + s.State = &v + return s +} + +// Contains the parameters needed for you to provide custom input to a target +// based on one or more pieces of data extracted from the event. +type InputTransformer struct { + _ struct{} `type:"structure"` + + // Map of JSON paths to be extracted from the event. You can then insert these + // in the template in InputTemplate to produce the output to be sent to the + // target. + // + // InputPathsMap is an array key-value pairs, where each value is a valid JSON + // path. You can have as many as 10 key-value pairs. You must use JSON dot notation, + // not bracket notation. + // + // The keys can't start with "AWS". + InputPathsMap map[string]*string `type:"map"` + + // Input template where you specify placeholders that will be filled with the + // values of the keys from InputPathsMap to customize the data sent to the target. + // Enclose each InputPathsMaps value in brackets: . The InputTemplate + // must be valid JSON. + // + // If InputTemplate is a JSON object (surrounded by curly braces), the following + // restrictions apply: + // + // * The placeholder can't be used as an object key + // + // * Object values can't include quote marks + // + // The following example shows the syntax for using InputPathsMap and InputTemplate. + // + // "InputTransformer": + // + // { + // + // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, + // + // "InputTemplate": " is in state " + // + // } + // + // To have the InputTemplate include quote marks within a JSON string, escape + // each quote marks with a slash, as in the following example: + // + // "InputTransformer": + // + // { + // + // "InputPathsMap": {"instance": "$.detail.instance","status": "$.detail.status"}, + // + // "InputTemplate": " is in state \"\"" + // + // } + // + // InputTemplate is a required field + InputTemplate *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s InputTransformer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputTransformer) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputTransformer) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputTransformer"} + if s.InputTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("InputTemplate")) + } + if s.InputTemplate != nil && len(*s.InputTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputTemplate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputPathsMap sets the InputPathsMap field's value. +func (s *InputTransformer) SetInputPathsMap(v map[string]*string) *InputTransformer { + s.InputPathsMap = v + return s +} + +// SetInputTemplate sets the InputTemplate field's value. +func (s *InputTransformer) SetInputTemplate(v string) *InputTransformer { + s.InputTemplate = &v + return s +} + +// This object enables you to specify a JSON path to extract from the event +// and use as the partition key for the Amazon Kinesis data stream so that you +// can control the shard that the event goes to. If you don't include this parameter, +// the default is to use the eventId as the partition key. +type KinesisParameters struct { + _ struct{} `type:"structure"` + + // The JSON path to be extracted from the event and used as the partition key. + // For more information, see Amazon Kinesis Streams Key Concepts (https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html#partition-key) + // in the Amazon Kinesis Streams Developer Guide. + // + // PartitionKeyPath is a required field + PartitionKeyPath *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s KinesisParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisParameters"} + if s.PartitionKeyPath == nil { + invalidParams.Add(request.NewErrParamRequired("PartitionKeyPath")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPartitionKeyPath sets the PartitionKeyPath field's value. +func (s *KinesisParameters) SetPartitionKeyPath(v string) *KinesisParameters { + s.PartitionKeyPath = &v + return s +} + +type ListEventBusesInput struct { + _ struct{} `type:"structure"` + + // Specifying this limits the number of results returned by this operation. + // The operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` + + // Specifying this limits the results to only those event buses with names that + // start with the specified prefix. + NamePrefix *string `min:"1" type:"string"` + + // The token returned by a previous call to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListEventBusesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEventBusesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEventBusesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEventBusesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListEventBusesInput) SetLimit(v int64) *ListEventBusesInput { + s.Limit = &v + return s +} + +// SetNamePrefix sets the NamePrefix field's value. +func (s *ListEventBusesInput) SetNamePrefix(v string) *ListEventBusesInput { + s.NamePrefix = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEventBusesInput) SetNextToken(v string) *ListEventBusesInput { + s.NextToken = &v + return s +} + +type ListEventBusesOutput struct { + _ struct{} `type:"structure"` + + // This list of event buses. + EventBuses []*EventBus `type:"list"` + + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListEventBusesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEventBusesOutput) GoString() string { + return s.String() +} + +// SetEventBuses sets the EventBuses field's value. +func (s *ListEventBusesOutput) SetEventBuses(v []*EventBus) *ListEventBusesOutput { + s.EventBuses = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEventBusesOutput) SetNextToken(v string) *ListEventBusesOutput { + s.NextToken = &v + return s +} + +type ListEventSourcesInput struct { + _ struct{} `type:"structure"` + + // Specifying this limits the number of results returned by this operation. + // The operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` + + // Specifying this limits the results to only those partner event sources with + // names that start with the specified prefix. + NamePrefix *string `min:"1" type:"string"` + + // The token returned by a previous call to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListEventSourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEventSourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEventSourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEventSourcesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListEventSourcesInput) SetLimit(v int64) *ListEventSourcesInput { + s.Limit = &v + return s +} + +// SetNamePrefix sets the NamePrefix field's value. +func (s *ListEventSourcesInput) SetNamePrefix(v string) *ListEventSourcesInput { + s.NamePrefix = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEventSourcesInput) SetNextToken(v string) *ListEventSourcesInput { + s.NextToken = &v + return s +} + +type ListEventSourcesOutput struct { + _ struct{} `type:"structure"` + + // The list of event sources. + EventSources []*EventSource `type:"list"` + + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListEventSourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEventSourcesOutput) GoString() string { + return s.String() +} + +// SetEventSources sets the EventSources field's value. +func (s *ListEventSourcesOutput) SetEventSources(v []*EventSource) *ListEventSourcesOutput { + s.EventSources = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEventSourcesOutput) SetNextToken(v string) *ListEventSourcesOutput { + s.NextToken = &v + return s +} + +type ListPartnerEventSourceAccountsInput struct { + _ struct{} `type:"structure"` + + // The name of the partner event source to display account information about. + // + // EventSourceName is a required field + EventSourceName *string `min:"1" type:"string" required:"true"` + + // Specifying this limits the number of results returned by this operation. + // The operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` + + // The token returned by a previous call to this operation. Specifying this + // retrieves the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListPartnerEventSourceAccountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPartnerEventSourceAccountsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPartnerEventSourceAccountsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPartnerEventSourceAccountsInput"} + if s.EventSourceName == nil { + invalidParams.Add(request.NewErrParamRequired("EventSourceName")) + } + if s.EventSourceName != nil && len(*s.EventSourceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventSourceName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventSourceName sets the EventSourceName field's value. +func (s *ListPartnerEventSourceAccountsInput) SetEventSourceName(v string) *ListPartnerEventSourceAccountsInput { + s.EventSourceName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListPartnerEventSourceAccountsInput) SetLimit(v int64) *ListPartnerEventSourceAccountsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourceAccountsInput) SetNextToken(v string) *ListPartnerEventSourceAccountsInput { + s.NextToken = &v + return s +} + +type ListPartnerEventSourceAccountsOutput struct { + _ struct{} `type:"structure"` + + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` + + // The list of partner event sources returned by the operation. + PartnerEventSourceAccounts []*PartnerEventSourceAccount `type:"list"` +} + +// String returns the string representation +func (s ListPartnerEventSourceAccountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPartnerEventSourceAccountsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourceAccountsOutput) SetNextToken(v string) *ListPartnerEventSourceAccountsOutput { + s.NextToken = &v + return s +} + +// SetPartnerEventSourceAccounts sets the PartnerEventSourceAccounts field's value. +func (s *ListPartnerEventSourceAccountsOutput) SetPartnerEventSourceAccounts(v []*PartnerEventSourceAccount) *ListPartnerEventSourceAccountsOutput { + s.PartnerEventSourceAccounts = v + return s +} + +type ListPartnerEventSourcesInput struct { + _ struct{} `type:"structure"` + + // pecifying this limits the number of results returned by this operation. The + // operation also returns a NextToken that you can use in a subsequent operation + // to retrieve the next set of results. + Limit *int64 `min:"1" type:"integer"` + + // If you specify this, the results are limited to only those partner event + // sources that start with the string you specify. + // + // NamePrefix is a required field + NamePrefix *string `min:"1" type:"string" required:"true"` + + // The token returned by a previous call to this operation. Specifying this + // retrieves the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListPartnerEventSourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPartnerEventSourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPartnerEventSourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPartnerEventSourcesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NamePrefix == nil { + invalidParams.Add(request.NewErrParamRequired("NamePrefix")) + } + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *ListPartnerEventSourcesInput) SetLimit(v int64) *ListPartnerEventSourcesInput { + s.Limit = &v + return s +} + +// SetNamePrefix sets the NamePrefix field's value. +func (s *ListPartnerEventSourcesInput) SetNamePrefix(v string) *ListPartnerEventSourcesInput { + s.NamePrefix = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourcesInput) SetNextToken(v string) *ListPartnerEventSourcesInput { + s.NextToken = &v + return s +} + +type ListPartnerEventSourcesOutput struct { + _ struct{} `type:"structure"` + + // A token you can use in a subsequent operation to retrieve the next set of + // results. + NextToken *string `min:"1" type:"string"` + + // The list of partner event sources returned by the operation. + PartnerEventSources []*PartnerEventSource `type:"list"` +} + +// String returns the string representation +func (s ListPartnerEventSourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPartnerEventSourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPartnerEventSourcesOutput) SetNextToken(v string) *ListPartnerEventSourcesOutput { + s.NextToken = &v + return s +} + +// SetPartnerEventSources sets the PartnerEventSources field's value. +func (s *ListPartnerEventSourcesOutput) SetPartnerEventSources(v []*PartnerEventSource) *ListPartnerEventSourcesOutput { + s.PartnerEventSources = v + return s +} + +type ListRuleNamesByTargetInput struct { + _ struct{} `type:"structure"` + + // Limits the results to show only the rules associated with the specified event + // bus. + EventBusName *string `min:"1" type:"string"` + + // The maximum number of results to return. + Limit *int64 `min:"1" type:"integer"` + + // The token returned by a previous call to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the target resource. + // + // TargetArn is a required field + TargetArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListRuleNamesByTargetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRuleNamesByTargetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRuleNamesByTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRuleNamesByTargetInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.TargetArn == nil { + invalidParams.Add(request.NewErrParamRequired("TargetArn")) + } + if s.TargetArn != nil && len(*s.TargetArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *ListRuleNamesByTargetInput) SetEventBusName(v string) *ListRuleNamesByTargetInput { + s.EventBusName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListRuleNamesByTargetInput) SetLimit(v int64) *ListRuleNamesByTargetInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRuleNamesByTargetInput) SetNextToken(v string) *ListRuleNamesByTargetInput { + s.NextToken = &v + return s +} + +// SetTargetArn sets the TargetArn field's value. +func (s *ListRuleNamesByTargetInput) SetTargetArn(v string) *ListRuleNamesByTargetInput { + s.TargetArn = &v + return s +} + +type ListRuleNamesByTargetOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there are additional results to retrieve. If there are + // no more results, the value is null. + NextToken *string `min:"1" type:"string"` + + // The names of the rules that can invoke the given target. + RuleNames []*string `type:"list"` +} + +// String returns the string representation +func (s ListRuleNamesByTargetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRuleNamesByTargetOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRuleNamesByTargetOutput) SetNextToken(v string) *ListRuleNamesByTargetOutput { + s.NextToken = &v + return s +} + +// SetRuleNames sets the RuleNames field's value. +func (s *ListRuleNamesByTargetOutput) SetRuleNames(v []*string) *ListRuleNamesByTargetOutput { + s.RuleNames = v + return s +} + +type ListRulesInput struct { + _ struct{} `type:"structure"` + + // Limits the results to show only the rules associated with the specified event + // bus. + EventBusName *string `min:"1" type:"string"` + + // The maximum number of results to return. + Limit *int64 `min:"1" type:"integer"` + + // The prefix matching the rule name. + NamePrefix *string `min:"1" type:"string"` + + // The token returned by a previous call to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRulesInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *ListRulesInput) SetEventBusName(v string) *ListRulesInput { + s.EventBusName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListRulesInput) SetLimit(v int64) *ListRulesInput { + s.Limit = &v + return s +} + +// SetNamePrefix sets the NamePrefix field's value. +func (s *ListRulesInput) SetNamePrefix(v string) *ListRulesInput { + s.NamePrefix = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRulesInput) SetNextToken(v string) *ListRulesInput { + s.NextToken = &v + return s +} + +type ListRulesOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there are additional results to retrieve. If there are + // no more results, the value is null. + NextToken *string `min:"1" type:"string"` + + // The rules that match the specified criteria. + Rules []*Rule `type:"list"` +} + +// String returns the string representation +func (s ListRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRulesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRulesOutput) SetNextToken(v string) *ListRulesOutput { + s.NextToken = &v + return s +} + +// SetRules sets the Rules field's value. +func (s *ListRulesOutput) SetRules(v []*Rule) *ListRulesOutput { + s.Rules = v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the rule for which you want to view tags. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The list of tag keys and values associated with the rule that you specified. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +type ListTargetsByRuleInput struct { + _ struct{} `type:"structure"` + + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // The maximum number of results to return. + Limit *int64 `min:"1" type:"integer"` + + // The token returned by a previous call to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` + + // The name of the rule. + // + // Rule is a required field + Rule *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTargetsByRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTargetsByRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTargetsByRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTargetsByRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.Rule == nil { + invalidParams.Add(request.NewErrParamRequired("Rule")) + } + if s.Rule != nil && len(*s.Rule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *ListTargetsByRuleInput) SetEventBusName(v string) *ListTargetsByRuleInput { + s.EventBusName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListTargetsByRuleInput) SetLimit(v int64) *ListTargetsByRuleInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTargetsByRuleInput) SetNextToken(v string) *ListTargetsByRuleInput { + s.NextToken = &v + return s +} + +// SetRule sets the Rule field's value. +func (s *ListTargetsByRuleInput) SetRule(v string) *ListTargetsByRuleInput { + s.Rule = &v + return s +} + +type ListTargetsByRuleOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there are additional results to retrieve. If there are + // no more results, the value is null. + NextToken *string `min:"1" type:"string"` + + // The targets assigned to the rule. + Targets []*Target `min:"1" type:"list"` +} + +// String returns the string representation +func (s ListTargetsByRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTargetsByRuleOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTargetsByRuleOutput) SetNextToken(v string) *ListTargetsByRuleOutput { + s.NextToken = &v + return s +} + +// SetTargets sets the Targets field's value. +func (s *ListTargetsByRuleOutput) SetTargets(v []*Target) *ListTargetsByRuleOutput { + s.Targets = v + return s +} + +// This structure specifies the network configuration for an ECS task. +type NetworkConfiguration struct { + _ struct{} `type:"structure"` + + // Use this structure to specify the VPC subnets and security groups for the + // task and whether a public IP address is to be used. This structure is relevant + // only for ECS tasks that use the awsvpc network mode. + AwsvpcConfiguration *AwsVpcConfiguration `locationName:"awsvpcConfiguration" type:"structure"` +} + +// String returns the string representation +func (s NetworkConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NetworkConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NetworkConfiguration"} + if s.AwsvpcConfiguration != nil { + if err := s.AwsvpcConfiguration.Validate(); err != nil { + invalidParams.AddNested("AwsvpcConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAwsvpcConfiguration sets the AwsvpcConfiguration field's value. +func (s *NetworkConfiguration) SetAwsvpcConfiguration(v *AwsVpcConfiguration) *NetworkConfiguration { + s.AwsvpcConfiguration = v + return s +} + +// A partner event source is created by an SaaS partner. If a customer creates +// a partner event bus that matches this event source, that AWS account can +// receive events from the partner's applications or services. +type PartnerEventSource struct { + _ struct{} `type:"structure"` + + // The ARN of the partner event source. + Arn *string `type:"string"` + + // The name of the partner event source. + Name *string `type:"string"` +} + +// String returns the string representation +func (s PartnerEventSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PartnerEventSource) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *PartnerEventSource) SetArn(v string) *PartnerEventSource { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *PartnerEventSource) SetName(v string) *PartnerEventSource { + s.Name = &v + return s +} + +// The AWS account that a partner event source has been offered to. +type PartnerEventSourceAccount struct { + _ struct{} `type:"structure"` + + // The AWS account ID that the partner event source was offered to. + Account *string `min:"12" type:"string"` + + // The date and time when the event source was created. + CreationTime *time.Time `type:"timestamp"` + + // The date and time when the event source will expire if the AWS account doesn't + // create a matching event bus for it. + ExpirationTime *time.Time `type:"timestamp"` + + // The state of the event source. If it's ACTIVE, you have already created a + // matching event bus for this event source, and that event bus is active. If + // it's PENDING, either you haven't yet created a matching event bus, or that + // event bus is deactivated. If it's DELETED, you have created a matching event + // bus, but the event source has since been deleted. + State *string `type:"string" enum:"EventSourceState"` +} + +// String returns the string representation +func (s PartnerEventSourceAccount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PartnerEventSourceAccount) GoString() string { + return s.String() +} + +// SetAccount sets the Account field's value. +func (s *PartnerEventSourceAccount) SetAccount(v string) *PartnerEventSourceAccount { + s.Account = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *PartnerEventSourceAccount) SetCreationTime(v time.Time) *PartnerEventSourceAccount { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *PartnerEventSourceAccount) SetExpirationTime(v time.Time) *PartnerEventSourceAccount { + s.ExpirationTime = &v + return s +} + +// SetState sets the State field's value. +func (s *PartnerEventSourceAccount) SetState(v string) *PartnerEventSourceAccount { + s.State = &v + return s +} + +type PutEventsInput struct { + _ struct{} `type:"structure"` + + // The entry that defines an event in your system. You can specify several parameters + // for the entry such as the source and type of the event, resources associated + // with the event, and so on. + // + // Entries is a required field + Entries []*PutEventsRequestEntry `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s PutEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventsInput"} + if s.Entries == nil { + invalidParams.Add(request.NewErrParamRequired("Entries")) + } + if s.Entries != nil && len(s.Entries) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) + } + if s.Entries != nil { + for i, v := range s.Entries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEntries sets the Entries field's value. +func (s *PutEventsInput) SetEntries(v []*PutEventsRequestEntry) *PutEventsInput { + s.Entries = v + return s +} + +type PutEventsOutput struct { + _ struct{} `type:"structure"` + + // The successfully and unsuccessfully ingested events results. If the ingestion + // was successful, the entry has the event ID in it. Otherwise, you can use + // the error code and error message to identify the problem with the entry. + Entries []*PutEventsResultEntry `type:"list"` + + // The number of failed entries. + FailedEntryCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s PutEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsOutput) GoString() string { + return s.String() +} + +// SetEntries sets the Entries field's value. +func (s *PutEventsOutput) SetEntries(v []*PutEventsResultEntry) *PutEventsOutput { + s.Entries = v + return s +} + +// SetFailedEntryCount sets the FailedEntryCount field's value. +func (s *PutEventsOutput) SetFailedEntryCount(v int64) *PutEventsOutput { + s.FailedEntryCount = &v + return s +} + +// Represents an event to be submitted. +type PutEventsRequestEntry struct { + _ struct{} `type:"structure"` + + // A valid JSON string. There is no other schema imposed. The JSON string can + // contain fields and nested subobjects. + Detail *string `type:"string"` + + // Free-form string used to decide which fields to expect in the event detail. + DetailType *string `type:"string"` + + // The event bus that will receive the event. Only the rules that are associated + // with this event bus can match the event. + EventBusName *string `min:"1" type:"string"` + + // AWS resources, identified by Amazon Resource Name (ARN), that the event primarily + // concerns. Any number, including zero, can be present. + Resources []*string `type:"list"` + + // The source of the event. This field is required. + Source *string `type:"string"` + + // The timestamp of the event, per RFC3339 (https://www.rfc-editor.org/rfc/rfc3339.txt). + // If no timestamp is provided, the timestamp of the PutEvents call is used. + Time *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s PutEventsRequestEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsRequestEntry) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventsRequestEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventsRequestEntry"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDetail sets the Detail field's value. +func (s *PutEventsRequestEntry) SetDetail(v string) *PutEventsRequestEntry { + s.Detail = &v + return s +} + +// SetDetailType sets the DetailType field's value. +func (s *PutEventsRequestEntry) SetDetailType(v string) *PutEventsRequestEntry { + s.DetailType = &v + return s +} + +// SetEventBusName sets the EventBusName field's value. +func (s *PutEventsRequestEntry) SetEventBusName(v string) *PutEventsRequestEntry { + s.EventBusName = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *PutEventsRequestEntry) SetResources(v []*string) *PutEventsRequestEntry { + s.Resources = v + return s +} + +// SetSource sets the Source field's value. +func (s *PutEventsRequestEntry) SetSource(v string) *PutEventsRequestEntry { + s.Source = &v + return s +} + +// SetTime sets the Time field's value. +func (s *PutEventsRequestEntry) SetTime(v time.Time) *PutEventsRequestEntry { + s.Time = &v + return s +} + +// Represents an event that failed to be submitted. +type PutEventsResultEntry struct { + _ struct{} `type:"structure"` + + // The error code that indicates why the event submission failed. + ErrorCode *string `type:"string"` + + // The error message that explains why the event submission failed. + ErrorMessage *string `type:"string"` + + // The ID of the event. + EventId *string `type:"string"` +} + +// String returns the string representation +func (s PutEventsResultEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsResultEntry) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *PutEventsResultEntry) SetErrorCode(v string) *PutEventsResultEntry { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *PutEventsResultEntry) SetErrorMessage(v string) *PutEventsResultEntry { + s.ErrorMessage = &v + return s +} + +// SetEventId sets the EventId field's value. +func (s *PutEventsResultEntry) SetEventId(v string) *PutEventsResultEntry { + s.EventId = &v + return s +} + +type PutPartnerEventsInput struct { + _ struct{} `type:"structure"` + + // The list of events to write to the event bus. + // + // Entries is a required field + Entries []*PutPartnerEventsRequestEntry `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s PutPartnerEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPartnerEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPartnerEventsInput"} + if s.Entries == nil { + invalidParams.Add(request.NewErrParamRequired("Entries")) + } + if s.Entries != nil && len(s.Entries) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Entries", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEntries sets the Entries field's value. +func (s *PutPartnerEventsInput) SetEntries(v []*PutPartnerEventsRequestEntry) *PutPartnerEventsInput { + s.Entries = v + return s +} + +type PutPartnerEventsOutput struct { + _ struct{} `type:"structure"` + + // The list of events from this operation that were successfully written to + // the partner event bus. + Entries []*PutPartnerEventsResultEntry `type:"list"` + + // The number of events from this operation that couldn't be written to the + // partner event bus. + FailedEntryCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s PutPartnerEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsOutput) GoString() string { + return s.String() +} + +// SetEntries sets the Entries field's value. +func (s *PutPartnerEventsOutput) SetEntries(v []*PutPartnerEventsResultEntry) *PutPartnerEventsOutput { + s.Entries = v + return s +} + +// SetFailedEntryCount sets the FailedEntryCount field's value. +func (s *PutPartnerEventsOutput) SetFailedEntryCount(v int64) *PutPartnerEventsOutput { + s.FailedEntryCount = &v + return s +} + +// The details about an event generated by an SaaS partner. +type PutPartnerEventsRequestEntry struct { + _ struct{} `type:"structure"` + + // A valid JSON string. There is no other schema imposed. The JSON string can + // contain fields and nested subobjects. + Detail *string `type:"string"` + + // A free-form string used to decide which fields to expect in the event detail. + DetailType *string `type:"string"` + + // AWS resources, identified by Amazon Resource Name (ARN), that the event primarily + // concerns. Any number, including zero, can be present. + Resources []*string `type:"list"` + + // The event source that is generating the evntry. + Source *string `type:"string"` + + // The date and time of the event. + Time *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s PutPartnerEventsRequestEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsRequestEntry) GoString() string { + return s.String() +} + +// SetDetail sets the Detail field's value. +func (s *PutPartnerEventsRequestEntry) SetDetail(v string) *PutPartnerEventsRequestEntry { + s.Detail = &v + return s +} + +// SetDetailType sets the DetailType field's value. +func (s *PutPartnerEventsRequestEntry) SetDetailType(v string) *PutPartnerEventsRequestEntry { + s.DetailType = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *PutPartnerEventsRequestEntry) SetResources(v []*string) *PutPartnerEventsRequestEntry { + s.Resources = v + return s +} + +// SetSource sets the Source field's value. +func (s *PutPartnerEventsRequestEntry) SetSource(v string) *PutPartnerEventsRequestEntry { + s.Source = &v + return s +} + +// SetTime sets the Time field's value. +func (s *PutPartnerEventsRequestEntry) SetTime(v time.Time) *PutPartnerEventsRequestEntry { + s.Time = &v + return s +} + +// Represents an event that a partner tried to generate but failed. +type PutPartnerEventsResultEntry struct { + _ struct{} `type:"structure"` + + // The error code that indicates why the event submission failed. + ErrorCode *string `type:"string"` + + // The error message that explains why the event submission failed. + ErrorMessage *string `type:"string"` + + // The ID of the event. + EventId *string `type:"string"` +} + +// String returns the string representation +func (s PutPartnerEventsResultEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPartnerEventsResultEntry) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *PutPartnerEventsResultEntry) SetErrorCode(v string) *PutPartnerEventsResultEntry { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *PutPartnerEventsResultEntry) SetErrorMessage(v string) *PutPartnerEventsResultEntry { + s.ErrorMessage = &v + return s +} + +// SetEventId sets the EventId field's value. +func (s *PutPartnerEventsResultEntry) SetEventId(v string) *PutPartnerEventsResultEntry { + s.EventId = &v + return s +} + +type PutPermissionInput struct { + _ struct{} `type:"structure"` + + // The action that you're enabling the other account to perform. Currently, + // this must be events:PutEvents. + // + // Action is a required field + Action *string `min:"1" type:"string" required:"true"` + + // This parameter enables you to limit the permission to accounts that fulfill + // a certain condition, such as being a member of a certain AWS organization. + // For more information about AWS Organizations, see What Is AWS Organizations? + // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) + // in the AWS Organizations User Guide. + // + // If you specify Condition with an AWS organization ID and specify "*" as the + // value for Principal, you grant permission to all the accounts in the named + // organization. + // + // The Condition is a JSON string that must contain Type, Key, and Value fields. + Condition *Condition `type:"structure"` + + // The event bus associated with the rule. If you omit this, the default event + // bus is used. + EventBusName *string `min:"1" type:"string"` + + // The 12-digit AWS account ID that you are permitting to put events to your + // default event bus. Specify "*" to permit any account to put events to your + // default event bus. + // + // If you specify "*" without specifying Condition, avoid creating rules that + // might match undesirable events. To create more secure rules, make sure that + // the event pattern for each rule contains an account field with a specific + // account ID to receive events from. Rules with an account field don't match + // any events sent from other accounts. + // + // Principal is a required field + Principal *string `min:"1" type:"string" required:"true"` + + // An identifier string for the external account that you're granting permissions + // to. If you later want to revoke the permission for this external account, + // specify this StatementId when you run RemovePermission. + // + // StatementId is a required field + StatementId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutPermissionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPermissionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPermissionInput"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.Action != nil && len(*s.Action) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Action", 1)) + } + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Principal == nil { + invalidParams.Add(request.NewErrParamRequired("Principal")) + } + if s.Principal != nil && len(*s.Principal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Principal", 1)) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + if s.Condition != nil { + if err := s.Condition.Validate(); err != nil { + invalidParams.AddNested("Condition", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *PutPermissionInput) SetAction(v string) *PutPermissionInput { + s.Action = &v + return s +} + +// SetCondition sets the Condition field's value. +func (s *PutPermissionInput) SetCondition(v *Condition) *PutPermissionInput { + s.Condition = v + return s +} + +// SetEventBusName sets the EventBusName field's value. +func (s *PutPermissionInput) SetEventBusName(v string) *PutPermissionInput { + s.EventBusName = &v + return s +} + +// SetPrincipal sets the Principal field's value. +func (s *PutPermissionInput) SetPrincipal(v string) *PutPermissionInput { + s.Principal = &v + return s +} + +// SetStatementId sets the StatementId field's value. +func (s *PutPermissionInput) SetStatementId(v string) *PutPermissionInput { + s.StatementId = &v + return s +} + +type PutPermissionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutPermissionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPermissionOutput) GoString() string { + return s.String() +} + +type PutRuleInput struct { + _ struct{} `type:"structure"` + + // A description of the rule. + Description *string `type:"string"` + + // The event bus to associate with this rule. If you omit this, the default + // event bus is used. + EventBusName *string `min:"1" type:"string"` + + // The event pattern. For more information, see Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // in the Amazon EventBridge User Guide. + EventPattern *string `type:"string"` + + // The name of the rule that you're creating or updating. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role associated with the rule. + RoleArn *string `min:"1" type:"string"` + + // The scheduling expression: for example, "cron(0 20 * * ? *)" or "rate(5 minutes)". + ScheduleExpression *string `type:"string"` + + // Indicates whether the rule is enabled or disabled. + State *string `type:"string" enum:"RuleState"` + + // The list of key-value pairs to associate with the rule. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s PutRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutRuleInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RoleArn != nil && len(*s.RoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *PutRuleInput) SetDescription(v string) *PutRuleInput { + s.Description = &v + return s +} + +// SetEventBusName sets the EventBusName field's value. +func (s *PutRuleInput) SetEventBusName(v string) *PutRuleInput { + s.EventBusName = &v + return s +} + +// SetEventPattern sets the EventPattern field's value. +func (s *PutRuleInput) SetEventPattern(v string) *PutRuleInput { + s.EventPattern = &v + return s +} + +// SetName sets the Name field's value. +func (s *PutRuleInput) SetName(v string) *PutRuleInput { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *PutRuleInput) SetRoleArn(v string) *PutRuleInput { + s.RoleArn = &v + return s +} + +// SetScheduleExpression sets the ScheduleExpression field's value. +func (s *PutRuleInput) SetScheduleExpression(v string) *PutRuleInput { + s.ScheduleExpression = &v + return s +} + +// SetState sets the State field's value. +func (s *PutRuleInput) SetState(v string) *PutRuleInput { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *PutRuleInput) SetTags(v []*Tag) *PutRuleInput { + s.Tags = v + return s +} + +type PutRuleOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the rule. + RuleArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutRuleOutput) GoString() string { + return s.String() +} + +// SetRuleArn sets the RuleArn field's value. +func (s *PutRuleOutput) SetRuleArn(v string) *PutRuleOutput { + s.RuleArn = &v + return s +} + +type PutTargetsInput struct { + _ struct{} `type:"structure"` + + // The name of the event bus associated with the rule. If you omit this, the + // default event bus is used. + EventBusName *string `min:"1" type:"string"` + + // The name of the rule. + // + // Rule is a required field + Rule *string `min:"1" type:"string" required:"true"` + + // The targets to update or add to the rule. + // + // Targets is a required field + Targets []*Target `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s PutTargetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutTargetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutTargetsInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Rule == nil { + invalidParams.Add(request.NewErrParamRequired("Rule")) + } + if s.Rule != nil && len(*s.Rule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) + } + if s.Targets == nil { + invalidParams.Add(request.NewErrParamRequired("Targets")) + } + if s.Targets != nil && len(s.Targets) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) + } + if s.Targets != nil { + for i, v := range s.Targets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *PutTargetsInput) SetEventBusName(v string) *PutTargetsInput { + s.EventBusName = &v + return s +} + +// SetRule sets the Rule field's value. +func (s *PutTargetsInput) SetRule(v string) *PutTargetsInput { + s.Rule = &v + return s +} + +// SetTargets sets the Targets field's value. +func (s *PutTargetsInput) SetTargets(v []*Target) *PutTargetsInput { + s.Targets = v + return s +} + +type PutTargetsOutput struct { + _ struct{} `type:"structure"` + + // The failed target entries. + FailedEntries []*PutTargetsResultEntry `type:"list"` + + // The number of failed entries. + FailedEntryCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s PutTargetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutTargetsOutput) GoString() string { + return s.String() +} + +// SetFailedEntries sets the FailedEntries field's value. +func (s *PutTargetsOutput) SetFailedEntries(v []*PutTargetsResultEntry) *PutTargetsOutput { + s.FailedEntries = v + return s +} + +// SetFailedEntryCount sets the FailedEntryCount field's value. +func (s *PutTargetsOutput) SetFailedEntryCount(v int64) *PutTargetsOutput { + s.FailedEntryCount = &v + return s +} + +// Represents a target that failed to be added to a rule. +type PutTargetsResultEntry struct { + _ struct{} `type:"structure"` + + // The error code that indicates why the target addition failed. If the value + // is ConcurrentModificationException, too many requests were made at the same + // time. + ErrorCode *string `type:"string"` + + // The error message that explains why the target addition failed. + ErrorMessage *string `type:"string"` + + // The ID of the target. + TargetId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutTargetsResultEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutTargetsResultEntry) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *PutTargetsResultEntry) SetErrorCode(v string) *PutTargetsResultEntry { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *PutTargetsResultEntry) SetErrorMessage(v string) *PutTargetsResultEntry { + s.ErrorMessage = &v + return s +} + +// SetTargetId sets the TargetId field's value. +func (s *PutTargetsResultEntry) SetTargetId(v string) *PutTargetsResultEntry { + s.TargetId = &v + return s +} + +type RemovePermissionInput struct { + _ struct{} `type:"structure"` + + // The name of the event bus to revoke permissions for. If you omit this, the + // default event bus is used. + EventBusName *string `min:"1" type:"string"` + + // The statement ID corresponding to the account that is no longer allowed to + // put events to the default event bus. + // + // StatementId is a required field + StatementId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RemovePermissionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemovePermissionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemovePermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemovePermissionInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *RemovePermissionInput) SetEventBusName(v string) *RemovePermissionInput { + s.EventBusName = &v + return s +} + +// SetStatementId sets the StatementId field's value. +func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput { + s.StatementId = &v + return s +} + +type RemovePermissionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemovePermissionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemovePermissionOutput) GoString() string { + return s.String() +} + +type RemoveTargetsInput struct { + _ struct{} `type:"structure"` + + // The name of the event bus associated with the rule. + EventBusName *string `min:"1" type:"string"` + + // If this is a managed rule created by an AWS service on your behalf, you must + // specify Force as True to remove targets. This parameter is ignored for rules + // that aren't managed rules. You can check whether a rule is a managed rule + // by using DescribeRule or ListRules and checking the ManagedBy field of the + // response. + Force *bool `type:"boolean"` + + // The IDs of the targets to remove from the rule. + // + // Ids is a required field + Ids []*string `min:"1" type:"list" required:"true"` + + // The name of the rule. + // + // Rule is a required field + Rule *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveTargetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTargetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTargetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTargetsInput"} + if s.EventBusName != nil && len(*s.EventBusName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EventBusName", 1)) + } + if s.Ids == nil { + invalidParams.Add(request.NewErrParamRequired("Ids")) + } + if s.Ids != nil && len(s.Ids) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Ids", 1)) + } + if s.Rule == nil { + invalidParams.Add(request.NewErrParamRequired("Rule")) + } + if s.Rule != nil && len(*s.Rule) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Rule", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEventBusName sets the EventBusName field's value. +func (s *RemoveTargetsInput) SetEventBusName(v string) *RemoveTargetsInput { + s.EventBusName = &v + return s +} + +// SetForce sets the Force field's value. +func (s *RemoveTargetsInput) SetForce(v bool) *RemoveTargetsInput { + s.Force = &v + return s +} + +// SetIds sets the Ids field's value. +func (s *RemoveTargetsInput) SetIds(v []*string) *RemoveTargetsInput { + s.Ids = v + return s +} + +// SetRule sets the Rule field's value. +func (s *RemoveTargetsInput) SetRule(v string) *RemoveTargetsInput { + s.Rule = &v + return s +} + +type RemoveTargetsOutput struct { + _ struct{} `type:"structure"` + + // The failed target entries. + FailedEntries []*RemoveTargetsResultEntry `type:"list"` + + // The number of failed entries. + FailedEntryCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s RemoveTargetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTargetsOutput) GoString() string { + return s.String() +} + +// SetFailedEntries sets the FailedEntries field's value. +func (s *RemoveTargetsOutput) SetFailedEntries(v []*RemoveTargetsResultEntry) *RemoveTargetsOutput { + s.FailedEntries = v + return s +} + +// SetFailedEntryCount sets the FailedEntryCount field's value. +func (s *RemoveTargetsOutput) SetFailedEntryCount(v int64) *RemoveTargetsOutput { + s.FailedEntryCount = &v + return s +} + +// Represents a target that failed to be removed from a rule. +type RemoveTargetsResultEntry struct { + _ struct{} `type:"structure"` + + // The error code that indicates why the target removal failed. If the value + // is ConcurrentModificationException, too many requests were made at the same + // time. + ErrorCode *string `type:"string"` + + // The error message that explains why the target removal failed. + ErrorMessage *string `type:"string"` + + // The ID of the target. + TargetId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s RemoveTargetsResultEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTargetsResultEntry) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *RemoveTargetsResultEntry) SetErrorCode(v string) *RemoveTargetsResultEntry { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *RemoveTargetsResultEntry) SetErrorMessage(v string) *RemoveTargetsResultEntry { + s.ErrorMessage = &v + return s +} + +// SetTargetId sets the TargetId field's value. +func (s *RemoveTargetsResultEntry) SetTargetId(v string) *RemoveTargetsResultEntry { + s.TargetId = &v + return s +} + +// Contains information about a rule in Amazon EventBridge. +type Rule struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the rule. + Arn *string `min:"1" type:"string"` + + // The description of the rule. + Description *string `type:"string"` + + // The event bus associated with the rule. + EventBusName *string `min:"1" type:"string"` + + // 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) + // in the Amazon EventBridge User Guide. + EventPattern *string `type:"string"` + + // If an AWS service created the rule on behalf of your account, this field + // displays the principal name of the service that created the rule. + ManagedBy *string `min:"1" type:"string"` + + // The name of the rule. + Name *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the role that is used for target invocation. + RoleArn *string `min:"1" type:"string"` + + // The scheduling expression: for example, "cron(0 20 * * ? *)" or "rate(5 minutes)". + ScheduleExpression *string `type:"string"` + + // The state of the rule. + State *string `type:"string" enum:"RuleState"` +} + +// String returns the string representation +func (s Rule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Rule) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Rule) SetArn(v string) *Rule { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Rule) SetDescription(v string) *Rule { + s.Description = &v + return s +} + +// SetEventBusName sets the EventBusName field's value. +func (s *Rule) SetEventBusName(v string) *Rule { + s.EventBusName = &v + return s +} + +// SetEventPattern sets the EventPattern field's value. +func (s *Rule) SetEventPattern(v string) *Rule { + s.EventPattern = &v + return s +} + +// SetManagedBy sets the ManagedBy field's value. +func (s *Rule) SetManagedBy(v string) *Rule { + s.ManagedBy = &v + return s +} + +// SetName sets the Name field's value. +func (s *Rule) SetName(v string) *Rule { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *Rule) SetRoleArn(v string) *Rule { + s.RoleArn = &v + return s +} + +// SetScheduleExpression sets the ScheduleExpression field's value. +func (s *Rule) SetScheduleExpression(v string) *Rule { + s.ScheduleExpression = &v + return s +} + +// SetState sets the State field's value. +func (s *Rule) SetState(v string) *Rule { + s.State = &v + return s +} + +// This parameter contains the criteria (either InstanceIds or a tag) used to +// specify which EC2 instances are to be sent the command. +type RunCommandParameters struct { + _ struct{} `type:"structure"` + + // Currently, we support including only one RunCommandTarget block, which specifies + // either an array of InstanceIds or a tag. + // + // RunCommandTargets is a required field + RunCommandTargets []*RunCommandTarget `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s RunCommandParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RunCommandParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunCommandParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunCommandParameters"} + if s.RunCommandTargets == nil { + invalidParams.Add(request.NewErrParamRequired("RunCommandTargets")) + } + if s.RunCommandTargets != nil && len(s.RunCommandTargets) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RunCommandTargets", 1)) + } + if s.RunCommandTargets != nil { + for i, v := range s.RunCommandTargets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RunCommandTargets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRunCommandTargets sets the RunCommandTargets field's value. +func (s *RunCommandParameters) SetRunCommandTargets(v []*RunCommandTarget) *RunCommandParameters { + s.RunCommandTargets = v + return s +} + +// Information about the EC2 instances that are to be sent the command, specified +// as key-value pairs. Each RunCommandTarget block can include only one key, +// but this key can specify multiple values. +type RunCommandTarget struct { + _ struct{} `type:"structure"` + + // Can be either tag: tag-key or InstanceIds. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // If Key is tag: tag-key, Values is a list of tag values. If Key is InstanceIds, + // Values is a list of Amazon EC2 instance IDs. + // + // Values is a required field + Values []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s RunCommandTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RunCommandTarget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunCommandTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunCommandTarget"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + if s.Values != nil && len(s.Values) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Values", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *RunCommandTarget) SetKey(v string) *RunCommandTarget { + s.Key = &v + return s +} + +// SetValues sets the Values field's value. +func (s *RunCommandTarget) SetValues(v []*string) *RunCommandTarget { + s.Values = v + return s +} + +// This structure includes the custom parameter to be used when the target is +// an SQS FIFO queue. +type SqsParameters struct { + _ struct{} `type:"structure"` + + // The FIFO message group ID to use as the target. + MessageGroupId *string `type:"string"` +} + +// String returns the string representation +func (s SqsParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SqsParameters) GoString() string { + return s.String() +} + +// SetMessageGroupId sets the MessageGroupId field's value. +func (s *SqsParameters) SetMessageGroupId(v string) *SqsParameters { + s.MessageGroupId = &v + return s +} + +// A key-value pair associated with an AWS resource. In EventBridge, rules support +// tagging. +type Tag struct { + _ struct{} `type:"structure"` + + // A string that you can use to assign a value. The combination of tag keys + // and values can help you organize and categorize your resources. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The value for the specified tag key. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the rule that you're adding tags to. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // The list of key-value pairs to associate with the rule. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// Targets are the resources to be invoked when a rule is triggered. For a complete +// list of services and resources that can be set as a target, see PutTargets. +// +// If you're setting the event bus of another account as the target and that +// account granted permission to your account through an organization instead +// of directly by the account ID, you must specify a RoleArn with proper permissions +// in the Target structure. For more information, see Sending and Receiving +// Events Between AWS Accounts (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html) +// in the Amazon EventBridge User Guide. +type Target struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the target. + // + // Arn is a required field + Arn *string `min:"1" type:"string" required:"true"` + + // If the event target is an AWS Batch job, this contains the job definition, + // job name, and other parameters. For more information, see Jobs (https://docs.aws.amazon.com/batch/latest/userguide/jobs.html) + // in the AWS Batch User Guide. + BatchParameters *BatchParameters `type:"structure"` + + // Contains the Amazon ECS task definition and task count to be used if the + // event target is an Amazon ECS task. For more information about Amazon ECS + // tasks, see Task Definitions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) + // in the Amazon EC2 Container Service Developer Guide. + EcsParameters *EcsParameters `type:"structure"` + + // The ID of the target. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // Valid JSON text passed to the target. In this case, nothing from the event + // itself is passed to the target. For more information, see The JavaScript + // Object Notation (JSON) Data Interchange Format (http://www.rfc-editor.org/rfc/rfc7159.txt). + Input *string `type:"string"` + + // The value of the JSONPath that is used for extracting part of the matched + // event when passing it to the target. You must use JSON dot notation, not + // bracket notation. For more information about JSON paths, see JSONPath (http://goessner.net/articles/JsonPath/). + InputPath *string `type:"string"` + + // Settings to enable you to provide custom input to a target based on certain + // event data. You can extract one or more key-value pairs from the event and + // then use that data to send customized input to the target. + InputTransformer *InputTransformer `type:"structure"` + + // The custom parameter that you can use to control the shard assignment when + // the target is a Kinesis data stream. If you don't include this parameter, + // the default is to use the eventId as the partition key. + KinesisParameters *KinesisParameters `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role to be used for this target + // when the rule is triggered. If one rule triggers multiple targets, you can + // use a different IAM role for each target. + RoleArn *string `min:"1" type:"string"` + + // Parameters used when you are using the rule to invoke Amazon EC2 Run Command. + RunCommandParameters *RunCommandParameters `type:"structure"` + + // Contains the message group ID to use when the target is a FIFO queue. + // + // If you specify an SQS FIFO queue as a target, the queue must have content-based + // deduplication enabled. + SqsParameters *SqsParameters `type:"structure"` +} + +// String returns the string representation +func (s Target) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Target) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Target) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Target"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.RoleArn != nil && len(*s.RoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1)) + } + if s.BatchParameters != nil { + if err := s.BatchParameters.Validate(); err != nil { + invalidParams.AddNested("BatchParameters", err.(request.ErrInvalidParams)) + } + } + if s.EcsParameters != nil { + if err := s.EcsParameters.Validate(); err != nil { + invalidParams.AddNested("EcsParameters", err.(request.ErrInvalidParams)) + } + } + if s.InputTransformer != nil { + if err := s.InputTransformer.Validate(); err != nil { + invalidParams.AddNested("InputTransformer", err.(request.ErrInvalidParams)) + } + } + if s.KinesisParameters != nil { + if err := s.KinesisParameters.Validate(); err != nil { + invalidParams.AddNested("KinesisParameters", err.(request.ErrInvalidParams)) + } + } + if s.RunCommandParameters != nil { + if err := s.RunCommandParameters.Validate(); err != nil { + invalidParams.AddNested("RunCommandParameters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *Target) SetArn(v string) *Target { + s.Arn = &v + return s +} + +// SetBatchParameters sets the BatchParameters field's value. +func (s *Target) SetBatchParameters(v *BatchParameters) *Target { + s.BatchParameters = v + return s +} + +// SetEcsParameters sets the EcsParameters field's value. +func (s *Target) SetEcsParameters(v *EcsParameters) *Target { + s.EcsParameters = v + return s +} + +// SetId sets the Id field's value. +func (s *Target) SetId(v string) *Target { + s.Id = &v + return s +} + +// SetInput sets the Input field's value. +func (s *Target) SetInput(v string) *Target { + s.Input = &v + return s +} + +// SetInputPath sets the InputPath field's value. +func (s *Target) SetInputPath(v string) *Target { + s.InputPath = &v + return s +} + +// SetInputTransformer sets the InputTransformer field's value. +func (s *Target) SetInputTransformer(v *InputTransformer) *Target { + s.InputTransformer = v + return s +} + +// SetKinesisParameters sets the KinesisParameters field's value. +func (s *Target) SetKinesisParameters(v *KinesisParameters) *Target { + s.KinesisParameters = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *Target) SetRoleArn(v string) *Target { + s.RoleArn = &v + return s +} + +// SetRunCommandParameters sets the RunCommandParameters field's value. +func (s *Target) SetRunCommandParameters(v *RunCommandParameters) *Target { + s.RunCommandParameters = v + return s +} + +// SetSqsParameters sets the SqsParameters field's value. +func (s *Target) SetSqsParameters(v *SqsParameters) *Target { + s.SqsParameters = v + return s +} + +type TestEventPatternInput struct { + _ struct{} `type:"structure"` + + // The event, in JSON format, to test against the event pattern. + // + // Event is a required field + Event *string `type:"string" required:"true"` + + // The event pattern. For more information, see Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // in the Amazon EventBridge User Guide. + // + // EventPattern is a required field + EventPattern *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TestEventPatternInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestEventPatternInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TestEventPatternInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TestEventPatternInput"} + if s.Event == nil { + invalidParams.Add(request.NewErrParamRequired("Event")) + } + if s.EventPattern == nil { + invalidParams.Add(request.NewErrParamRequired("EventPattern")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEvent sets the Event field's value. +func (s *TestEventPatternInput) SetEvent(v string) *TestEventPatternInput { + s.Event = &v + return s +} + +// SetEventPattern sets the EventPattern field's value. +func (s *TestEventPatternInput) SetEventPattern(v string) *TestEventPatternInput { + s.EventPattern = &v + return s +} + +type TestEventPatternOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether the event matches the event pattern. + Result *bool `type:"boolean"` +} + +// String returns the string representation +func (s TestEventPatternOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TestEventPatternOutput) GoString() string { + return s.String() +} + +// SetResult sets the Result field's value. +func (s *TestEventPatternOutput) SetResult(v bool) *TestEventPatternOutput { + s.Result = &v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the rule that you're removing tags from. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // The list of tag keys to remove from the resource. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +const ( + // AssignPublicIpEnabled is a AssignPublicIp enum value + AssignPublicIpEnabled = "ENABLED" + + // AssignPublicIpDisabled is a AssignPublicIp enum value + AssignPublicIpDisabled = "DISABLED" +) + +const ( + // EventSourceStatePending is a EventSourceState enum value + EventSourceStatePending = "PENDING" + + // EventSourceStateActive is a EventSourceState enum value + EventSourceStateActive = "ACTIVE" + + // EventSourceStateDeleted is a EventSourceState enum value + EventSourceStateDeleted = "DELETED" +) + +const ( + // LaunchTypeEc2 is a LaunchType enum value + LaunchTypeEc2 = "EC2" + + // LaunchTypeFargate is a LaunchType enum value + LaunchTypeFargate = "FARGATE" +) + +const ( + // RuleStateEnabled is a RuleState enum value + RuleStateEnabled = "ENABLED" + + // RuleStateDisabled is a RuleState enum value + RuleStateDisabled = "DISABLED" +) diff --git a/service/eventbridge/doc.go b/service/eventbridge/doc.go new file mode 100644 index 00000000000..cbfca1cf05b --- /dev/null +++ b/service/eventbridge/doc.go @@ -0,0 +1,46 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package eventbridge provides the client and types for making API +// requests to Amazon EventBridge. +// +// Amazon EventBridge helps you to respond to state changes in your AWS resources. +// When your resources change state, they automatically send events into an +// event stream. You can create rules that match selected events in the stream +// and route them to targets to take action. You can also use rules to take +// action on a predetermined schedule. For example, you can configure rules +// to: +// +// * Automatically invoke an AWS Lambda function to update DNS entries when +// an event notifies you that Amazon EC2 instance enters the running state +// +// * Direct specific API records from AWS CloudTrail to an Amazon Kinesis +// data stream for detailed analysis of potential security or availability +// risks +// +// * Periodically invoke a built-in target to create a snapshot of an Amazon +// EBS volume +// +// For more information about the features of Amazon EventBridge, see the Amazon +// EventBridge User Guide (https://docs.aws.amazon.com/eventbridge/latest/userguide/). +// +// See https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07 for more information on this service. +// +// See eventbridge package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/eventbridge/ +// +// Using the Client +// +// To contact Amazon EventBridge with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon EventBridge client EventBridge for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/eventbridge/#New +package eventbridge diff --git a/service/eventbridge/errors.go b/service/eventbridge/errors.go new file mode 100644 index 00000000000..9d10b6b3bcc --- /dev/null +++ b/service/eventbridge/errors.go @@ -0,0 +1,64 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package eventbridge + +const ( + + // ErrCodeConcurrentModificationException for service response error code + // "ConcurrentModificationException". + // + // There is concurrent modification on a resource. + ErrCodeConcurrentModificationException = "ConcurrentModificationException" + + // ErrCodeInternalException for service response error code + // "InternalException". + // + // This exception occurs due to unexpected causes. + ErrCodeInternalException = "InternalException" + + // ErrCodeInvalidEventPatternException for service response error code + // "InvalidEventPatternException". + // + // The event pattern isn't valid. + ErrCodeInvalidEventPatternException = "InvalidEventPatternException" + + // ErrCodeInvalidStateException for service response error code + // "InvalidStateException". + // + // The specified state isn't a valid state for an event source. + ErrCodeInvalidStateException = "InvalidStateException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // You tried to create more resources than is allowed. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeManagedRuleException for service response error code + // "ManagedRuleException". + // + // An AWS service created this rule on behalf of your account. That service + // manages it. If you see this error in response to DeleteRule or RemoveTargets, + // you can use the Force parameter in those calls to delete the rule or remove + // targets from the rule. You can't modify these managed rules by using DisableRule, + // EnableRule, PutTargets, PutRule, TagResource, or UntagResource. + ErrCodeManagedRuleException = "ManagedRuleException" + + // ErrCodePolicyLengthExceededException for service response error code + // "PolicyLengthExceededException". + // + // The event bus policy is too long. For more information, see the limits. + ErrCodePolicyLengthExceededException = "PolicyLengthExceededException" + + // ErrCodeResourceAlreadyExistsException for service response error code + // "ResourceAlreadyExistsException". + // + // The resource that you're trying to create already exists. + ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // An entity that you specified doesn't exist. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/service/eventbridge/eventbridgeiface/interface.go b/service/eventbridge/eventbridgeiface/interface.go new file mode 100644 index 00000000000..8b35b3dbfa2 --- /dev/null +++ b/service/eventbridge/eventbridgeiface/interface.go @@ -0,0 +1,188 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package eventbridgeiface provides an interface to enable mocking the Amazon EventBridge service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package eventbridgeiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/eventbridge" +) + +// EventBridgeAPI provides an interface to enable mocking the +// eventbridge.EventBridge service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // Amazon EventBridge. +// func myFunc(svc eventbridgeiface.EventBridgeAPI) bool { +// // Make svc.ActivateEventSource request +// } +// +// func main() { +// sess := session.New() +// svc := eventbridge.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockEventBridgeClient struct { +// eventbridgeiface.EventBridgeAPI +// } +// func (m *mockEventBridgeClient) ActivateEventSource(input *eventbridge.ActivateEventSourceInput) (*eventbridge.ActivateEventSourceOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockEventBridgeClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type EventBridgeAPI interface { + ActivateEventSource(*eventbridge.ActivateEventSourceInput) (*eventbridge.ActivateEventSourceOutput, error) + ActivateEventSourceWithContext(aws.Context, *eventbridge.ActivateEventSourceInput, ...request.Option) (*eventbridge.ActivateEventSourceOutput, error) + ActivateEventSourceRequest(*eventbridge.ActivateEventSourceInput) (*request.Request, *eventbridge.ActivateEventSourceOutput) + + CreateEventBus(*eventbridge.CreateEventBusInput) (*eventbridge.CreateEventBusOutput, error) + CreateEventBusWithContext(aws.Context, *eventbridge.CreateEventBusInput, ...request.Option) (*eventbridge.CreateEventBusOutput, error) + CreateEventBusRequest(*eventbridge.CreateEventBusInput) (*request.Request, *eventbridge.CreateEventBusOutput) + + CreatePartnerEventSource(*eventbridge.CreatePartnerEventSourceInput) (*eventbridge.CreatePartnerEventSourceOutput, error) + CreatePartnerEventSourceWithContext(aws.Context, *eventbridge.CreatePartnerEventSourceInput, ...request.Option) (*eventbridge.CreatePartnerEventSourceOutput, error) + CreatePartnerEventSourceRequest(*eventbridge.CreatePartnerEventSourceInput) (*request.Request, *eventbridge.CreatePartnerEventSourceOutput) + + DeactivateEventSource(*eventbridge.DeactivateEventSourceInput) (*eventbridge.DeactivateEventSourceOutput, error) + DeactivateEventSourceWithContext(aws.Context, *eventbridge.DeactivateEventSourceInput, ...request.Option) (*eventbridge.DeactivateEventSourceOutput, error) + DeactivateEventSourceRequest(*eventbridge.DeactivateEventSourceInput) (*request.Request, *eventbridge.DeactivateEventSourceOutput) + + DeleteEventBus(*eventbridge.DeleteEventBusInput) (*eventbridge.DeleteEventBusOutput, error) + DeleteEventBusWithContext(aws.Context, *eventbridge.DeleteEventBusInput, ...request.Option) (*eventbridge.DeleteEventBusOutput, error) + DeleteEventBusRequest(*eventbridge.DeleteEventBusInput) (*request.Request, *eventbridge.DeleteEventBusOutput) + + DeletePartnerEventSource(*eventbridge.DeletePartnerEventSourceInput) (*eventbridge.DeletePartnerEventSourceOutput, error) + DeletePartnerEventSourceWithContext(aws.Context, *eventbridge.DeletePartnerEventSourceInput, ...request.Option) (*eventbridge.DeletePartnerEventSourceOutput, error) + DeletePartnerEventSourceRequest(*eventbridge.DeletePartnerEventSourceInput) (*request.Request, *eventbridge.DeletePartnerEventSourceOutput) + + DeleteRule(*eventbridge.DeleteRuleInput) (*eventbridge.DeleteRuleOutput, error) + DeleteRuleWithContext(aws.Context, *eventbridge.DeleteRuleInput, ...request.Option) (*eventbridge.DeleteRuleOutput, error) + DeleteRuleRequest(*eventbridge.DeleteRuleInput) (*request.Request, *eventbridge.DeleteRuleOutput) + + DescribeEventBus(*eventbridge.DescribeEventBusInput) (*eventbridge.DescribeEventBusOutput, error) + DescribeEventBusWithContext(aws.Context, *eventbridge.DescribeEventBusInput, ...request.Option) (*eventbridge.DescribeEventBusOutput, error) + DescribeEventBusRequest(*eventbridge.DescribeEventBusInput) (*request.Request, *eventbridge.DescribeEventBusOutput) + + DescribeEventSource(*eventbridge.DescribeEventSourceInput) (*eventbridge.DescribeEventSourceOutput, error) + DescribeEventSourceWithContext(aws.Context, *eventbridge.DescribeEventSourceInput, ...request.Option) (*eventbridge.DescribeEventSourceOutput, error) + DescribeEventSourceRequest(*eventbridge.DescribeEventSourceInput) (*request.Request, *eventbridge.DescribeEventSourceOutput) + + DescribePartnerEventSource(*eventbridge.DescribePartnerEventSourceInput) (*eventbridge.DescribePartnerEventSourceOutput, error) + DescribePartnerEventSourceWithContext(aws.Context, *eventbridge.DescribePartnerEventSourceInput, ...request.Option) (*eventbridge.DescribePartnerEventSourceOutput, error) + DescribePartnerEventSourceRequest(*eventbridge.DescribePartnerEventSourceInput) (*request.Request, *eventbridge.DescribePartnerEventSourceOutput) + + DescribeRule(*eventbridge.DescribeRuleInput) (*eventbridge.DescribeRuleOutput, error) + DescribeRuleWithContext(aws.Context, *eventbridge.DescribeRuleInput, ...request.Option) (*eventbridge.DescribeRuleOutput, error) + DescribeRuleRequest(*eventbridge.DescribeRuleInput) (*request.Request, *eventbridge.DescribeRuleOutput) + + DisableRule(*eventbridge.DisableRuleInput) (*eventbridge.DisableRuleOutput, error) + DisableRuleWithContext(aws.Context, *eventbridge.DisableRuleInput, ...request.Option) (*eventbridge.DisableRuleOutput, error) + DisableRuleRequest(*eventbridge.DisableRuleInput) (*request.Request, *eventbridge.DisableRuleOutput) + + EnableRule(*eventbridge.EnableRuleInput) (*eventbridge.EnableRuleOutput, error) + EnableRuleWithContext(aws.Context, *eventbridge.EnableRuleInput, ...request.Option) (*eventbridge.EnableRuleOutput, error) + EnableRuleRequest(*eventbridge.EnableRuleInput) (*request.Request, *eventbridge.EnableRuleOutput) + + ListEventBuses(*eventbridge.ListEventBusesInput) (*eventbridge.ListEventBusesOutput, error) + ListEventBusesWithContext(aws.Context, *eventbridge.ListEventBusesInput, ...request.Option) (*eventbridge.ListEventBusesOutput, error) + ListEventBusesRequest(*eventbridge.ListEventBusesInput) (*request.Request, *eventbridge.ListEventBusesOutput) + + ListEventSources(*eventbridge.ListEventSourcesInput) (*eventbridge.ListEventSourcesOutput, error) + ListEventSourcesWithContext(aws.Context, *eventbridge.ListEventSourcesInput, ...request.Option) (*eventbridge.ListEventSourcesOutput, error) + ListEventSourcesRequest(*eventbridge.ListEventSourcesInput) (*request.Request, *eventbridge.ListEventSourcesOutput) + + ListPartnerEventSourceAccounts(*eventbridge.ListPartnerEventSourceAccountsInput) (*eventbridge.ListPartnerEventSourceAccountsOutput, error) + ListPartnerEventSourceAccountsWithContext(aws.Context, *eventbridge.ListPartnerEventSourceAccountsInput, ...request.Option) (*eventbridge.ListPartnerEventSourceAccountsOutput, error) + ListPartnerEventSourceAccountsRequest(*eventbridge.ListPartnerEventSourceAccountsInput) (*request.Request, *eventbridge.ListPartnerEventSourceAccountsOutput) + + ListPartnerEventSources(*eventbridge.ListPartnerEventSourcesInput) (*eventbridge.ListPartnerEventSourcesOutput, error) + ListPartnerEventSourcesWithContext(aws.Context, *eventbridge.ListPartnerEventSourcesInput, ...request.Option) (*eventbridge.ListPartnerEventSourcesOutput, error) + ListPartnerEventSourcesRequest(*eventbridge.ListPartnerEventSourcesInput) (*request.Request, *eventbridge.ListPartnerEventSourcesOutput) + + ListRuleNamesByTarget(*eventbridge.ListRuleNamesByTargetInput) (*eventbridge.ListRuleNamesByTargetOutput, error) + ListRuleNamesByTargetWithContext(aws.Context, *eventbridge.ListRuleNamesByTargetInput, ...request.Option) (*eventbridge.ListRuleNamesByTargetOutput, error) + ListRuleNamesByTargetRequest(*eventbridge.ListRuleNamesByTargetInput) (*request.Request, *eventbridge.ListRuleNamesByTargetOutput) + + ListRules(*eventbridge.ListRulesInput) (*eventbridge.ListRulesOutput, error) + ListRulesWithContext(aws.Context, *eventbridge.ListRulesInput, ...request.Option) (*eventbridge.ListRulesOutput, error) + ListRulesRequest(*eventbridge.ListRulesInput) (*request.Request, *eventbridge.ListRulesOutput) + + ListTagsForResource(*eventbridge.ListTagsForResourceInput) (*eventbridge.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *eventbridge.ListTagsForResourceInput, ...request.Option) (*eventbridge.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*eventbridge.ListTagsForResourceInput) (*request.Request, *eventbridge.ListTagsForResourceOutput) + + ListTargetsByRule(*eventbridge.ListTargetsByRuleInput) (*eventbridge.ListTargetsByRuleOutput, error) + ListTargetsByRuleWithContext(aws.Context, *eventbridge.ListTargetsByRuleInput, ...request.Option) (*eventbridge.ListTargetsByRuleOutput, error) + ListTargetsByRuleRequest(*eventbridge.ListTargetsByRuleInput) (*request.Request, *eventbridge.ListTargetsByRuleOutput) + + PutEvents(*eventbridge.PutEventsInput) (*eventbridge.PutEventsOutput, error) + PutEventsWithContext(aws.Context, *eventbridge.PutEventsInput, ...request.Option) (*eventbridge.PutEventsOutput, error) + PutEventsRequest(*eventbridge.PutEventsInput) (*request.Request, *eventbridge.PutEventsOutput) + + PutPartnerEvents(*eventbridge.PutPartnerEventsInput) (*eventbridge.PutPartnerEventsOutput, error) + PutPartnerEventsWithContext(aws.Context, *eventbridge.PutPartnerEventsInput, ...request.Option) (*eventbridge.PutPartnerEventsOutput, error) + PutPartnerEventsRequest(*eventbridge.PutPartnerEventsInput) (*request.Request, *eventbridge.PutPartnerEventsOutput) + + PutPermission(*eventbridge.PutPermissionInput) (*eventbridge.PutPermissionOutput, error) + PutPermissionWithContext(aws.Context, *eventbridge.PutPermissionInput, ...request.Option) (*eventbridge.PutPermissionOutput, error) + PutPermissionRequest(*eventbridge.PutPermissionInput) (*request.Request, *eventbridge.PutPermissionOutput) + + PutRule(*eventbridge.PutRuleInput) (*eventbridge.PutRuleOutput, error) + PutRuleWithContext(aws.Context, *eventbridge.PutRuleInput, ...request.Option) (*eventbridge.PutRuleOutput, error) + PutRuleRequest(*eventbridge.PutRuleInput) (*request.Request, *eventbridge.PutRuleOutput) + + PutTargets(*eventbridge.PutTargetsInput) (*eventbridge.PutTargetsOutput, error) + PutTargetsWithContext(aws.Context, *eventbridge.PutTargetsInput, ...request.Option) (*eventbridge.PutTargetsOutput, error) + PutTargetsRequest(*eventbridge.PutTargetsInput) (*request.Request, *eventbridge.PutTargetsOutput) + + RemovePermission(*eventbridge.RemovePermissionInput) (*eventbridge.RemovePermissionOutput, error) + RemovePermissionWithContext(aws.Context, *eventbridge.RemovePermissionInput, ...request.Option) (*eventbridge.RemovePermissionOutput, error) + RemovePermissionRequest(*eventbridge.RemovePermissionInput) (*request.Request, *eventbridge.RemovePermissionOutput) + + RemoveTargets(*eventbridge.RemoveTargetsInput) (*eventbridge.RemoveTargetsOutput, error) + RemoveTargetsWithContext(aws.Context, *eventbridge.RemoveTargetsInput, ...request.Option) (*eventbridge.RemoveTargetsOutput, error) + RemoveTargetsRequest(*eventbridge.RemoveTargetsInput) (*request.Request, *eventbridge.RemoveTargetsOutput) + + TagResource(*eventbridge.TagResourceInput) (*eventbridge.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *eventbridge.TagResourceInput, ...request.Option) (*eventbridge.TagResourceOutput, error) + TagResourceRequest(*eventbridge.TagResourceInput) (*request.Request, *eventbridge.TagResourceOutput) + + TestEventPattern(*eventbridge.TestEventPatternInput) (*eventbridge.TestEventPatternOutput, error) + TestEventPatternWithContext(aws.Context, *eventbridge.TestEventPatternInput, ...request.Option) (*eventbridge.TestEventPatternOutput, error) + TestEventPatternRequest(*eventbridge.TestEventPatternInput) (*request.Request, *eventbridge.TestEventPatternOutput) + + UntagResource(*eventbridge.UntagResourceInput) (*eventbridge.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *eventbridge.UntagResourceInput, ...request.Option) (*eventbridge.UntagResourceOutput, error) + UntagResourceRequest(*eventbridge.UntagResourceInput) (*request.Request, *eventbridge.UntagResourceOutput) +} + +var _ EventBridgeAPI = (*eventbridge.EventBridge)(nil) diff --git a/service/eventbridge/integ_test.go b/service/eventbridge/integ_test.go new file mode 100644 index 00000000000..2c294ccf8fd --- /dev/null +++ b/service/eventbridge/integ_test.go @@ -0,0 +1,58 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// +build go1.10,integration + +package eventbridge_test + +import ( + "context" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/awstesting/integration" + "github.com/aws/aws-sdk-go/service/eventbridge" +) + +var _ aws.Config +var _ awserr.Error +var _ request.Request + +func TestInteg_00_ListRules(t *testing.T) { + ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second) + defer cancelFn() + + sess := integration.SessionWithDefaultRegion("us-west-2") + svc := eventbridge.New(sess) + params := &eventbridge.ListRulesInput{} + _, err := svc.ListRulesWithContext(ctx, params) + if err != nil { + t.Errorf("expect no error, got %v", err) + } +} +func TestInteg_01_DescribeRule(t *testing.T) { + ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second) + defer cancelFn() + + sess := integration.SessionWithDefaultRegion("us-west-2") + svc := eventbridge.New(sess) + params := &eventbridge.DescribeRuleInput{ + Name: aws.String("fake-rule"), + } + _, err := svc.DescribeRuleWithContext(ctx, params) + if err == nil { + t.Fatalf("expect request to fail") + } + aerr, ok := err.(awserr.RequestFailure) + if !ok { + t.Fatalf("expect awserr, was %T", err) + } + if len(aerr.Code()) == 0 { + t.Errorf("expect non-empty error code") + } + if v := aerr.Code(); v == request.ErrCodeSerialization { + t.Errorf("expect API error code got serialization failure") + } +} diff --git a/service/eventbridge/service.go b/service/eventbridge/service.go new file mode 100644 index 00000000000..a84686d37f7 --- /dev/null +++ b/service/eventbridge/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package eventbridge + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// EventBridge provides the API operation methods for making requests to +// Amazon EventBridge. See this package's package overview docs +// for details on the service. +// +// EventBridge methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type EventBridge struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "EventBridge" // Name of service. + EndpointsID = "events" // ID to lookup a service endpoint with. + ServiceID = "EventBridge" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the EventBridge client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a EventBridge client from just a session. +// svc := eventbridge.New(mySession) +// +// // Create a EventBridge client with additional configuration +// svc := eventbridge.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *EventBridge { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *EventBridge { + svc := &EventBridge{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2015-10-07", + JSONVersion: "1.1", + TargetPrefix: "AWSEvents", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a EventBridge operation and runs any +// custom request initialization. +func (c *EventBridge) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/service/kafka/api.go b/service/kafka/api.go index 28b8752e5dd..bef73a71c73 100644 --- a/service/kafka/api.go +++ b/service/kafka/api.go @@ -2683,7 +2683,7 @@ type CreateClusterInput struct { // KafkaVersion is a required field KafkaVersion *string `locationName:"kafkaVersion" min:"1" type:"string" required:"true"` - // The number of broker nodes in the cluster. + // The number of Kafka broker nodes in the Amazon MSK cluster. // // NumberOfBrokerNodes is a required field NumberOfBrokerNodes *int64 `locationName:"numberOfBrokerNodes" min:"1" type:"integer" required:"true"`