codestarnotifications – github.com/aws/aws-sdk-go-v2/service/codestarnotifications Index | Files | Directories

package codestarnotifications

import "github.com/aws/aws-sdk-go-v2/service/codestarnotifications"

Index

Constants

const ServiceAPIVersion = "2019-10-15"
const ServiceID = "codestar notifications"

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 Client

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

This AWS CodeStar Notifications API Reference provides descriptions and usage examples of the operations and data types for the AWS CodeStar Notifications API. You can use the AWS CodeStar Notifications API to work with the following objects: <p>Notification rules, by calling the following: </p> <ul> <li> <p> <a>CreateNotificationRule</a>, which creates a notification rule for a resource in your account. </p> </li> <li> <p> <a>DeleteNotificationRule</a>, which deletes a notification rule. </p> </li> <li> <p> <a>DescribeNotificationRule</a>, which provides information about a notification rule. </p> </li> <li> <p> <a>ListNotificationRules</a>, which lists the notification rules associated with your account. </p> </li> <li> <p> <a>UpdateNotificationRule</a>, which changes the name, events, or targets associated with a notification rule. </p> </li> <li> <p> <a>Subscribe</a>, which subscribes a target to a notification rule. </p> </li> <li> <p> <a>Unsubscribe</a>, which removes a target from a notification rule. </p> </li> </ul> <p>Targets, by calling the following: </p> <ul> <li> <p> <a>DeleteTarget</a>, which removes a notification rule target (SNS topic) from a notification rule. </p> </li> <li> <p> <a>ListTargets</a>, which lists the targets associated with a notification rule. </p> </li> </ul> <p>Events, by calling the following: </p> <ul> <li> <p> <a>ListEventTypes</a>, which lists the event types you can include in a notification rule. </p> </li> </ul> <p>Tags, by calling the following: </p> <ul> <li> <p> <a>ListTagsForResource</a>, which lists the tags already associated with a notification rule in your account. </p> </li> <li> <p> <a>TagResource</a>, which associates a tag you provide with a notification rule in your account. </p> </li> <li> <p> <a>UntagResource</a>, which removes a tag from a notification rule in your account. </p> </li> </ul> <p> For information about how to use AWS CodeStar Notifications, see link in the CodeStarNotifications User Guide. </p>

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

func (c *Client) CreateNotificationRule(ctx context.Context, params *CreateNotificationRuleInput, optFns ...func(*Options)) (*CreateNotificationRuleOutput, error)

Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as SNS topics) where you want to receive them.

func (*Client) DeleteNotificationRule

func (c *Client) DeleteNotificationRule(ctx context.Context, params *DeleteNotificationRuleInput, optFns ...func(*Options)) (*DeleteNotificationRuleOutput, error)

Deletes a notification rule for a resource.

func (*Client) DeleteTarget

func (c *Client) DeleteTarget(ctx context.Context, params *DeleteTargetInput, optFns ...func(*Options)) (*DeleteTargetOutput, error)

Deletes a specified target for notifications.

func (*Client) DescribeNotificationRule

func (c *Client) DescribeNotificationRule(ctx context.Context, params *DescribeNotificationRuleInput, optFns ...func(*Options)) (*DescribeNotificationRuleOutput, error)

Returns information about a specified notification rule.

func (*Client) ListEventTypes

func (c *Client) ListEventTypes(ctx context.Context, params *ListEventTypesInput, optFns ...func(*Options)) (*ListEventTypesOutput, error)

Returns information about the event types available for configuring notifications.

func (*Client) ListNotificationRules

func (c *Client) ListNotificationRules(ctx context.Context, params *ListNotificationRulesInput, optFns ...func(*Options)) (*ListNotificationRulesOutput, error)

Returns a list of the notification rules for an AWS account.

func (*Client) ListTagsForResource

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

Returns a list of the tags associated with a notification rule.

func (*Client) ListTargets

func (c *Client) ListTargets(ctx context.Context, params *ListTargetsInput, optFns ...func(*Options)) (*ListTargetsOutput, error)

Returns a list of the notification rule targets for an AWS account.

func (*Client) Subscribe

func (c *Client) Subscribe(ctx context.Context, params *SubscribeInput, optFns ...func(*Options)) (*SubscribeOutput, error)

Creates an association between a notification rule and an SNS topic so that the associated target can receive notifications when the events described in the rule are triggered.

func (*Client) TagResource

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

Associates a set of provided tags with a notification rule.

func (*Client) Unsubscribe

func (c *Client) Unsubscribe(ctx context.Context, params *UnsubscribeInput, optFns ...func(*Options)) (*UnsubscribeOutput, error)

Removes an association between a notification rule and an Amazon SNS topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.

func (*Client) UntagResource

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

Removes the association between one or more provided tags and a notification rule.

func (*Client) UpdateNotificationRule

func (c *Client) UpdateNotificationRule(ctx context.Context, params *UpdateNotificationRuleInput, optFns ...func(*Options)) (*UpdateNotificationRuleOutput, error)

Updates a notification rule for a resource. You can change the events that trigger the notification rule, the status of the rule, and the targets that receive the notifications. To add or remove tags for a notification rule, you must use TagResource () and UntagResource ().

type CreateNotificationRuleInput

type CreateNotificationRuleInput struct {
	// A list of tags to apply to this notification rule. Key names cannot start with
	// "aws".
	Tags map[string]*string
	// A list of event types associated with this notification rule. For a list of
	// allowed events, see EventTypeSummary ().
	EventTypeIds []*string
	// A unique, client-generated idempotency token that, when provided in a request,
	// ensures the request cannot be repeated with a changed parameter. If a request
	// with the same parameters is received and a token is included, the request
	// returns information about the initial request that used that token. The AWS SDKs
	// prepopulate client request tokens. If you are using an AWS SDK, an idempotency
	// token is created for you.
	ClientRequestToken *string
	// The level of detail to include in the notifications for this resource. BASIC
	// will include only the contents of the event as it would appear in AWS
	// CloudWatch. FULL will include any supplemental information provided by AWS
	// CodeStar Notifications and/or the service for the resource for which the
	// notification is created.
	DetailType types.DetailType
	// The Amazon Resource Name (ARN) of the resource to associate with the
	// notification rule. Supported resources include pipelines in AWS CodePipeline,
	// repositories in AWS CodeCommit, and build projects in AWS CodeBuild.
	Resource *string
	// The status of the notification rule. The default value is ENABLED. If the status
	// is set to DISABLED, notifications aren't sent for the notification rule.
	Status types.NotificationRuleStatus
	// A list of Amazon Resource Names (ARNs) of SNS topics to associate with the
	// notification rule.
	Targets []*types.Target
	// The name for the notification rule. Notifictaion rule names must be unique in
	// your AWS account.
	Name *string
}

type CreateNotificationRuleOutput

type CreateNotificationRuleOutput struct {
	// The Amazon Resource Name (ARN) of the notification rule.
	Arn *string

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

type DeleteNotificationRuleInput

type DeleteNotificationRuleInput struct {
	// The Amazon Resource Name (ARN) of the notification rule you want to delete.
	Arn *string
}

type DeleteNotificationRuleOutput

type DeleteNotificationRuleOutput struct {
	// The Amazon Resource Name (ARN) of the deleted notification rule.
	Arn *string

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

type DeleteTargetInput

type DeleteTargetInput struct {
	// A Boolean value that can be used to delete all associations with this SNS topic.
	// The default value is FALSE. If set to TRUE, all associations between that target
	// and every notification rule in your AWS account are deleted.
	ForceUnsubscribeAll *bool
	// The Amazon Resource Name (ARN) of the SNS topic to delete.
	TargetAddress *string
}

type DeleteTargetOutput

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

type DescribeNotificationRuleInput

type DescribeNotificationRuleInput struct {
	// The Amazon Resource Name (ARN) of the notification rule.
	Arn *string
}

type DescribeNotificationRuleOutput

type DescribeNotificationRuleOutput struct {
	// The Amazon Resource Name (ARN) of the notification rule.
	Arn *string
	// The date and time the notification rule was most recently updated, in timestamp
	// format.
	LastModifiedTimestamp *time.Time
	// The level of detail included in the notifications for this resource. BASIC will
	// include only the contents of the event as it would appear in AWS CloudWatch.
	// FULL will include any supplemental information provided by AWS CodeStar
	// Notifications and/or the service for the resource for which the notification is
	// created.
	DetailType types.DetailType
	// The status of the notification rule. Valid statuses are on (sending
	// notifications) or off (not sending notifications).
	Status types.NotificationRuleStatus
	// A list of the event types associated with the notification rule.
	EventTypes []*types.EventTypeSummary
	// The Amazon Resource Name (ARN) of the resource associated with the notification
	// rule.
	Resource *string
	// The name of the notification rule.
	Name *string
	// The tags associated with the notification rule.
	Tags map[string]*string
	// The date and time the notification rule was created, in timestamp format.
	CreatedTimestamp *time.Time
	// A list of the SNS topics associated with the notification rule.
	Targets []*types.TargetSummary
	// The name or email alias of the person who created the notification rule.
	CreatedBy *string

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

type IdempotencyTokenProvider interface {
	GetIdempotencyToken() (string, error)
}

IdempotencyTokenProvider interface for providing idempotency token

type ListEventTypesInput

type ListEventTypesInput struct {
	// The filters to use to return information by service or resource type.
	Filters []*types.ListEventTypesFilter
	// An enumeration token that, when provided in a request, returns the next batch of
	// the results.
	NextToken *string
	// A non-negative integer used to limit the number of returned results. The default
	// number is 50. The maximum number of results that can be returned is 100.
	MaxResults *int32
}

type ListEventTypesOutput

type ListEventTypesOutput struct {
	// Information about each event, including service name, resource type, event ID,
	// and event name.
	EventTypes []*types.EventTypeSummary
	// An enumeration token that can be used in a request to return the next batch of
	// the results.
	NextToken *string

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

type ListNotificationRulesInput

type ListNotificationRulesInput struct {
	// A non-negative integer used to limit the number of returned results. The maximum
	// number of results that can be returned is 100.
	MaxResults *int32
	// The filters to use to return information by service or resource type. For valid
	// values, see ListNotificationRulesFilter (). A filter with the same name can
	// appear more than once when used with OR statements. Filters with different names
	// should be applied with AND statements.
	Filters []*types.ListNotificationRulesFilter
	// An enumeration token that, when provided in a request, returns the next batch of
	// the results.
	NextToken *string
}

type ListNotificationRulesOutput

type ListNotificationRulesOutput struct {
	// The list of notification rules for the AWS account, by Amazon Resource Name
	// (ARN) and ID.
	NotificationRules []*types.NotificationRuleSummary
	// An enumeration token that can be used in a request to return the next batch of
	// the results.
	NextToken *string

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

type ListTagsForResourceInput

type ListTagsForResourceInput struct {
	// The Amazon Resource Name (ARN) for the notification rule.
	Arn *string
}

type ListTagsForResourceOutput

type ListTagsForResourceOutput struct {
	// The tags associated with the notification rule.
	Tags map[string]*string

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

type ListTargetsInput

type ListTargetsInput struct {
	// The filters to use to return information by service or resource type. Valid
	// filters include target type, target address, and target status. A filter with
	// the same name can appear more than once when used with OR statements. Filters
	// with different names should be applied with AND statements.
	Filters []*types.ListTargetsFilter
	// An enumeration token that, when provided in a request, returns the next batch of
	// the results.
	NextToken *string
	// A non-negative integer used to limit the number of returned results. The maximum
	// number of results that can be returned is 100.
	MaxResults *int32
}

type ListTargetsOutput

type ListTargetsOutput struct {
	// An enumeration token that can be used in a request to return the next batch of
	// results.
	NextToken *string
	// The list of notification rule targets.
	Targets []*types.TargetSummary

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

	// Provides idempotency tokens values that will be automatically populated into
	// idempotent API operations.
	IdempotencyTokenProvider IdempotencyTokenProvider

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

func (o Options) GetIdempotencyTokenProvider() IdempotencyTokenProvider

func (Options) GetRegion

func (o Options) GetRegion() string

func (Options) GetRetryer

func (o Options) GetRetryer() retry.Retryer

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 SubscribeInput

type SubscribeInput struct {
	// Information about the SNS topics associated with a notification rule.
	Target *types.Target
	// The Amazon Resource Name (ARN) of the notification rule for which you want to
	// create the association.
	Arn *string
	// An enumeration token that, when provided in a request, returns the next batch of
	// the results.
	ClientRequestToken *string
}

type SubscribeOutput

type SubscribeOutput struct {
	// The Amazon Resource Name (ARN) of the notification rule for which you have
	// created assocations.
	Arn *string

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

type TagResourceInput

type TagResourceInput struct {
	// The list of tags to associate with the resource. Tag key names cannot start with
	// "aws".
	Tags map[string]*string
	// The Amazon Resource Name (ARN) of the notification rule to tag.
	Arn *string
}

type TagResourceOutput

type TagResourceOutput struct {
	// The list of tags associated with the resource.
	Tags map[string]*string

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

type UnsubscribeInput

type UnsubscribeInput struct {
	// The Amazon Resource Name (ARN) of the notification rule.
	Arn *string
	// The ARN of the SNS topic to unsubscribe from the notification rule.
	TargetAddress *string
}

type UnsubscribeOutput

type UnsubscribeOutput struct {
	// The Amazon Resource Name (ARN) of the the notification rule from which you have
	// removed a subscription.
	Arn *string

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

type UntagResourceInput

type UntagResourceInput struct {
	// The key names of the tags to remove.
	TagKeys []*string
	// The Amazon Resource Name (ARN) of the notification rule from which to remove the
	// tags.
	Arn *string
}

type UntagResourceOutput

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

type UpdateNotificationRuleInput

type UpdateNotificationRuleInput struct {
	// The address and type of the targets to receive notifications from this
	// notification rule.
	Targets []*types.Target
	// The level of detail to include in the notifications for this resource. BASIC
	// will include only the contents of the event as it would appear in AWS
	// CloudWatch. FULL will include any supplemental information provided by AWS
	// CodeStar Notifications and/or the service for the resource for which the
	// notification is created.
	DetailType types.DetailType
	// A list of event types associated with this notification rule.
	EventTypeIds []*string
	// The status of the notification rule. Valid statuses include enabled (sending
	// notifications) or disabled (not sending notifications).
	Status types.NotificationRuleStatus
	// The Amazon Resource Name (ARN) of the notification rule.
	Arn *string
	// The name of the notification rule.
	Name *string
}

type UpdateNotificationRuleOutput

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

Source Files

api_client.go api_op_CreateNotificationRule.go api_op_DeleteNotificationRule.go api_op_DeleteTarget.go api_op_DescribeNotificationRule.go api_op_ListEventTypes.go api_op_ListNotificationRules.go api_op_ListTagsForResource.go api_op_ListTargets.go api_op_Subscribe.go api_op_TagResource.go api_op_Unsubscribe.go api_op_UntagResource.go api_op_UpdateNotificationRule.go deserializers.go endpoints.go serializers.go validators.go

Directories

PathSynopsis
internal
types
Version
v0.1.0
Published
Sep 29, 2020
Platform
windows/amd64
Imports
28 packages
Last checked
now

Tools for package owners.