Documentation
¶
Overview ¶
Package synthetics provides the API client, operations, and parameter types for Synthetics.
Amazon CloudWatch Synthetics You can use Amazon CloudWatch Synthetics to continually monitor your services. You can create and manage canaries, which are modular, lightweight scripts that monitor your endpoints and APIs from the outside-in. You can set up your canaries to run 24 hours a day, once per minute. The canaries help you check the availability and latency of your web services and troubleshoot anomalies by investigating load time data, screenshots of the UI, logs, and metrics. The canaries seamlessly integrate with CloudWatch ServiceLens to help you trace the causes of impacted nodes in your applications. For more information, see Using ServiceLens to Monitor the Health of Your Applications (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ServiceLens.html) in the Amazon CloudWatch User Guide. Before you create and manage canaries, be aware of the security considerations. For more information, see Security Considerations for Synthetics Canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html).
Index ¶
- Constants
- func NewDefaultEndpointResolver() *internalendpoints.Resolver
- func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
- func WithEndpointResolver(v EndpointResolver) func(*Options)
- type Client
- func (c *Client) CreateCanary(ctx context.Context, params *CreateCanaryInput, optFns ...func(*Options)) (*CreateCanaryOutput, error)
- func (c *Client) DeleteCanary(ctx context.Context, params *DeleteCanaryInput, optFns ...func(*Options)) (*DeleteCanaryOutput, error)
- func (c *Client) DescribeCanaries(ctx context.Context, params *DescribeCanariesInput, optFns ...func(*Options)) (*DescribeCanariesOutput, error)
- func (c *Client) DescribeCanariesLastRun(ctx context.Context, params *DescribeCanariesLastRunInput, ...) (*DescribeCanariesLastRunOutput, error)
- func (c *Client) DescribeRuntimeVersions(ctx context.Context, params *DescribeRuntimeVersionsInput, ...) (*DescribeRuntimeVersionsOutput, error)
- func (c *Client) GetCanary(ctx context.Context, params *GetCanaryInput, optFns ...func(*Options)) (*GetCanaryOutput, error)
- func (c *Client) GetCanaryRuns(ctx context.Context, params *GetCanaryRunsInput, optFns ...func(*Options)) (*GetCanaryRunsOutput, error)
- func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, ...) (*ListTagsForResourceOutput, error)
- func (c *Client) StartCanary(ctx context.Context, params *StartCanaryInput, optFns ...func(*Options)) (*StartCanaryOutput, error)
- func (c *Client) StopCanary(ctx context.Context, params *StopCanaryInput, optFns ...func(*Options)) (*StopCanaryOutput, error)
- func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)
- func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)
- func (c *Client) UpdateCanary(ctx context.Context, params *UpdateCanaryInput, optFns ...func(*Options)) (*UpdateCanaryOutput, error)
- type CreateCanaryInput
- type CreateCanaryOutput
- type DeleteCanaryInput
- type DeleteCanaryOutput
- type DescribeCanariesAPIClient
- type DescribeCanariesInput
- type DescribeCanariesLastRunAPIClient
- type DescribeCanariesLastRunInput
- type DescribeCanariesLastRunOutput
- type DescribeCanariesLastRunPaginator
- type DescribeCanariesLastRunPaginatorOptions
- type DescribeCanariesOutput
- type DescribeCanariesPaginator
- type DescribeCanariesPaginatorOptions
- type DescribeRuntimeVersionsAPIClient
- type DescribeRuntimeVersionsInput
- type DescribeRuntimeVersionsOutput
- type DescribeRuntimeVersionsPaginator
- type DescribeRuntimeVersionsPaginatorOptions
- type EndpointResolver
- type EndpointResolverFunc
- type EndpointResolverOptions
- type GetCanaryInput
- type GetCanaryOutput
- type GetCanaryRunsAPIClient
- type GetCanaryRunsInput
- type GetCanaryRunsOutput
- type GetCanaryRunsPaginator
- type GetCanaryRunsPaginatorOptions
- type HTTPClient
- type HTTPSignerV4
- type ListTagsForResourceInput
- type ListTagsForResourceOutput
- type Options
- type ResolveEndpoint
- type StartCanaryInput
- type StartCanaryOutput
- type StopCanaryInput
- type StopCanaryOutput
- type TagResourceInput
- type TagResourceOutput
- type UntagResourceInput
- type UntagResourceOutput
- type UpdateCanaryInput
- type UpdateCanaryOutput
Constants ¶
const ServiceAPIVersion = "2017-10-11"
const ServiceID = "synthetics"
Variables ¶
This section is empty.
Functions ¶
func NewDefaultEndpointResolver ¶
func NewDefaultEndpointResolver() *internalendpoints.Resolver
NewDefaultEndpointResolver constructs a new service endpoint resolver
func WithAPIOptions ¶ added in v1.0.0
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
WithAPIOptions returns a functional option for setting the Client's APIOptions option.
func WithEndpointResolver ¶
func WithEndpointResolver(v EndpointResolver) func(*Options)
WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the API client to make operations call for Synthetics.
func New ¶
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 ¶
NewFromConfig returns a new client from the provided config.
func (*Client) CreateCanary ¶
func (c *Client) CreateCanary(ctx context.Context, params *CreateCanaryInput, optFns ...func(*Options)) (*CreateCanaryOutput, error)
Creates a canary. Canaries are scripts that monitor your endpoints and APIs from the outside-in. Canaries help you check the availability and latency of your web services and troubleshoot anomalies by investigating load time data, screenshots of the UI, logs, and metrics. You can set up a canary to run continuously or just once. Do not use CreateCanary to modify an existing canary. Use UpdateCanary (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_UpdateCanary.html) instead. To create canaries, you must have the CloudWatchSyntheticsFullAccess policy. If you are creating a new IAM role for the canary, you also need the the iam:CreateRole, iam:CreatePolicy and iam:AttachRolePolicy permissions. For more information, see Necessary Roles and Permissions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Roles). Do not include secrets or proprietary information in your canary names. The canary name makes up part of the Amazon Resource Name (ARN) for the canary, and the ARN is included in outbound calls over the internet. For more information, see Security Considerations for Synthetics Canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html).
func (*Client) DeleteCanary ¶
func (c *Client) DeleteCanary(ctx context.Context, params *DeleteCanaryInput, optFns ...func(*Options)) (*DeleteCanaryOutput, error)
Permanently deletes the specified canary. When you delete a canary, resources used and created by the canary are not automatically deleted. After you delete a canary that you do not intend to use again, you should also delete the following:
* The Lambda functions and layers used by this canary. These have the prefix cwsyn-MyCanaryName .
* The CloudWatch alarms created for this canary. These alarms have a name of Synthetics-SharpDrop-Alarm-MyCanaryName .
* Amazon S3 objects and buckets, such as the canary's artifact location.
* IAM roles created for the canary. If they were created in the console, these roles have the name role/service-role/CloudWatchSyntheticsRole-MyCanaryName .
* CloudWatch Logs log groups created for the canary. These logs groups have the name /aws/lambda/cwsyn-MyCanaryName .
Before you delete a canary, you might want to use GetCanary to display the information about this canary. Make note of the information returned by this operation so that you can delete these resources after you delete the canary.
func (*Client) DescribeCanaries ¶
func (c *Client) DescribeCanaries(ctx context.Context, params *DescribeCanariesInput, optFns ...func(*Options)) (*DescribeCanariesOutput, error)
This operation returns a list of the canaries in your account, along with full details about each canary. This operation does not have resource-level authorization, so if a user is able to use DescribeCanaries, the user can see all of the canaries in the account. A deny policy can only be used to restrict access to all canaries. It cannot be used on specific resources.
func (*Client) DescribeCanariesLastRun ¶
func (c *Client) DescribeCanariesLastRun(ctx context.Context, params *DescribeCanariesLastRunInput, optFns ...func(*Options)) (*DescribeCanariesLastRunOutput, error)
Use this operation to see information from the most recent run of each canary that you have created.
func (*Client) DescribeRuntimeVersions ¶
func (c *Client) DescribeRuntimeVersions(ctx context.Context, params *DescribeRuntimeVersionsInput, optFns ...func(*Options)) (*DescribeRuntimeVersionsOutput, error)
Returns a list of Synthetics canary runtime versions. For more information, see Canary Runtime Versions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html).
func (*Client) GetCanary ¶
func (c *Client) GetCanary(ctx context.Context, params *GetCanaryInput, optFns ...func(*Options)) (*GetCanaryOutput, error)
Retrieves complete information about one canary. You must specify the name of the canary that you want. To get a list of canaries and their names, use DescribeCanaries (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html).
func (*Client) GetCanaryRuns ¶
func (c *Client) GetCanaryRuns(ctx context.Context, params *GetCanaryRunsInput, optFns ...func(*Options)) (*GetCanaryRunsOutput, error)
Retrieves a list of runs for a specified canary.
func (*Client) ListTagsForResource ¶
func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)
Displays the tags associated with a canary.
func (*Client) StartCanary ¶
func (c *Client) StartCanary(ctx context.Context, params *StartCanaryInput, optFns ...func(*Options)) (*StartCanaryOutput, error)
Use this operation to run a canary that has already been created. The frequency of the canary runs is determined by the value of the canary's Schedule. To see a canary's schedule, use GetCanary (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanary.html).
func (*Client) StopCanary ¶
func (c *Client) StopCanary(ctx context.Context, params *StopCanaryInput, optFns ...func(*Options)) (*StopCanaryOutput, error)
Stops the canary to prevent all future runs. If the canary is currently running, Synthetics stops waiting for the current run of the specified canary to complete. The run that is in progress completes on its own, publishes metrics, and uploads artifacts, but it is not recorded in Synthetics as a completed run. You can use StartCanary to start it running again with the canary’s current schedule at any point in the future.
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 canary. 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 canary 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 canary.
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 canary.
func (*Client) UpdateCanary ¶
func (c *Client) UpdateCanary(ctx context.Context, params *UpdateCanaryInput, optFns ...func(*Options)) (*UpdateCanaryOutput, error)
Use this operation to change the settings of a canary that has already been created. You can't use this operation to update the tags of an existing canary. To change the tags of an existing canary, use TagResource (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_TagResource.html).
type CreateCanaryInput ¶
type CreateCanaryInput struct { // The location in Amazon S3 where Synthetics stores artifacts from the test runs // of this canary. Artifacts include the log file, screenshots, and HAR files. The // name of the S3 bucket can't include a period (.). // // This member is required. ArtifactS3Location *string // A structure that includes the entry point from which the canary should start // running your script. If the script is stored in an S3 bucket, the bucket name, // key, and version are also included. // // This member is required. Code *types.CanaryCodeInput // The ARN of the IAM role to be used to run the canary. This role must already // exist, and must include lambda.amazonaws.com as a principal in the trust policy. // The role must also have the following permissions: // // * s3:PutObject // // * // s3:GetBucketLocation // // * s3:ListAllMyBuckets // // * cloudwatch:PutMetricData // // * // logs:CreateLogGroup // // * logs:CreateLogStream // // * logs:PutLogEvents // // This member is required. ExecutionRoleArn *string // The name for this canary. Be sure to give it a descriptive name that // distinguishes it from other canaries in your account. Do not include secrets or // proprietary information in your canary names. The canary name makes up part of // the canary ARN, and the ARN is included in outbound calls over the internet. For // more information, see Security Considerations for Synthetics Canaries // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html). // // This member is required. Name *string // Specifies the runtime version to use for the canary. For a list of valid runtime // versions and more information about runtime versions, see Canary Runtime // Versions // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). // // This member is required. RuntimeVersion *string // A structure that contains information about how often the canary is to run and // when these test runs are to stop. // // This member is required. Schedule *types.CanaryScheduleInput // A structure that contains the configuration for canary artifacts, including the // encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. ArtifactConfig *types.ArtifactConfigInput // The number of days to retain data about failed runs of this canary. If you omit // this field, the default of 31 days is used. The valid range is 1 to 455 days. FailureRetentionPeriodInDays *int32 // A structure that contains the configuration for individual canary runs, such as // timeout value. RunConfig *types.CanaryRunConfigInput // The number of days to retain data about successful runs of this canary. If you // omit this field, the default of 31 days is used. The valid range is 1 to 455 // days. SuccessRetentionPeriodInDays *int32 // A list of key-value pairs to associate with the canary. You can associate as // many as 50 tags with a canary. 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 the resources that have certain tag values. Tags map[string]string // If this canary is to test an endpoint in a VPC, this structure contains // information about the subnet and security groups of the VPC endpoint. For more // information, see Running a Canary in a VPC // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). VpcConfig *types.VpcConfigInput // contains filtered or unexported fields }
type CreateCanaryOutput ¶
type CreateCanaryOutput struct { // The full details about the canary you have created. Canary *types.Canary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DeleteCanaryInput ¶
type DeleteCanaryInput struct { // The name of the canary that you want to delete. To find the names of your // canaries, use DescribeCanaries // (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). // // This member is required. Name *string // contains filtered or unexported fields }
type DeleteCanaryOutput ¶
type DeleteCanaryOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DescribeCanariesAPIClient ¶ added in v0.30.0
type DescribeCanariesAPIClient interface {
DescribeCanaries(context.Context, *DescribeCanariesInput, ...func(*Options)) (*DescribeCanariesOutput, error)
}
DescribeCanariesAPIClient is a client that implements the DescribeCanaries operation.
type DescribeCanariesInput ¶
type DescribeCanariesInput struct { // Specify this parameter to limit how many canaries are returned each time you use // the DescribeCanaries operation. If you omit this parameter, the default of 100 // is used. MaxResults *int32 // A token that indicates that there is more data available. You can use this token // in a subsequent operation to retrieve the next set of results. NextToken *string // contains filtered or unexported fields }
type DescribeCanariesLastRunAPIClient ¶ added in v0.30.0
type DescribeCanariesLastRunAPIClient interface {
DescribeCanariesLastRun(context.Context, *DescribeCanariesLastRunInput, ...func(*Options)) (*DescribeCanariesLastRunOutput, error)
}
DescribeCanariesLastRunAPIClient is a client that implements the DescribeCanariesLastRun operation.
type DescribeCanariesLastRunInput ¶
type DescribeCanariesLastRunInput struct { // Specify this parameter to limit how many runs are returned each time you use the // DescribeLastRun operation. If you omit this parameter, the default of 100 is // used. MaxResults *int32 // A token that indicates that there is more data available. You can use this token // in a subsequent DescribeCanaries operation to retrieve the next set of results. NextToken *string // contains filtered or unexported fields }
type DescribeCanariesLastRunOutput ¶
type DescribeCanariesLastRunOutput struct { // An array that contains the information from the most recent run of each canary. CanariesLastRun []types.CanaryLastRun // A token that indicates that there is more data available. You can use this token // in a subsequent DescribeCanariesLastRun operation to retrieve the next set of // results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DescribeCanariesLastRunPaginator ¶ added in v0.30.0
type DescribeCanariesLastRunPaginator struct {
// contains filtered or unexported fields
}
DescribeCanariesLastRunPaginator is a paginator for DescribeCanariesLastRun
func NewDescribeCanariesLastRunPaginator ¶ added in v0.30.0
func NewDescribeCanariesLastRunPaginator(client DescribeCanariesLastRunAPIClient, params *DescribeCanariesLastRunInput, optFns ...func(*DescribeCanariesLastRunPaginatorOptions)) *DescribeCanariesLastRunPaginator
NewDescribeCanariesLastRunPaginator returns a new DescribeCanariesLastRunPaginator
func (*DescribeCanariesLastRunPaginator) HasMorePages ¶ added in v0.30.0
func (p *DescribeCanariesLastRunPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*DescribeCanariesLastRunPaginator) NextPage ¶ added in v0.30.0
func (p *DescribeCanariesLastRunPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCanariesLastRunOutput, error)
NextPage retrieves the next DescribeCanariesLastRun page.
type DescribeCanariesLastRunPaginatorOptions ¶ added in v0.30.0
type DescribeCanariesLastRunPaginatorOptions struct { // Specify this parameter to limit how many runs are returned each time you use the // DescribeLastRun operation. If you omit this parameter, the default of 100 is // used. 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 }
DescribeCanariesLastRunPaginatorOptions is the paginator options for DescribeCanariesLastRun
type DescribeCanariesOutput ¶
type DescribeCanariesOutput struct { // Returns an array. Each item in the array contains the full information about one // canary. Canaries []types.Canary // A token that indicates that there is more data available. You can use this token // in a subsequent DescribeCanaries operation to retrieve the next set of results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DescribeCanariesPaginator ¶ added in v0.30.0
type DescribeCanariesPaginator struct {
// contains filtered or unexported fields
}
DescribeCanariesPaginator is a paginator for DescribeCanaries
func NewDescribeCanariesPaginator ¶ added in v0.30.0
func NewDescribeCanariesPaginator(client DescribeCanariesAPIClient, params *DescribeCanariesInput, optFns ...func(*DescribeCanariesPaginatorOptions)) *DescribeCanariesPaginator
NewDescribeCanariesPaginator returns a new DescribeCanariesPaginator
func (*DescribeCanariesPaginator) HasMorePages ¶ added in v0.30.0
func (p *DescribeCanariesPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*DescribeCanariesPaginator) NextPage ¶ added in v0.30.0
func (p *DescribeCanariesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCanariesOutput, error)
NextPage retrieves the next DescribeCanaries page.
type DescribeCanariesPaginatorOptions ¶ added in v0.30.0
type DescribeCanariesPaginatorOptions struct { // Specify this parameter to limit how many canaries are returned each time you use // the DescribeCanaries operation. If you omit this parameter, the default of 100 // is used. 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 }
DescribeCanariesPaginatorOptions is the paginator options for DescribeCanaries
type DescribeRuntimeVersionsAPIClient ¶ added in v0.30.0
type DescribeRuntimeVersionsAPIClient interface {
DescribeRuntimeVersions(context.Context, *DescribeRuntimeVersionsInput, ...func(*Options)) (*DescribeRuntimeVersionsOutput, error)
}
DescribeRuntimeVersionsAPIClient is a client that implements the DescribeRuntimeVersions operation.
type DescribeRuntimeVersionsInput ¶
type DescribeRuntimeVersionsInput struct { // Specify this parameter to limit how many runs are returned each time you use the // DescribeRuntimeVersions operation. If you omit this parameter, the default of // 100 is used. MaxResults *int32 // A token that indicates that there is more data available. You can use this token // in a subsequent DescribeRuntimeVersions operation to retrieve the next set of // results. NextToken *string // contains filtered or unexported fields }
type DescribeRuntimeVersionsOutput ¶
type DescribeRuntimeVersionsOutput struct { // A token that indicates that there is more data available. You can use this token // in a subsequent DescribeRuntimeVersions operation to retrieve the next set of // results. NextToken *string // An array of objects that display the details about each Synthetics canary // runtime version. RuntimeVersions []types.RuntimeVersion // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DescribeRuntimeVersionsPaginator ¶ added in v0.30.0
type DescribeRuntimeVersionsPaginator struct {
// contains filtered or unexported fields
}
DescribeRuntimeVersionsPaginator is a paginator for DescribeRuntimeVersions
func NewDescribeRuntimeVersionsPaginator ¶ added in v0.30.0
func NewDescribeRuntimeVersionsPaginator(client DescribeRuntimeVersionsAPIClient, params *DescribeRuntimeVersionsInput, optFns ...func(*DescribeRuntimeVersionsPaginatorOptions)) *DescribeRuntimeVersionsPaginator
NewDescribeRuntimeVersionsPaginator returns a new DescribeRuntimeVersionsPaginator
func (*DescribeRuntimeVersionsPaginator) HasMorePages ¶ added in v0.30.0
func (p *DescribeRuntimeVersionsPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*DescribeRuntimeVersionsPaginator) NextPage ¶ added in v0.30.0
func (p *DescribeRuntimeVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeRuntimeVersionsOutput, error)
NextPage retrieves the next DescribeRuntimeVersions page.
type DescribeRuntimeVersionsPaginatorOptions ¶ added in v0.30.0
type DescribeRuntimeVersionsPaginatorOptions struct { // Specify this parameter to limit how many runs are returned each time you use the // DescribeRuntimeVersions operation. If you omit this parameter, the default of // 100 is used. 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 }
DescribeRuntimeVersionsPaginatorOptions is the paginator options for DescribeRuntimeVersions
type EndpointResolver ¶
type EndpointResolver interface {
ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}
EndpointResolver interface for resolving service endpoints.
func EndpointResolverFromURL ¶ added in v1.1.0
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 ¶ added in v0.29.0
type EndpointResolverOptions = internalendpoints.Options
EndpointResolverOptions is the service endpoint resolver options
type GetCanaryInput ¶
type GetCanaryInput struct { // The name of the canary that you want details for. // // This member is required. Name *string // contains filtered or unexported fields }
type GetCanaryOutput ¶
type GetCanaryOutput struct { // A strucure that contains the full information about the canary. Canary *types.Canary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type GetCanaryRunsAPIClient ¶ added in v0.30.0
type GetCanaryRunsAPIClient interface {
GetCanaryRuns(context.Context, *GetCanaryRunsInput, ...func(*Options)) (*GetCanaryRunsOutput, error)
}
GetCanaryRunsAPIClient is a client that implements the GetCanaryRuns operation.
type GetCanaryRunsInput ¶
type GetCanaryRunsInput struct { // The name of the canary that you want to see runs for. // // This member is required. Name *string // Specify this parameter to limit how many runs are returned each time you use the // GetCanaryRuns operation. If you omit this parameter, the default of 100 is used. MaxResults *int32 // A token that indicates that there is more data available. You can use this token // in a subsequent GetCanaryRuns operation to retrieve the next set of results. NextToken *string // contains filtered or unexported fields }
type GetCanaryRunsOutput ¶
type GetCanaryRunsOutput struct { // An array of structures. Each structure contains the details of one of the // retrieved canary runs. CanaryRuns []types.CanaryRun // A token that indicates that there is more data available. You can use this token // in a subsequent GetCanaryRuns operation to retrieve the next set of results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type GetCanaryRunsPaginator ¶ added in v0.30.0
type GetCanaryRunsPaginator struct {
// contains filtered or unexported fields
}
GetCanaryRunsPaginator is a paginator for GetCanaryRuns
func NewGetCanaryRunsPaginator ¶ added in v0.30.0
func NewGetCanaryRunsPaginator(client GetCanaryRunsAPIClient, params *GetCanaryRunsInput, optFns ...func(*GetCanaryRunsPaginatorOptions)) *GetCanaryRunsPaginator
NewGetCanaryRunsPaginator returns a new GetCanaryRunsPaginator
func (*GetCanaryRunsPaginator) HasMorePages ¶ added in v0.30.0
func (p *GetCanaryRunsPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*GetCanaryRunsPaginator) NextPage ¶ added in v0.30.0
func (p *GetCanaryRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetCanaryRunsOutput, error)
NextPage retrieves the next GetCanaryRuns page.
type GetCanaryRunsPaginatorOptions ¶ added in v0.30.0
type GetCanaryRunsPaginatorOptions struct { // Specify this parameter to limit how many runs are returned each time you use the // GetCanaryRuns operation. If you omit this parameter, the default of 100 is used. 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 }
GetCanaryRunsPaginatorOptions is the paginator options for GetCanaryRuns
type HTTPSignerV4 ¶
type ListTagsForResourceInput ¶
type ListTagsForResourceInput struct { // The ARN of the canary that you want to view tags for. The ARN format of a canary // is arn:aws:synthetics:Region:account-id:canary:canary-name . // // This member is required. ResourceArn *string // contains filtered or unexported fields }
type ListTagsForResourceOutput ¶
type ListTagsForResourceOutput struct { // The list of tag keys and values associated with the canary that you specified. 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 // 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. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // 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 aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to AutoDefaultsMode 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 HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient // contains filtered or unexported fields }
type ResolveEndpoint ¶
type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions }
func (*ResolveEndpoint) HandleSerialize ¶
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
func (*ResolveEndpoint) ID ¶
func (*ResolveEndpoint) ID() string
type StartCanaryInput ¶
type StartCanaryInput struct { // The name of the canary that you want to run. To find canary names, use // DescribeCanaries // (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). // // This member is required. Name *string // contains filtered or unexported fields }
type StartCanaryOutput ¶
type StartCanaryOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type StopCanaryInput ¶
type StopCanaryInput struct { // The name of the canary that you want to stop. To find the names of your // canaries, use DescribeCanaries // (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). // // This member is required. Name *string // contains filtered or unexported fields }
type StopCanaryOutput ¶
type StopCanaryOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type TagResourceInput ¶
type TagResourceInput struct { // The ARN of the canary that you're adding tags to. The ARN format of a canary is // arn:aws:synthetics:Region:account-id:canary:canary-name . // // This member is required. ResourceArn *string // The list of key-value pairs to associate with the canary. // // 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 canary that you're removing tags from. The ARN format of a canary // is arn:aws:synthetics:Region:account-id:canary:canary-name . // // 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 UpdateCanaryInput ¶
type UpdateCanaryInput struct { // The name of the canary that you want to update. To find the names of your // canaries, use DescribeCanaries // (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). // You cannot change the name of a canary that has already been created. // // This member is required. Name *string // A structure that contains the configuration for canary artifacts, including the // encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. ArtifactConfig *types.ArtifactConfigInput // The location in Amazon S3 where Synthetics stores artifacts from the test runs // of this canary. Artifacts include the log file, screenshots, and HAR files. The // name of the S3 bucket can't include a period (.). ArtifactS3Location *string // A structure that includes the entry point from which the canary should start // running your script. If the script is stored in an S3 bucket, the bucket name, // key, and version are also included. Code *types.CanaryCodeInput // The ARN of the IAM role to be used to run the canary. This role must already // exist, and must include lambda.amazonaws.com as a principal in the trust policy. // The role must also have the following permissions: // // * s3:PutObject // // * // s3:GetBucketLocation // // * s3:ListAllMyBuckets // // * cloudwatch:PutMetricData // // * // logs:CreateLogGroup // // * logs:CreateLogStream // // * logs:CreateLogStream ExecutionRoleArn *string // The number of days to retain data about failed runs of this canary. FailureRetentionPeriodInDays *int32 // A structure that contains the timeout value that is used for each individual run // of the canary. RunConfig *types.CanaryRunConfigInput // Specifies the runtime version to use for the canary. For a list of valid runtime // versions and for more information about runtime versions, see Canary Runtime // Versions // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). RuntimeVersion *string // A structure that contains information about how often the canary is to run, and // when these runs are to stop. Schedule *types.CanaryScheduleInput // The number of days to retain data about successful runs of this canary. SuccessRetentionPeriodInDays *int32 // Defines the screenshots to use as the baseline for comparisons during visual // monitoring comparisons during future runs of this canary. If you omit this // parameter, no changes are made to any baseline screenshots that the canary might // be using already. Visual monitoring is supported only on canaries running the // syn-puppeteer-node-3.2 runtime or later. For more information, see Visual // monitoring // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html) // and Visual monitoring blueprint // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html) VisualReference *types.VisualReferenceInput // If this canary is to test an endpoint in a VPC, this structure contains // information about the subnet and security groups of the VPC endpoint. For more // information, see Running a Canary in a VPC // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). VpcConfig *types.VpcConfigInput // contains filtered or unexported fields }
type UpdateCanaryOutput ¶
type UpdateCanaryOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
Source Files
¶
- api_client.go
- api_op_CreateCanary.go
- api_op_DeleteCanary.go
- api_op_DescribeCanaries.go
- api_op_DescribeCanariesLastRun.go
- api_op_DescribeRuntimeVersions.go
- api_op_GetCanary.go
- api_op_GetCanaryRuns.go
- api_op_ListTagsForResource.go
- api_op_StartCanary.go
- api_op_StopCanary.go
- api_op_TagResource.go
- api_op_UntagResource.go
- api_op_UpdateCanary.go
- deserializers.go
- doc.go
- endpoints.go
- go_module_metadata.go
- serializers.go
- validators.go