eventbridge

package module
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 26 Imported by: 108

Documentation

Index

Constants

View Source
const ServiceAPIVersion = "2015-10-07"
View Source
const ServiceID = "EventBridge"

Variables

This section is empty.

Functions

func AddResolveEndpointMiddleware

func AddResolveEndpointMiddleware(stack *middleware.Stack, options ResolveEndpointMiddlewareOptions)

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func RemoveResolveEndpointMiddleware

func RemoveResolveEndpointMiddleware(stack *middleware.Stack) error

Types

type ActivateEventSourceInput

type ActivateEventSourceInput struct {

	// The name of the partner event source to activate.
	//
	// This member is required.
	Name *string
}

type ActivateEventSourceOutput

type ActivateEventSourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

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).

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) ActivateEventSource

func (c *Client) ActivateEventSource(ctx context.Context, params *ActivateEventSourceInput, optFns ...func(*Options)) (*ActivateEventSourceOutput, error)

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

func (*Client) CreateEventBus

func (c *Client) CreateEventBus(ctx context.Context, params *CreateEventBusInput, optFns ...func(*Options)) (*CreateEventBusOutput, error)

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

func (*Client) CreatePartnerEventSource

func (c *Client) CreatePartnerEventSource(ctx context.Context, params *CreatePartnerEventSourceInput, optFns ...func(*Options)) (*CreatePartnerEventSourceOutput, error)

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 within 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: partner_name/event_namespace/event_name partner_name is determined during partner registration and identifies the partner to AWS customers. event_namespace is determined by the partner and is a way for the partner to categorize their events. event_name is determined by the partner, and should uniquely identify an event-generating resource within the partner system. The combination of event_namespace and event_name should help AWS customers decide whether to create an event bus to receive these events.

func (*Client) DeactivateEventSource

func (c *Client) DeactivateEventSource(ctx context.Context, params *DeactivateEventSourceInput, optFns ...func(*Options)) (*DeactivateEventSourceOutput, error)

You can use this operation to temporarily stop receiving events from the specified partner event source. The matching event bus is not 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 is deleted. To activate a deactivated partner event source, use ActivateEventSource ().

func (*Client) DeleteEventBus

func (c *Client) DeleteEventBus(ctx context.Context, params *DeleteEventBusInput, optFns ...func(*Options)) (*DeleteEventBusOutput, error)

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

func (*Client) DeletePartnerEventSource

func (c *Client) DeletePartnerEventSource(ctx context.Context, params *DeletePartnerEventSourceInput, optFns ...func(*Options)) (*DeletePartnerEventSourceOutput, error)

This operation is used by SaaS partners to delete a partner event source. This operation is not used by AWS customers. When you delete an event source, the status of the corresponding partner event bus in the AWS customer account becomes DELETED.

func (*Client) DeleteRule

func (c *Client) DeleteRule(ctx context.Context, params *DeleteRuleInput, optFns ...func(*Options)) (*DeleteRuleOutput, error)

Deletes the specified rule. Before you can delete the rule, you must remove all targets, using RemoveTargets (). <p>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.</p> <p>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 <code>Force</code> option, but you should do so only if you are sure the other service is not still using that rule.</p>

func (*Client) DescribeEventBus

func (c *Client) DescribeEventBus(ctx context.Context, params *DescribeEventBusInput, optFns ...func(*Options)) (*DescribeEventBusOutput, error)

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 ().

func (*Client) DescribeEventSource

func (c *Client) DescribeEventSource(ctx context.Context, params *DescribeEventSourceInput, optFns ...func(*Options)) (*DescribeEventSourceOutput, error)

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

func (*Client) DescribePartnerEventSource

func (c *Client) DescribePartnerEventSource(ctx context.Context, params *DescribePartnerEventSourceInput, optFns ...func(*Options)) (*DescribePartnerEventSourceOutput, error)

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.

func (*Client) DescribeRule

func (c *Client) DescribeRule(ctx context.Context, params *DescribeRuleInput, optFns ...func(*Options)) (*DescribeRuleOutput, error)

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

func (*Client) DisableRule

func (c *Client) DisableRule(ctx context.Context, params *DisableRuleInput, optFns ...func(*Options)) (*DisableRuleOutput, error)

Disables the specified rule. A disabled rule won't match any events, and won't self-trigger if it has a schedule expression. <p>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.</p>

func (*Client) EnableRule

func (c *Client) EnableRule(ctx context.Context, params *EnableRuleInput, optFns ...func(*Options)) (*EnableRuleOutput, error)

Enables the specified rule. If the rule does not exist, the operation fails. <p>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.</p>

func (*Client) ListEventBuses

func (c *Client) ListEventBuses(ctx context.Context, params *ListEventBusesInput, optFns ...func(*Options)) (*ListEventBusesOutput, error)

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

func (*Client) ListEventSources

func (c *Client) ListEventSources(ctx context.Context, params *ListEventSourcesInput, optFns ...func(*Options)) (*ListEventSourcesOutput, error)

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 ().

func (*Client) ListPartnerEventSourceAccounts

func (c *Client) ListPartnerEventSourceAccounts(ctx context.Context, params *ListPartnerEventSourceAccountsInput, optFns ...func(*Options)) (*ListPartnerEventSourceAccountsOutput, error)

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 not used by AWS customers.

func (*Client) ListPartnerEventSources

func (c *Client) ListPartnerEventSources(ctx context.Context, params *ListPartnerEventSourcesInput, optFns ...func(*Options)) (*ListPartnerEventSourcesOutput, error)

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.

func (*Client) ListRuleNamesByTarget

func (c *Client) ListRuleNamesByTarget(ctx context.Context, params *ListRuleNamesByTargetInput, optFns ...func(*Options)) (*ListRuleNamesByTargetOutput, error)

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

func (*Client) ListRules

func (c *Client) ListRules(ctx context.Context, params *ListRulesInput, optFns ...func(*Options)) (*ListRulesOutput, error)

Lists your Amazon EventBridge rules. You can either list all the rules or you can provide a prefix to match to the rule names. <p>ListRules does not list the targets of a rule. To see the targets associated with a rule, use <a>ListTargetsByRule</a>.</p>

func (*Client) ListTagsForResource

func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)

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

func (*Client) ListTargetsByRule

func (c *Client) ListTargetsByRule(ctx context.Context, params *ListTargetsByRuleInput, optFns ...func(*Options)) (*ListTargetsByRuleOutput, error)

Lists the targets assigned to the specified rule.

func (*Client) PutEvents

func (c *Client) PutEvents(ctx context.Context, params *PutEventsInput, optFns ...func(*Options)) (*PutEventsOutput, error)

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

func (*Client) PutPartnerEvents

func (c *Client) PutPartnerEvents(ctx context.Context, params *PutPartnerEventsInput, optFns ...func(*Options)) (*PutPartnerEventsOutput, error)

This is used by SaaS partners to write events to a customer's partner event bus. AWS customers do not use this operation.

func (*Client) PutPermission

func (c *Client) PutPermission(ctx context.Context, params *PutPermissionInput, optFns ...func(*Options)) (*PutPermissionOutput, error)

Running PutPermission permits the specified AWS account or AWS organization to put events to the specified event bus. Amazon EventBridge (CloudWatch Events) 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 an EventBridge rule with your account's event bus as a target. <p>To enable multiple AWS accounts to put events to your event bus, run <code>PutPermission</code> once for each of these accounts. Or, if all the accounts are members of the same AWS organization, you can run <code>PutPermission</code> once specifying <code>Principal</code> as "*" and specifying the AWS organization ID in <code>Condition</code>, to grant permissions to all accounts in that organization.</p> <p>If you grant permissions using an organization, then accounts in that organization must specify a <code>RoleArn</code> with proper permissions when they use <code>PutTarget</code> to add your account's event bus as a target. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html">Sending and Receiving Events Between AWS Accounts</a> in the <i>Amazon EventBridge User Guide</i>.</p> <p>The permission policy on the default event bus cannot exceed 10 KB in size.</p>

func (*Client) PutRule

func (c *Client) PutRule(ctx context.Context, params *PutRuleInput, optFns ...func(*Options)) (*PutRuleOutput, error)

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 (). <p>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 <a>CreateEventBus</a>.</p> <p>If you are updating an existing rule, the rule is replaced with what you specify in this <code>PutRule</code> command. If you omit arguments in <code>PutRule</code>, the old values for those arguments are not kept. Instead, they are replaced with null values.</p> <p>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.</p> <p>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.</p> <p>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 <code>PutRule</code> operation and assign tags, you must have both the <code>events:PutRule</code> and <code>events:TagResource</code> permissions.</p> <p>If you are updating an existing rule, any tags you specify in the <code>PutRule</code> operation are ignored. To update the tags of an existing rule, use <a>TagResource</a> and <a>UntagResource</a>.</p> <p>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 you want to match.</p> <p>In EventBridge, 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.</p> <p>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. </p> <p>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 <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html">Managing Your Costs with Budgets</a>.</p>

func (*Client) PutTargets

func (c *Client) PutTargets(ctx context.Context, params *PutTargetsInput, optFns ...func(*Options)) (*PutTargetsOutput, error)

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 Events: <ul> <li> <p>EC2 instances</p> </li> <li> <p>SSM Run Command</p> </li> <li> <p>SSM Automation</p> </li> <li> <p>AWS Lambda functions</p> </li> <li> <p>Data streams in Amazon Kinesis Data Streams</p> </li> <li> <p>Data delivery streams in Amazon Kinesis Data Firehose</p> </li> <li> <p>Amazon ECS tasks</p> </li> <li> <p>AWS Step Functions state machines</p> </li> <li> <p>AWS Batch jobs</p> </li> <li> <p>AWS CodeBuild projects</p> </li> <li> <p>Pipelines in AWS CodePipeline</p> </li> <li> <p>Amazon Inspector assessment templates</p> </li> <li> <p>Amazon SNS topics</p> </li> <li> <p>Amazon SQS queues, including FIFO queues</p> </li> <li> <p>The default event bus of another AWS account</p> </li> <li> <p>Amazon API Gateway REST APIs</p> </li> </ul> <p>Creating rules with built-in targets is supported only in the AWS Management Console. The built-in targets are <code>EC2 CreateSnapshot API call</code>, <code>EC2 RebootInstances API call</code>, <code>EC2 StopInstances API call</code>, and <code>EC2 TerminateInstances API call</code>. </p> <p>For some target types, <code>PutTargets</code> 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 <code>KinesisParameters</code> argument. To invoke a command on multiple EC2 instances with one rule, you can use the <code>RunCommandParameters</code> field.</p> <p>To be able to make API calls against the resources that you own, Amazon EventBridge (CloudWatch Events) needs the appropriate permissions. For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies. For EC2 instances, Kinesis data streams, AWS Step Functions state machines and API Gateway REST APIs, EventBridge relies on IAM roles that you specify in the <code>RoleARN</code> argument in <code>PutTargets</code>. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/auth-and-access-control-eventbridge.html">Authentication and Access Control</a> in the <i>Amazon EventBridge User Guide</i>.</p> <p>If another AWS account is in the same region and has granted you permission (using <code>PutPermission</code>), 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 <code>Arn</code> value when you run <code>PutTargets</code>. 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 <a href="https://aws.amazon.com/eventbridge/pricing/">Amazon EventBridge (CloudWatch Events) Pricing</a>.</p> <note> <p> <code>Input</code>, <code>InputPath</code>, and <code>InputTransformer</code> are not available with <code>PutTarget</code> if the target is an event bus of a different AWS account.</p> </note> <p>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 <code>RoleArn</code> with proper permissions in the <code>Target</code> structure. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html">Sending and Receiving Events Between AWS Accounts</a> in the <i>Amazon EventBridge User Guide</i>.</p> <p>For more information about enabling cross-account events, see <a>PutPermission</a>.</p> <p> <b>Input</b>, <b>InputPath</b>, and <b>InputTransformer</b> are mutually exclusive and optional parameters of a target. When a rule is triggered due to a matched event:</p> <ul> <li> <p>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).</p> </li> <li> <p>If <b>Input</b> is specified in the form of valid JSON, then the matched event is overridden with this constant.</p> </li> <li> <p>If <b>InputPath</b> is specified in the form of JSONPath (for example, <code>$.detail</code>), 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).</p> </li> <li> <p>If <b>InputTransformer</b> 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.</p> </li> </ul> <p>When you specify <code>InputPath</code> or <code>InputTransformer</code>, you must use JSON dot notation, not bracket notation.</p> <p>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.</p> <p>This action can partially fail if too many requests are made at the same time. If that happens, <code>FailedEntryCount</code> is non-zero in the response and each entry in <code>FailedEntries</code> provides the ID of the failed target and the error code.</p>

func (*Client) RemovePermission

func (c *Client) RemovePermission(ctx context.Context, params *RemovePermissionInput, optFns ...func(*Options)) (*RemovePermissionOutput, error)

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 ().

func (*Client) RemoveTargets

func (c *Client) RemoveTargets(ctx context.Context, params *RemoveTargetsInput, optFns ...func(*Options)) (*RemoveTargetsOutput, error)

Removes the specified targets from the specified rule. When the rule is triggered, those targets are no longer be invoked. <p>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.</p> <p>This action can partially fail if too many requests are made at the same time. If that happens, <code>FailedEntryCount</code> is non-zero in the response and each entry in <code>FailedEntries</code> provides the ID of the failed target and the error code.</p>

func (*Client) TagResource

func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)

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 and event buses 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 resource that already has tags. If you specify a new tag key, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, 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.

func (*Client) TestEventPattern

func (c *Client) TestEventPattern(ctx context.Context, params *TestEventPatternInput, optFns ...func(*Options)) (*TestEventPatternOutput, error)

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 you want to match.

func (*Client) UntagResource

func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)

Removes one or more tags from the specified EventBridge resource. In Amazon EventBridge (CloudWatch Events, rules and event buses can be tagged.

type CreateEventBusInput

type CreateEventBusInput struct {

	// If you are creating a partner event bus, this specifies the partner event source
	// that the new event bus will be matched with.
	EventSourceName *string

	// The name of the new event bus. Event bus names cannot contain the / character.
	// You can't use the name default for a custom event bus, as 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 member is required.
	Name *string

	// Tags to associate with the event bus.
	Tags []*types.Tag
}

type CreateEventBusOutput

type CreateEventBusOutput struct {

	// The ARN of the new event bus.
	EventBusArn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type CreatePartnerEventSourceInput

type CreatePartnerEventSourceInput struct {

	// 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.
	//
	// This member is required.
	Name *string

	// The AWS account ID that is permitted to create a matching partner event bus for
	// this partner event source.
	//
	// This member is required.
	Account *string
}

type CreatePartnerEventSourceOutput

type CreatePartnerEventSourceOutput struct {

	// The ARN of the partner event source.
	EventSourceArn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeactivateEventSourceInput

type DeactivateEventSourceInput struct {

	// The name of the partner event source to deactivate.
	//
	// This member is required.
	Name *string
}

type DeactivateEventSourceOutput

type DeactivateEventSourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteEventBusInput

type DeleteEventBusInput struct {

	// The name of the event bus to delete.
	//
	// This member is required.
	Name *string
}

type DeleteEventBusOutput

type DeleteEventBusOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeletePartnerEventSourceInput

type DeletePartnerEventSourceInput struct {

	// The AWS account ID of the AWS customer that the event source was created for.
	//
	// This member is required.
	Account *string

	// The name of the event source to delete.
	//
	// This member is required.
	Name *string
}

type DeletePartnerEventSourceOutput

type DeletePartnerEventSourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteRuleInput

type DeleteRuleInput struct {

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

	// The name of the rule.
	//
	// This member is required.
	Name *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 DeleteRuleOutput

type DeleteRuleOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeEventBusInput

type DescribeEventBusInput struct {

	// The name of the event bus to show details for. If you omit this, the default
	// event bus is displayed.
	Name *string
}

type DescribeEventBusOutput

type DescribeEventBusOutput struct {

	// The name of the event bus. Currently, this is always default.
	Name *string

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

	// The policy that enables the external account to send events to your account.
	Policy *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeEventSourceInput

type DescribeEventSourceInput struct {

	// The name of the partner event source to display the details of.
	//
	// This member is required.
	Name *string
}

type DescribeEventSourceOutput

type DescribeEventSourceOutput struct {

	// The name of the SaaS partner that created the event source.
	CreatedBy *string

	// The name of the partner event source.
	Name *string

	// The date and time that the event source will expire if you do not create a
	// matching event bus.
	ExpirationTime *time.Time

	// The ARN of the partner event source.
	Arn *string

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

	// The date and time that the event source was created.
	CreationTime *time.Time

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribePartnerEventSourceInput

type DescribePartnerEventSourceInput struct {

	// The name of the event source to display.
	//
	// This member is required.
	Name *string
}

type DescribePartnerEventSourceOutput

type DescribePartnerEventSourceOutput struct {

	// The ARN of the event source.
	Arn *string

	// The name of the event source.
	Name *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeRuleInput

type DescribeRuleInput struct {

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

	// The name of the rule.
	//
	// This member is required.
	Name *string
}

type DescribeRuleOutput

type DescribeRuleOutput struct {

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

	// The name of the rule.
	Name *string

	// The Amazon Resource Name (ARN) of the IAM role associated with the rule.
	RoleArn *string

	// The event bus associated with the rule.
	EventBusName *string

	// Specifies whether the rule is enabled or disabled.
	State types.RuleState

	// The Amazon Resource Name (ARN) of the rule.
	Arn *string

	// The event pattern. For more information, see Events and Event Patterns
	// (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html)
	// in the Amazon EventBridge User Guide.
	EventPattern *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

	// The description of the rule.
	Description *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DisableRuleInput

type DisableRuleInput struct {

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

	// The name of the rule.
	//
	// This member is required.
	Name *string
}

type DisableRuleOutput

type DisableRuleOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EnableRuleInput

type EnableRuleInput struct {

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

	// The name of the rule.
	//
	// This member is required.
	Name *string
}

type EnableRuleOutput

type EnableRuleOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options ResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func WithEndpointResolver

func WithEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver

WithEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided fallbackResolver for resolution. awsResolver and fallbackResolver must not be nil

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options ResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options ResolverOptions) (endpoint aws.Endpoint, err error)

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time) error
}

type ListEventBusesInput

type ListEventBusesInput struct {

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

	// The token returned by a previous call to retrieve the next set of results.
	NextToken *string

	// Specifying this limits the number of results returned by this operation. The
	// operation also returns a NextToken which you can use in a subsequent operation
	// to retrieve the next set of results.
	Limit *int32
}

type ListEventBusesOutput

type ListEventBusesOutput struct {

	// This list of event buses.
	EventBuses []*types.EventBus

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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListEventSourcesInput

type ListEventSourcesInput struct {

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

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

	// The token returned by a previous call to retrieve the next set of results.
	NextToken *string
}

type ListEventSourcesOutput

type ListEventSourcesOutput struct {

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

	// The list of event sources.
	EventSources []*types.EventSource

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListPartnerEventSourceAccountsInput

type ListPartnerEventSourceAccountsInput struct {

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

	// The name of the partner event source to display account information about.
	//
	// This member is required.
	EventSourceName *string

	// Specifying this limits the number of results returned by this operation. The
	// operation also returns a NextToken which you can use in a subsequent operation
	// to retrieve the next set of results.
	Limit *int32
}

type ListPartnerEventSourceAccountsOutput

type ListPartnerEventSourceAccountsOutput struct {

	// The list of partner event sources returned by the operation.
	PartnerEventSourceAccounts []*types.PartnerEventSourceAccount

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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListPartnerEventSourcesInput

type ListPartnerEventSourcesInput struct {

	// If you specify this, the results are limited to only those partner event sources
	// that start with the string you specify.
	//
	// This member is required.
	NamePrefix *string

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

	// The token returned by a previous call to this operation. Specifying this
	// retrieves the next set of results.
	NextToken *string
}

type ListPartnerEventSourcesOutput

type ListPartnerEventSourcesOutput struct {

	// The list of partner event sources returned by the operation.
	PartnerEventSources []*types.PartnerEventSource

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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListRuleNamesByTargetInput

type ListRuleNamesByTargetInput struct {

	// The maximum number of results to return.
	Limit *int32

	// The token returned by a previous call to retrieve the next set of results.
	NextToken *string

	// Limits the results to show only the rules associated with the specified event
	// bus.
	EventBusName *string

	// The Amazon Resource Name (ARN) of the target resource.
	//
	// This member is required.
	TargetArn *string
}

type ListRuleNamesByTargetOutput

type ListRuleNamesByTargetOutput struct {

	// The names of the rules that can invoke the given target.
	RuleNames []*string

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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListRulesInput

type ListRulesInput struct {

	// The token returned by a previous call to retrieve the next set of results.
	NextToken *string

	// Limits the results to show only the rules associated with the specified event
	// bus.
	EventBusName *string

	// The prefix matching the rule name.
	NamePrefix *string

	// The maximum number of results to return.
	Limit *int32
}

type ListRulesOutput

type ListRulesOutput struct {

	// The rules that match the specified criteria.
	Rules []*types.Rule

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

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListTagsForResourceInput

type ListTagsForResourceInput struct {

	// The ARN of the EventBridge resource for which you want to view tags.
	//
	// This member is required.
	ResourceARN *string
}

type ListTagsForResourceOutput

type ListTagsForResourceOutput struct {

	// The list of tag keys and values associated with the resource you specified
	Tags []*types.Tag

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListTargetsByRuleInput

type ListTargetsByRuleInput struct {

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

	// The token returned by a previous call to retrieve the next set of results.
	NextToken *string

	// The name of the rule.
	//
	// This member is required.
	Rule *string

	// The maximum number of results to return.
	Limit *int32
}

type ListTargetsByRuleOutput

type ListTargetsByRuleOutput struct {

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

	// The targets assigned to the rule.
	Targets []*types.Target

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions ResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// The region to send requests to. (Required)
	Region string

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer.
	Retryer retry.Retryer

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

func (Options) GetCredentials

func (o Options) GetCredentials() aws.CredentialsProvider

func (Options) GetEndpointOptions

func (o Options) GetEndpointOptions() ResolverOptions

func (Options) GetEndpointResolver

func (o Options) GetEndpointResolver() EndpointResolver

func (Options) GetHTTPSignerV4

func (o Options) GetHTTPSignerV4() HTTPSignerV4

func (Options) GetRegion

func (o Options) GetRegion() string

func (Options) GetRetryer

func (o Options) GetRetryer() retry.Retryer

type PutEventsInput

type PutEventsInput struct {

	// 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.
	//
	// This member is required.
	Entries []*types.PutEventsRequestEntry
}

type PutEventsOutput

type PutEventsOutput struct {

	// The number of failed entries.
	FailedEntryCount *int32

	// 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 []*types.PutEventsResultEntry

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type PutPartnerEventsInput

type PutPartnerEventsInput struct {

	// The list of events to write to the event bus.
	//
	// This member is required.
	Entries []*types.PutPartnerEventsRequestEntry
}

type PutPartnerEventsOutput

type PutPartnerEventsOutput struct {

	// The number of events from this operation that could not be written to the
	// partner event bus.
	FailedEntryCount *int32

	// The list of events from this operation that were successfully written to the
	// partner event bus.
	Entries []*types.PutPartnerEventsResultEntry

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type PutPermissionInput

type PutPermissionInput struct {

	// The action that you are enabling the other account to perform. Currently, this
	// must be events:PutEvents.
	//
	// This member is required.
	Action *string

	// The event bus associated with the rule. If you omit this, the default event bus
	// is used.
	EventBusName *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.  <p>If you specify "*" without specifying
	// <code>Condition</code>, avoid creating rules that may match undesirable events.
	// To create more secure rules, make sure that the event pattern for each rule
	// contains an <code>account</code> 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.</p>
	//
	// This member is required.
	Principal *string

	// 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.  <p>The
	// <code>Condition</code> is a JSON string which must contain <code>Type</code>,
	// <code>Key</code>, and <code>Value</code> fields.</p>
	Condition *types.Condition

	// 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 ().
	//
	// This member is required.
	StatementId *string
}

type PutPermissionOutput

type PutPermissionOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type PutRuleInput

type PutRuleInput struct {

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

	// Indicates whether the rule is enabled or disabled.
	State types.RuleState

	// A description of the rule.
	Description *string

	// The event pattern. For more information, see Events and Event Patterns
	// (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html)
	// in the Amazon EventBridge User Guide.
	EventPattern *string

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

	// The list of key-value pairs to associate with the rule.
	Tags []*types.Tag

	// The Amazon Resource Name (ARN) of the IAM role associated with the rule.
	RoleArn *string

	// The name of the rule that you are creating or updating.
	//
	// This member is required.
	Name *string
}

type PutRuleOutput

type PutRuleOutput struct {

	// The Amazon Resource Name (ARN) of the rule.
	RuleArn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type PutTargetsInput

type PutTargetsInput struct {

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

	// The name of the rule.
	//
	// This member is required.
	Rule *string

	// The targets to update or add to the rule.
	//
	// This member is required.
	Targets []*types.Target
}

type PutTargetsOutput

type PutTargetsOutput struct {

	// The failed target entries.
	FailedEntries []*types.PutTargetsResultEntry

	// The number of failed entries.
	FailedEntryCount *int32

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type RemovePermissionInput

type RemovePermissionInput struct {

	// The statement ID corresponding to the account that is no longer allowed to put
	// events to the default event bus.
	//
	// This member is required.
	StatementId *string

	// The name of the event bus to revoke permissions for. If you omit this, the
	// default event bus is used.
	EventBusName *string
}

type RemovePermissionOutput

type RemovePermissionOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type RemoveTargetsInput

type RemoveTargetsInput struct {

	// 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.
	Force *bool

	// The IDs of the targets to remove from the rule.
	//
	// This member is required.
	Ids []*string

	// The name of the rule.
	//
	// This member is required.
	Rule *string

	// The name of the event bus associated with the rule.
	EventBusName *string
}

type RemoveTargetsOutput

type RemoveTargetsOutput struct {

	// The number of failed entries.
	FailedEntryCount *int32

	// The failed target entries.
	FailedEntries []*types.RemoveTargetsResultEntry

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  ResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type ResolveEndpointMiddlewareOptions

type ResolveEndpointMiddlewareOptions interface {
	GetEndpointResolver() EndpointResolver
	GetEndpointOptions() ResolverOptions
}

type ResolverOptions

type ResolverOptions = internalendpoints.Options

ResolverOptions is the service endpoint resolver options

type TagResourceInput

type TagResourceInput struct {

	// The ARN of the EventBridge resource that you're adding tags to.
	//
	// This member is required.
	ResourceARN *string

	// The list of key-value pairs to associate with the resource.
	//
	// This member is required.
	Tags []*types.Tag
}

type TagResourceOutput

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type TestEventPatternInput

type TestEventPatternInput struct {

	// The event, in JSON format, to test against the event pattern.
	//
	// This member is required.
	Event *string

	// The event pattern. For more information, see Events and Event Patterns
	// (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html)
	// in the Amazon EventBridge User Guide.
	//
	// This member is required.
	EventPattern *string
}

type TestEventPatternOutput

type TestEventPatternOutput struct {

	// Indicates whether the event matches the event pattern.
	Result *bool

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type UntagResourceInput

type UntagResourceInput struct {

	// The ARN of the EventBridge resource from which you are removing tags.
	//
	// This member is required.
	ResourceARN *string

	// The list of tag keys to remove from the resource.
	//
	// This member is required.
	TagKeys []*string
}

type UntagResourceOutput

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL