oam

package module
v1.15.8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 42 Imported by: 10

Documentation

Overview

Package oam provides the API client, operations, and parameter types for CloudWatch Observability Access Manager.

Use Amazon CloudWatch Observability Access Manager to create and manage links between source accounts and monitoring accounts by using CloudWatch cross-account observability. With CloudWatch cross-account observability, you can monitor and troubleshoot applications that span multiple accounts within a Region. Seamlessly search, visualize, and analyze your metrics, logs, traces, and Application Insights applications in any of the linked accounts without account boundaries.

Set up one or more Amazon Web Services accounts as monitoring accounts and link them with multiple source accounts. A monitoring account is a central Amazon Web Services account that can view and interact with observability data generated from source accounts. A source account is an individual Amazon Web Services account that generates observability data for the resources that reside in it. Source accounts share their observability data with the monitoring account. The shared observability data can include metrics in Amazon CloudWatch, logs in Amazon CloudWatch Logs, traces in X-Ray, and applications in Amazon CloudWatch Application Insights.

Index

Constants

View Source
const ServiceAPIVersion = "2022-06-10"
View Source
const ServiceID = "OAM"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver deprecated

func WithEndpointResolver(v EndpointResolver) func(*Options)

Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for this field will likely prevent you from using any endpoint-related service features released after the introduction of EndpointResolverV2 and BaseEndpoint.

To migrate an EndpointResolver implementation that uses a custom endpoint, set the client option BaseEndpoint instead.

func WithEndpointResolverV2 added in v1.2.0

func WithEndpointResolverV2(v EndpointResolverV2) func(*Options)

WithEndpointResolverV2 returns a functional option for setting the Client's EndpointResolverV2 option.

func WithSigV4SigningName added in v1.6.2

func WithSigV4SigningName(name string) func(*Options)

WithSigV4SigningName applies an override to the authentication workflow to use the given signing name for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing name from both auth scheme resolution and endpoint resolution.

func WithSigV4SigningRegion added in v1.6.2

func WithSigV4SigningRegion(region string) func(*Options)

WithSigV4SigningRegion applies an override to the authentication workflow to use the given signing region for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing region from both auth scheme resolution and endpoint resolution.

Types

type AuthResolverParameters added in v1.6.2

type AuthResolverParameters struct {
	// The name of the operation being invoked.
	Operation string

	// The region in which the operation is being invoked.
	Region string
}

AuthResolverParameters contains the set of inputs necessary for auth scheme resolution.

type AuthSchemeResolver added in v1.6.2

type AuthSchemeResolver interface {
	ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
}

AuthSchemeResolver returns a set of possible authentication options for an operation.

type Client

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

Client provides the API client to make operations call for CloudWatch Observability Access Manager.

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 (c *Client) CreateLink(ctx context.Context, params *CreateLinkInput, optFns ...func(*Options)) (*CreateLinkOutput, error)

Creates a link between a source account and a sink that you have created in a monitoring account. After the link is created, data is sent from the source account to the monitoring account. When you create a link, you can optionally specify filters that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.

Before you create a link, you must create a sink in the monitoring account and create a sink policy in that account. The sink policy must permit the source account to link to it. You can grant permission to source accounts by granting permission to an entire organization or to individual accounts.

For more information, see CreateSink and PutSinkPolicy.

Each monitoring account can be linked to as many as 100,000 source accounts.

Each source account can be linked to as many as five monitoring accounts.

func (*Client) CreateSink

func (c *Client) CreateSink(ctx context.Context, params *CreateSinkInput, optFns ...func(*Options)) (*CreateSinkOutput, error)

Use this to create a sink in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that represents an attachment point in a monitoring account. Source accounts can link to the sink to send observability data.

After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see PutSinkPolicy.

Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.

func (c *Client) DeleteLink(ctx context.Context, params *DeleteLinkInput, optFns ...func(*Options)) (*DeleteLinkOutput, error)

Deletes a link between a monitoring account sink and a source account. You must run this operation in the source account.

func (*Client) DeleteSink

func (c *Client) DeleteSink(ctx context.Context, params *DeleteSinkInput, optFns ...func(*Options)) (*DeleteSinkOutput, error)

Deletes a sink. You must delete all links to a sink before you can delete that sink.

func (c *Client) GetLink(ctx context.Context, params *GetLinkInput, optFns ...func(*Options)) (*GetLinkOutput, error)

Returns complete information about one link.

To use this operation, provide the link ARN. To retrieve a list of link ARNs, use ListLinks.

func (*Client) GetSink

func (c *Client) GetSink(ctx context.Context, params *GetSinkInput, optFns ...func(*Options)) (*GetSinkOutput, error)

Returns complete information about one monitoring account sink.

To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.

func (*Client) GetSinkPolicy

func (c *Client) GetSinkPolicy(ctx context.Context, params *GetSinkPolicyInput, optFns ...func(*Options)) (*GetSinkPolicyOutput, error)

Returns the current sink policy attached to this sink. The sink policy specifies what accounts can attach to this sink as source accounts, and what types of data they can share.

func (c *Client) ListAttachedLinks(ctx context.Context, params *ListAttachedLinksInput, optFns ...func(*Options)) (*ListAttachedLinksOutput, error)

Returns a list of source account links that are linked to this monitoring account sink.

To use this operation, provide the sink ARN. To retrieve a list of sink ARNs, use ListSinks.

To find a list of links for one source account, use ListLinks.

func (c *Client) ListLinks(ctx context.Context, params *ListLinksInput, optFns ...func(*Options)) (*ListLinksOutput, error)

Use this operation in a source account to return a list of links to monitoring account sinks that this source account has.

To find a list of links for one monitoring account sink, use ListAttachedLinks from within the monitoring account.

func (*Client) ListSinks

func (c *Client) ListSinks(ctx context.Context, params *ListSinksInput, optFns ...func(*Options)) (*ListSinksOutput, error)

Use this operation in a monitoring account to return the list of sinks created in that account.

func (*Client) ListTagsForResource

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

Displays the tags associated with a resource. Both sinks and links support tagging.

func (*Client) Options added in v1.7.0

func (c *Client) Options() Options

Options returns a copy of the client configuration.

Callers SHOULD NOT perform mutations on any inner structures within client config. Config overrides should instead be made on a per-operation basis through functional options.

func (*Client) PutSinkPolicy

func (c *Client) PutSinkPolicy(ctx context.Context, params *PutSinkPolicyInput, optFns ...func(*Options)) (*PutSinkPolicyOutput, error)

Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink. When you create a sink policy, you can grant permissions to all accounts in an organization or to individual accounts.

You can also use a sink policy to limit the types of data that is shared. The three types that you can allow or deny are:

  • Metrics - Specify with AWS::CloudWatch::Metric

  • Log groups - Specify with AWS::Logs::LogGroup

  • Traces - Specify with AWS::XRay::Trace

  • Application Insights - Applications - Specify with AWS::ApplicationInsights::Application

See the examples in this section to see how to specify permitted source accounts and data types.

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 resource. Both sinks and links can be tagged.

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.

Tags don't have any semantic meaning to Amazon Web Services 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 for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, 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.

Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the oam:ResourceTag permission. The iam:ResourceTag permission does not allow you to tag and untag links and sinks.

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

Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have the oam:ResourceTag permission. The iam:TagResource permission does not allow you to tag and untag links and sinks.

func (c *Client) UpdateLink(ctx context.Context, params *UpdateLinkInput, optFns ...func(*Options)) (*UpdateLinkOutput, error)

Use this operation to change what types of data are shared from a source account to its linked monitoring account sink. You can't change the sink or change the monitoring account with this operation.

When you update a link, you can optionally specify filters that specify which metric namespaces and which log groups are shared from the source account to the monitoring account.

To update the list of tags associated with the sink, use TagResource.

type CreateLinkInput

type CreateLinkInput struct {

	// Specify a friendly human-readable name to use to identify this source account
	// when you are viewing data from it in the monitoring account.
	//
	// You can use a custom label or use the following variables:
	//
	//   - $AccountName is the name of the account
	//
	//   - $AccountEmail is the globally unique email address of the account
	//
	//   - $AccountEmailNoDomain is the email address of the account without the domain
	//   name
	//
	// This member is required.
	LabelTemplate *string

	// An array of strings that define which types of data that the source account
	// shares with the monitoring account.
	//
	// This member is required.
	ResourceTypes []types.ResourceType

	// The ARN of the sink to use to create this link. You can use [ListSinks] to find the ARNs
	// of sinks.
	//
	// For more information about sinks, see [CreateSink].
	//
	// [CreateSink]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html
	// [ListSinks]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html
	//
	// This member is required.
	SinkIdentifier *string

	// Use this structure to optionally create filters that specify that only some
	// metric namespaces or log groups are to be shared from the source account to the
	// monitoring account.
	LinkConfiguration *types.LinkConfiguration

	// Assigns one or more tags (key-value pairs) to the link.
	//
	// 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.
	//
	// For more information about using tags to control access, see [Controlling access to Amazon Web Services resources using tags].
	//
	// [Controlling access to Amazon Web Services resources using tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html
	Tags map[string]string
	// contains filtered or unexported fields
}

type CreateLinkOutput

type CreateLinkOutput struct {

	// The ARN of the link that is newly created.
	Arn *string

	// The random ID string that Amazon Web Services generated as part of the link ARN.
	Id *string

	// The label that you assigned to this link. If the labelTemplate includes
	// variables, this field displays the variables resolved to their actual values.
	Label *string

	// The exact label template that you specified, with the variables not resolved.
	LabelTemplate *string

	// This structure includes filters that specify which metric namespaces and which
	// log groups are shared from the source account to the monitoring account.
	LinkConfiguration *types.LinkConfiguration

	// The resource types supported by this link.
	ResourceTypes []string

	// The ARN of the sink that is used for this link.
	SinkArn *string

	// The tags assigned to the link.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CreateSinkInput

type CreateSinkInput struct {

	// A name for the sink.
	//
	// This member is required.
	Name *string

	// Assigns one or more tags (key-value pairs) to the link.
	//
	// 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.
	//
	// For more information about using tags to control access, see [Controlling access to Amazon Web Services resources using tags].
	//
	// [Controlling access to Amazon Web Services resources using tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html
	Tags map[string]string
	// contains filtered or unexported fields
}

type CreateSinkOutput

type CreateSinkOutput struct {

	// The ARN of the sink that is newly created.
	Arn *string

	// The random ID string that Amazon Web Services generated as part of the sink ARN.
	Id *string

	// The name of the sink.
	Name *string

	// The tags assigned to the sink.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteLinkInput

type DeleteLinkInput struct {

	// The ARN of the link to delete.
	//
	// This member is required.
	Identifier *string
	// contains filtered or unexported fields
}

type DeleteLinkOutput

type DeleteLinkOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteSinkInput

type DeleteSinkInput struct {

	// The ARN of the sink to delete.
	//
	// This member is required.
	Identifier *string
	// contains filtered or unexported fields
}

type DeleteSinkOutput

type DeleteSinkOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type EndpointParameters added in v1.2.0

type EndpointParameters struct {
	// The AWS region used to dispatch the request.
	//
	// Parameter is
	// required.
	//
	// AWS::Region
	Region *string

	// When true, use the dual-stack endpoint. If the configured endpoint does not
	// support dual-stack, dispatching the request MAY return an error.
	//
	// Defaults to
	// false if no value is provided.
	//
	// AWS::UseDualStack
	UseDualStack *bool

	// When true, send this request to the FIPS-compliant regional endpoint. If the
	// configured endpoint does not have a FIPS compliant endpoint, dispatching the
	// request will return an error.
	//
	// Defaults to false if no value is
	// provided.
	//
	// AWS::UseFIPS
	UseFIPS *bool

	// Override the endpoint used to send this request
	//
	// Parameter is
	// required.
	//
	// SDK::Endpoint
	Endpoint *string
}

EndpointParameters provides the parameters that influence how endpoints are resolved.

func (EndpointParameters) ValidateRequired added in v1.2.0

func (p EndpointParameters) ValidateRequired() error

ValidateRequired validates required parameters are set.

func (EndpointParameters) WithDefaults added in v1.2.0

func (p EndpointParameters) WithDefaults() EndpointParameters

WithDefaults returns a shallow copy of EndpointParameterswith default values applied to members where applicable.

type EndpointResolver

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

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (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 EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type EndpointResolverV2 added in v1.2.0

type EndpointResolverV2 interface {
	// ResolveEndpoint attempts to resolve the endpoint with the provided options,
	// returning the endpoint if found. Otherwise an error is returned.
	ResolveEndpoint(ctx context.Context, params EndpointParameters) (
		smithyendpoints.Endpoint, error,
	)
}

EndpointResolverV2 provides the interface for resolving service endpoints.

func NewDefaultEndpointResolverV2 added in v1.2.0

func NewDefaultEndpointResolverV2() EndpointResolverV2

type GetLinkInput

type GetLinkInput struct {

	// The ARN of the link to retrieve information for.
	//
	// This member is required.
	Identifier *string
	// contains filtered or unexported fields
}

type GetLinkOutput

type GetLinkOutput struct {

	// The ARN of the link.
	Arn *string

	// The random ID string that Amazon Web Services generated as part of the link ARN.
	Id *string

	// The label that you assigned to this link, with the variables resolved to their
	// actual values.
	Label *string

	// The exact label template that was specified when the link was created, with the
	// template variables not resolved.
	LabelTemplate *string

	// This structure includes filters that specify which metric namespaces and which
	// log groups are shared from the source account to the monitoring account.
	LinkConfiguration *types.LinkConfiguration

	// The resource types supported by this link.
	ResourceTypes []string

	// The ARN of the sink that is used for this link.
	SinkArn *string

	// The tags assigned to the link.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetSinkInput

type GetSinkInput struct {

	// The ARN of the sink to retrieve information for.
	//
	// This member is required.
	Identifier *string
	// contains filtered or unexported fields
}

type GetSinkOutput

type GetSinkOutput struct {

	// The ARN of the sink.
	Arn *string

	// The random ID string that Amazon Web Services generated as part of the sink ARN.
	Id *string

	// The name of the sink.
	Name *string

	// The tags assigned to the sink.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetSinkPolicyInput

type GetSinkPolicyInput struct {

	// The ARN of the sink to retrieve the policy of.
	//
	// This member is required.
	SinkIdentifier *string
	// contains filtered or unexported fields
}

type GetSinkPolicyOutput

type GetSinkPolicyOutput struct {

	// The policy that you specified, in JSON format.
	Policy *string

	// The ARN of the sink.
	SinkArn *string

	// The random ID string that Amazon Web Services generated as part of the sink ARN.
	SinkId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

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, optFns ...func(*v4.SignerOptions)) error
}

type ListAttachedLinksAPIClient

type ListAttachedLinksAPIClient interface {
	ListAttachedLinks(context.Context, *ListAttachedLinksInput, ...func(*Options)) (*ListAttachedLinksOutput, error)
}

ListAttachedLinksAPIClient is a client that implements the ListAttachedLinks operation.

type ListAttachedLinksInput

type ListAttachedLinksInput struct {

	// The ARN of the sink that you want to retrieve links for.
	//
	// This member is required.
	SinkIdentifier *string

	// Limits the number of returned links to the specified number.
	MaxResults *int32

	// The token for the next set of items to return. You received this token from a
	// previous call.
	NextToken *string
	// contains filtered or unexported fields
}

type ListAttachedLinksOutput

type ListAttachedLinksOutput struct {

	// An array of structures that contain the information about the attached links.
	//
	// This member is required.
	Items []types.ListAttachedLinksItem

	// The token to use when requesting the next set of links.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListAttachedLinksPaginator

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

ListAttachedLinksPaginator is a paginator for ListAttachedLinks

func NewListAttachedLinksPaginator

func NewListAttachedLinksPaginator(client ListAttachedLinksAPIClient, params *ListAttachedLinksInput, optFns ...func(*ListAttachedLinksPaginatorOptions)) *ListAttachedLinksPaginator

NewListAttachedLinksPaginator returns a new ListAttachedLinksPaginator

func (*ListAttachedLinksPaginator) HasMorePages

func (p *ListAttachedLinksPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListAttachedLinksPaginator) NextPage

func (p *ListAttachedLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAttachedLinksOutput, error)

NextPage retrieves the next ListAttachedLinks page.

type ListAttachedLinksPaginatorOptions

type ListAttachedLinksPaginatorOptions struct {
	// Limits the number of returned links to the specified number.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListAttachedLinksPaginatorOptions is the paginator options for ListAttachedLinks

type ListLinksAPIClient

type ListLinksAPIClient interface {
	ListLinks(context.Context, *ListLinksInput, ...func(*Options)) (*ListLinksOutput, error)
}

ListLinksAPIClient is a client that implements the ListLinks operation.

type ListLinksInput

type ListLinksInput struct {

	// Limits the number of returned links to the specified number.
	MaxResults *int32

	// The token for the next set of items to return. You received this token from a
	// previous call.
	NextToken *string
	// contains filtered or unexported fields
}

type ListLinksOutput

type ListLinksOutput struct {

	// An array of structures that contain the information about the returned links.
	//
	// This member is required.
	Items []types.ListLinksItem

	// The token to use when requesting the next set of links.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListLinksPaginator

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

ListLinksPaginator is a paginator for ListLinks

func NewListLinksPaginator

func NewListLinksPaginator(client ListLinksAPIClient, params *ListLinksInput, optFns ...func(*ListLinksPaginatorOptions)) *ListLinksPaginator

NewListLinksPaginator returns a new ListLinksPaginator

func (*ListLinksPaginator) HasMorePages

func (p *ListLinksPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListLinksPaginator) NextPage

func (p *ListLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLinksOutput, error)

NextPage retrieves the next ListLinks page.

type ListLinksPaginatorOptions

type ListLinksPaginatorOptions struct {
	// Limits the number of returned links to the specified number.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListLinksPaginatorOptions is the paginator options for ListLinks

type ListSinksAPIClient

type ListSinksAPIClient interface {
	ListSinks(context.Context, *ListSinksInput, ...func(*Options)) (*ListSinksOutput, error)
}

ListSinksAPIClient is a client that implements the ListSinks operation.

type ListSinksInput

type ListSinksInput struct {

	// Limits the number of returned links to the specified number.
	MaxResults *int32

	// The token for the next set of items to return. You received this token from a
	// previous call.
	NextToken *string
	// contains filtered or unexported fields
}

type ListSinksOutput

type ListSinksOutput struct {

	// An array of structures that contain the information about the returned sinks.
	//
	// This member is required.
	Items []types.ListSinksItem

	// The token to use when requesting the next set of sinks.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListSinksPaginator

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

ListSinksPaginator is a paginator for ListSinks

func NewListSinksPaginator

func NewListSinksPaginator(client ListSinksAPIClient, params *ListSinksInput, optFns ...func(*ListSinksPaginatorOptions)) *ListSinksPaginator

NewListSinksPaginator returns a new ListSinksPaginator

func (*ListSinksPaginator) HasMorePages

func (p *ListSinksPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListSinksPaginator) NextPage

func (p *ListSinksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSinksOutput, error)

NextPage retrieves the next ListSinks page.

type ListSinksPaginatorOptions

type ListSinksPaginatorOptions struct {
	// Limits the number of returned links to the specified number.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListSinksPaginatorOptions is the paginator options for ListSinks

type ListTagsForResourceInput

type ListTagsForResourceInput struct {

	// The ARN of the resource that you want to view tags for.
	//
	// The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id
	//
	// The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id
	//
	// For more information about ARN format, see [CloudWatch Logs resources and operations].
	//
	// Unlike tagging permissions in other Amazon Web Services services, to retrieve
	// the list of tags for links or sinks you must have the oam:RequestTag
	// permission. The aws:ReguestTag permission does not allow you to tag and untag
	// links and sinks.
	//
	// [CloudWatch Logs resources and operations]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
	//
	// This member is required.
	ResourceArn *string
	// contains filtered or unexported fields
}

type ListTagsForResourceOutput

type ListTagsForResourceOutput struct {

	// The list of tags associated with the requested resource.>
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

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 optional application specific identifier appended to the User-Agent header.
	AppID string

	// This endpoint will be given as input to an EndpointResolverV2. It is used for
	// providing a custom base endpoint that is subject to modifications by the
	// processing EndpointResolverV2.
	BaseEndpoint *string

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

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

	// The configuration DefaultsMode that the SDK should use when constructing the
	// clients initial default settings.
	DefaultsMode aws.DefaultsMode

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

	// The service endpoint resolver.
	//
	// Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
	// value for this field will likely prevent you from using any endpoint-related
	// service features released after the introduction of EndpointResolverV2 and
	// BaseEndpoint.
	//
	// To migrate an EndpointResolver implementation that uses a custom endpoint, set
	// the client option BaseEndpoint instead.
	EndpointResolver EndpointResolver

	// Resolves the endpoint used for a particular service operation. This should be
	// used over the deprecated EndpointResolver.
	EndpointResolverV2 EndpointResolverV2

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The client meter provider.
	MeterProvider metrics.MeterProvider

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

	// RetryMaxAttempts specifies the maximum number attempts an API client will call
	// an operation that fails with a retryable error. A value of 0 is ignored, and
	// will not be used to configure the API client created default retryer, or modify
	// per operation call's retry max attempts.
	//
	// If specified in an operation call's functional options with a value that is
	// different than the constructed client's Options, the Client's Retryer will be
	// wrapped to use the operation's specific RetryMaxAttempts value.
	RetryMaxAttempts int

	// RetryMode specifies the retry mode the API client will be created with, if
	// Retryer option is not also specified.
	//
	// When creating a new API Clients this member will only be used if the Retryer
	// Options member is nil. This value will be ignored if Retryer is not nil.
	//
	// Currently does not support per operation call overrides, may in the future.
	RetryMode aws.RetryMode

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer. The kind of
	// default retry created by the API client can be changed with the RetryMode
	// option.
	Retryer aws.Retryer

	// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
	// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
	// should not populate this structure programmatically, or rely on the values here
	// within your applications.
	RuntimeEnvironment aws.RuntimeEnvironment

	// The client tracer provider.
	TracerProvider tracing.TracerProvider

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

	// The auth scheme resolver which determines how to authenticate for each
	// operation.
	AuthSchemeResolver AuthSchemeResolver

	// The list of auth schemes supported by the client.
	AuthSchemes []smithyhttp.AuthScheme
	// contains filtered or unexported fields
}

func (Options) Copy

func (o Options) Copy() Options

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

func (Options) GetIdentityResolver added in v1.6.2

func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver

type PutSinkPolicyInput

type PutSinkPolicyInput struct {

	// The JSON policy to use. If you are updating an existing policy, the entire
	// existing policy is replaced by what you specify here.
	//
	// The policy must be in JSON string format with quotation marks escaped and no
	// newlines.
	//
	// For examples of different types of policies, see the Examples section on this
	// page.
	//
	// This member is required.
	Policy *string

	// The ARN of the sink to attach this policy to.
	//
	// This member is required.
	SinkIdentifier *string
	// contains filtered or unexported fields
}

type PutSinkPolicyOutput

type PutSinkPolicyOutput struct {

	// The policy that you specified.
	Policy *string

	// The ARN of the sink.
	SinkArn *string

	// The random ID string that Amazon Web Services generated as part of the sink ARN.
	SinkId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type TagResourceInput

type TagResourceInput struct {

	// The ARN of the resource that you're adding tags to.
	//
	// The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id
	//
	// The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id
	//
	// For more information about ARN format, see [CloudWatch Logs resources and operations].
	//
	// [CloudWatch Logs resources and operations]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
	//
	// This member is required.
	ResourceArn *string

	// The list of key-value pairs to associate with the resource.
	//
	// This member is required.
	Tags map[string]string
	// contains filtered or unexported fields
}

type TagResourceOutput

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UntagResourceInput

type UntagResourceInput struct {

	// The ARN of the resource that you're removing tags from.
	//
	// The ARN format of a sink is arn:aws:oam:Region:account-id:sink/sink-id
	//
	// The ARN format of a link is arn:aws:oam:Region:account-id:link/link-id
	//
	// For more information about ARN format, see [CloudWatch Logs resources and operations].
	//
	// [CloudWatch Logs resources and operations]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
	//
	// This member is required.
	ResourceArn *string

	// The list of tag keys to remove from the resource.
	//
	// This member is required.
	TagKeys []string
	// contains filtered or unexported fields
}

type UntagResourceOutput

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UpdateLinkInput

type UpdateLinkInput struct {

	// The ARN of the link that you want to update.
	//
	// This member is required.
	Identifier *string

	// An array of strings that define which types of data that the source account
	// will send to the monitoring account.
	//
	// Your input here replaces the current set of data types that are shared.
	//
	// This member is required.
	ResourceTypes []types.ResourceType

	// Use this structure to filter which metric namespaces and which log groups are
	// to be shared from the source account to the monitoring account.
	LinkConfiguration *types.LinkConfiguration
	// contains filtered or unexported fields
}

type UpdateLinkOutput

type UpdateLinkOutput struct {

	// The ARN of the link that you have updated.
	Arn *string

	// The random ID string that Amazon Web Services generated as part of the sink ARN.
	Id *string

	// The label assigned to this link, with the variables resolved to their actual
	// values.
	Label *string

	// The exact label template that was specified when the link was created, with the
	// template variables not resolved.
	LabelTemplate *string

	// This structure includes filters that specify which metric namespaces and which
	// log groups are shared from the source account to the monitoring account.
	LinkConfiguration *types.LinkConfiguration

	// The resource types now supported by this link.
	ResourceTypes []string

	// The ARN of the sink that is used for this link.
	SinkArn *string

	// The tags assigned to the link.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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