cloudwatchevents

package module
v0.27.0 Latest Latest
Warning

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

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

Documentation

Overview

Package cloudwatchevents provides the API client, operations, and parameter types for Amazon CloudWatch Events.

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

Index

Constants

View Source
const ServiceAPIVersion = "2015-10-07"
View Source
const ServiceID = "CloudWatch Events"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

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
}

Client provides the API client to make operations call for Amazon CloudWatch Events.

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

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

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

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. ListRules does not list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.

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. To enable multiple AWS accounts to put events to your 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 the default event bus cannot exceed 10 KB in size.

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. 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 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, 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. 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. 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 (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.html).

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:

  • 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

  • Amazon API

Gateway REST APIs

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 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 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 is not charged. For more information, see Amazon EventBridge (CloudWatch Events) Pricing (https://aws.amazon.com/eventbridge/pricing/). Input, InputPath, and InputTransformer are not available with PutTarget if the target is an event bus of a different AWS account. 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/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, 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.

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

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 {

	// 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

	// 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

	// 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 AWS account ID that is permitted to create a matching partner event bus for
	// this partner event source.
	//
	// This member is required.
	Account *string

	// 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
}

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

	// The event bus associated with the rule. If you omit this, the default event bus
	// is used.
	EventBusName *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 Amazon Resource Name (ARN) of the account permitted to write events to the
	// current account.
	Arn *string

	// The name of the event bus. Currently, this is always default.
	Name *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 ARN of the partner event source.
	Arn *string

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

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

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

	// The name of the partner event source.
	Name *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

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

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

type DescribeRuleOutput

type DescribeRuleOutput struct {

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

	// The description of the rule.
	Description *string

	// The event bus associated with the rule.
	EventBusName *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 name of the rule.
	Name *string

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

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

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

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

type DisableRuleInput

type DisableRuleInput struct {

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

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

type DisableRuleOutput

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

type EnableRuleInput

type EnableRuleInput struct {

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

	// The event bus associated with the rule. If you omit this, the default event bus
	// is used.
	EventBusName *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 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

	// 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
}

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

	// Specifying this limits the results to only those partner event sources 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
}

type ListEventSourcesOutput

type ListEventSourcesOutput struct {

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

	// 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 ListPartnerEventSourceAccountsInput

type ListPartnerEventSourceAccountsInput struct {

	// 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

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

type ListPartnerEventSourceAccountsOutput

type ListPartnerEventSourceAccountsOutput struct {

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

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

	// 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 {

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

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

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

type ListRuleNamesByTargetInput

type ListRuleNamesByTargetInput struct {

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

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

	// 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
}

type ListRuleNamesByTargetOutput

type ListRuleNamesByTargetOutput struct {

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

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

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

type ListRulesInput

type ListRulesInput struct {

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

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

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

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

type ListRulesOutput

type ListRulesOutput struct {

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

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

	// 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 name of the rule.
	//
	// This member is required.
	Rule *string

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

	// 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
}

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.

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

	// The number of failed entries.
	FailedEntryCount *int32

	// 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 list of events from this operation that were successfully written to the
	// partner event bus.
	Entries []*types.PutPartnerEventsResultEntry

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

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

	// 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

	// 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 which must contain Type, Key, and Value fields.
	Condition *types.Condition

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

type PutPermissionOutput

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

type PutRuleInput

type PutRuleInput struct {

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

	// A description of the rule.
	Description *string

	// The event bus to associate with this rule. If you omit this, the default event
	// bus is used.
	EventBusName *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 Amazon Resource Name (ARN) of the IAM role associated with the rule.
	RoleArn *string

	// 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

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

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

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

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

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 {

	// 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

	// 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
}

type RemoveTargetsOutput

type RemoveTargetsOutput struct {

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

	// The number of failed entries.
	FailedEntryCount *int32

	// 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 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