diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b735d0b19..074126d058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +Release v1.44.49 (2022-07-06) +=== + +### Service Client Updates +* `service/cloudformation`: Updates service API and documentation + * My AWS Service (placeholder) - Add a new feature Account-level Targeting for StackSet operation +* `service/synthetics`: Updates service API, documentation, and paginators + Release v1.44.48 (2022-07-05) === diff --git a/aws/version.go b/aws/version.go index 4c80047d60..afc5ddab8e 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.44.48" +const SDKVersion = "1.44.49" diff --git a/models/apis/cloudformation/2010-05-15/api-2.json b/models/apis/cloudformation/2010-05-15/api-2.json index bd1756a5cd..a82b9e5ab3 100644 --- a/models/apis/cloudformation/2010-05-15/api-2.json +++ b/models/apis/cloudformation/2010-05-15/api-2.json @@ -998,6 +998,15 @@ "type":"string", "pattern":"^[0-9]{12}$" }, + "AccountFilterType":{ + "type":"string", + "enum":[ + "NONE", + "INTERSECTION", + "DIFFERENCE", + "UNION" + ] + }, "AccountGateResult":{ "type":"structure", "members":{ @@ -1564,7 +1573,8 @@ "members":{ "Accounts":{"shape":"AccountList"}, "AccountsUrl":{"shape":"AccountsUrl"}, - "OrganizationalUnitIds":{"shape":"OrganizationalUnitIdList"} + "OrganizationalUnitIds":{"shape":"OrganizationalUnitIdList"}, + "AccountFilterType":{"shape":"AccountFilterType"} } }, "DeprecatedStatus":{ diff --git a/models/apis/cloudformation/2010-05-15/docs-2.json b/models/apis/cloudformation/2010-05-15/docs-2.json index 0b8919b6cb..7fbb24a402 100644 --- a/models/apis/cloudformation/2010-05-15/docs-2.json +++ b/models/apis/cloudformation/2010-05-15/docs-2.json @@ -87,6 +87,12 @@ "StackSetOperationResultSummary$Account": "

[Self-managed permissions] The name of the Amazon Web Services account for this operation result.

" } }, + "AccountFilterType": { + "base": null, + "refs": { + "DeploymentTargets$AccountFilterType": "

Limit deployment targets to individual accounts or include additional accounts with provided OUs.

The following is a list of possible values for the AccountFilterType operation.

" + } + }, "AccountGateResult": { "base": "

Structure that contains the results of the account gate function which CloudFormation invokes, if present, before proceeding with a stack set operation in an account and Region.

For each account and Region, CloudFormation lets you specify a Lambda function that encapsulates any requirements that must be met before CloudFormation can proceed with a stack set operation in that account and Region. CloudFormation invokes the function each time a stack set operation is requested for that account and Region; if the function returns FAILED, CloudFormation cancels the operation in that account and Region, and sets the stack set operation result status for that account and Region to FAILED.

For more information, see Configuring a target account gate.

", "refs": { diff --git a/models/apis/synthetics/2017-10-11/api-2.json b/models/apis/synthetics/2017-10-11/api-2.json index db89cbddfd..294413c2dd 100644 --- a/models/apis/synthetics/2017-10-11/api-2.json +++ b/models/apis/synthetics/2017-10-11/api-2.json @@ -13,6 +13,22 @@ "uid":"synthetics-2017-10-11" }, "operations":{ + "AssociateResource":{ + "name":"AssociateResource", + "http":{ + "method":"PATCH", + "requestUri":"/group/{groupIdentifier}/associate" + }, + "input":{"shape":"AssociateResourceRequest"}, + "output":{"shape":"AssociateResourceResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"}, + {"shape":"ServiceQuotaExceededException"} + ] + }, "CreateCanary":{ "name":"CreateCanary", "http":{ @@ -27,6 +43,21 @@ {"shape":"RequestEntityTooLargeException"} ] }, + "CreateGroup":{ + "name":"CreateGroup", + "http":{ + "method":"POST", + "requestUri":"/group" + }, + "input":{"shape":"CreateGroupRequest"}, + "output":{"shape":"CreateGroupResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ConflictException"}, + {"shape":"ServiceQuotaExceededException"} + ] + }, "DeleteCanary":{ "name":"DeleteCanary", "http":{ @@ -42,6 +73,21 @@ {"shape":"ConflictException"} ] }, + "DeleteGroup":{ + "name":"DeleteGroup", + "http":{ + "method":"DELETE", + "requestUri":"/group/{groupIdentifier}" + }, + "input":{"shape":"DeleteGroupRequest"}, + "output":{"shape":"DeleteGroupResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"} + ] + }, "DescribeCanaries":{ "name":"DescribeCanaries", "http":{ @@ -81,6 +127,21 @@ {"shape":"ValidationException"} ] }, + "DisassociateResource":{ + "name":"DisassociateResource", + "http":{ + "method":"PATCH", + "requestUri":"/group/{groupIdentifier}/disassociate" + }, + "input":{"shape":"DisassociateResourceRequest"}, + "output":{"shape":"DisassociateResourceResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"} + ] + }, "GetCanary":{ "name":"GetCanary", "http":{ @@ -108,6 +169,63 @@ {"shape":"ResourceNotFoundException"} ] }, + "GetGroup":{ + "name":"GetGroup", + "http":{ + "method":"GET", + "requestUri":"/group/{groupIdentifier}" + }, + "input":{"shape":"GetGroupRequest"}, + "output":{"shape":"GetGroupResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"} + ] + }, + "ListAssociatedGroups":{ + "name":"ListAssociatedGroups", + "http":{ + "method":"POST", + "requestUri":"/resource/{resourceArn}/groups" + }, + "input":{"shape":"ListAssociatedGroupsRequest"}, + "output":{"shape":"ListAssociatedGroupsResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "ListGroupResources":{ + "name":"ListGroupResources", + "http":{ + "method":"POST", + "requestUri":"/group/{groupIdentifier}/resources" + }, + "input":{"shape":"ListGroupResourcesRequest"}, + "output":{"shape":"ListGroupResourcesResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ConflictException"} + ] + }, + "ListGroups":{ + "name":"ListGroups", + "http":{ + "method":"POST", + "requestUri":"/groups" + }, + "input":{"shape":"ListGroupsRequest"}, + "output":{"shape":"ListGroupsResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"} + ] + }, "ListTagsForResource":{ "name":"ListTagsForResource", "http":{ @@ -117,9 +235,11 @@ "input":{"shape":"ListTagsForResourceRequest"}, "output":{"shape":"ListTagsForResourceResponse"}, "errors":[ - {"shape":"InternalServerException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"ValidationException"} + {"shape":"BadRequestException"}, + {"shape":"NotFoundException"}, + {"shape":"TooManyRequestsException"}, + {"shape":"ConflictException"}, + {"shape":"InternalFailureException"} ] }, "StartCanary":{ @@ -161,9 +281,11 @@ "input":{"shape":"TagResourceRequest"}, "output":{"shape":"TagResourceResponse"}, "errors":[ - {"shape":"InternalServerException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"ValidationException"} + {"shape":"BadRequestException"}, + {"shape":"NotFoundException"}, + {"shape":"TooManyRequestsException"}, + {"shape":"ConflictException"}, + {"shape":"InternalFailureException"} ] }, "UntagResource":{ @@ -175,9 +297,11 @@ "input":{"shape":"UntagResourceRequest"}, "output":{"shape":"UntagResourceResponse"}, "errors":[ - {"shape":"InternalServerException"}, - {"shape":"ResourceNotFoundException"}, - {"shape":"ValidationException"} + {"shape":"BadRequestException"}, + {"shape":"NotFoundException"}, + {"shape":"TooManyRequestsException"}, + {"shape":"ConflictException"}, + {"shape":"InternalFailureException"} ] }, "UpdateCanary":{ @@ -210,6 +334,34 @@ "S3Encryption":{"shape":"S3EncryptionConfig"} } }, + "AssociateResourceRequest":{ + "type":"structure", + "required":[ + "GroupIdentifier", + "ResourceArn" + ], + "members":{ + "GroupIdentifier":{ + "shape":"GroupIdentifier", + "location":"uri", + "locationName":"groupIdentifier" + }, + "ResourceArn":{"shape":"CanaryArn"} + } + }, + "AssociateResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "BadRequestException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "error":{"httpStatusCode":400}, + "exception":true + }, "BaseScreenshot":{ "type":"structure", "required":["ScreenshotName"], @@ -473,6 +625,20 @@ "Canary":{"shape":"Canary"} } }, + "CreateGroupRequest":{ + "type":"structure", + "required":["Name"], + "members":{ + "Name":{"shape":"GroupName"}, + "Tags":{"shape":"TagMap"} + } + }, + "CreateGroupResponse":{ + "type":"structure", + "members":{ + "Group":{"shape":"Group"} + } + }, "DeleteCanaryRequest":{ "type":"structure", "required":["Name"], @@ -494,6 +660,22 @@ "members":{ } }, + "DeleteGroupRequest":{ + "type":"structure", + "required":["GroupIdentifier"], + "members":{ + "GroupIdentifier":{ + "shape":"GroupIdentifier", + "location":"uri", + "locationName":"groupIdentifier" + } + } + }, + "DeleteGroupResponse":{ + "type":"structure", + "members":{ + } + }, "DescribeCanariesLastRunNameFilter":{ "type":"list", "member":{"shape":"CanaryName"}, @@ -550,6 +732,26 @@ "NextToken":{"shape":"Token"} } }, + "DisassociateResourceRequest":{ + "type":"structure", + "required":[ + "GroupIdentifier", + "ResourceArn" + ], + "members":{ + "GroupIdentifier":{ + "shape":"GroupIdentifier", + "location":"uri", + "locationName":"groupIdentifier" + }, + "ResourceArn":{"shape":"CanaryArn"} + } + }, + "DisassociateResourceResponse":{ + "type":"structure", + "members":{ + } + }, "EncryptionMode":{ "type":"string", "enum":[ @@ -611,6 +813,70 @@ "NextToken":{"shape":"Token"} } }, + "GetGroupRequest":{ + "type":"structure", + "required":["GroupIdentifier"], + "members":{ + "GroupIdentifier":{ + "shape":"GroupIdentifier", + "location":"uri", + "locationName":"groupIdentifier" + } + } + }, + "GetGroupResponse":{ + "type":"structure", + "members":{ + "Group":{"shape":"Group"} + } + }, + "Group":{ + "type":"structure", + "members":{ + "Id":{"shape":"String"}, + "Name":{"shape":"GroupName"}, + "Arn":{"shape":"GroupArn"}, + "Tags":{"shape":"TagMap"}, + "CreatedTime":{"shape":"Timestamp"}, + "LastModifiedTime":{"shape":"Timestamp"} + } + }, + "GroupArn":{ + "type":"string", + "max":128, + "min":1, + "pattern":"arn:(aws[a-zA-Z-]*)?:synthetics:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:group:[0-9a-z]+" + }, + "GroupIdentifier":{ + "type":"string", + "max":128, + "min":1 + }, + "GroupName":{ + "type":"string", + "max":64, + "min":1 + }, + "GroupSummary":{ + "type":"structure", + "members":{ + "Id":{"shape":"String"}, + "Name":{"shape":"GroupName"}, + "Arn":{"shape":"GroupArn"} + } + }, + "GroupSummaryList":{ + "type":"list", + "member":{"shape":"GroupSummary"} + }, + "InternalFailureException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "error":{"httpStatusCode":500}, + "exception":true + }, "InternalServerException":{ "type":"structure", "members":{ @@ -625,10 +891,12 @@ "min":1, "pattern":"arn:(aws[a-zA-Z-]*)?:kms:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:key/[\\w\\-\\/]+" }, - "ListTagsForResourceRequest":{ + "ListAssociatedGroupsRequest":{ "type":"structure", "required":["ResourceArn"], "members":{ + "NextToken":{"shape":"PaginationToken"}, + "MaxResults":{"shape":"MaxGroupResults"}, "ResourceArn":{ "shape":"CanaryArn", "location":"uri", @@ -636,6 +904,58 @@ } } }, + "ListAssociatedGroupsResponse":{ + "type":"structure", + "members":{ + "Groups":{"shape":"GroupSummaryList"}, + "NextToken":{"shape":"PaginationToken"} + } + }, + "ListGroupResourcesRequest":{ + "type":"structure", + "required":["GroupIdentifier"], + "members":{ + "NextToken":{"shape":"PaginationToken"}, + "MaxResults":{"shape":"MaxGroupResults"}, + "GroupIdentifier":{ + "shape":"GroupIdentifier", + "location":"uri", + "locationName":"groupIdentifier" + } + } + }, + "ListGroupResourcesResponse":{ + "type":"structure", + "members":{ + "Resources":{"shape":"StringList"}, + "NextToken":{"shape":"PaginationToken"} + } + }, + "ListGroupsRequest":{ + "type":"structure", + "members":{ + "NextToken":{"shape":"PaginationToken"}, + "MaxResults":{"shape":"MaxGroupResults"} + } + }, + "ListGroupsResponse":{ + "type":"structure", + "members":{ + "Groups":{"shape":"GroupSummaryList"}, + "NextToken":{"shape":"Token"} + } + }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceArn"], + "members":{ + "ResourceArn":{ + "shape":"ResourceArn", + "location":"uri", + "locationName":"resourceArn" + } + } + }, "ListTagsForResourceResponse":{ "type":"structure", "members":{ @@ -652,6 +972,11 @@ "max":840, "min":3 }, + "MaxGroupResults":{ + "type":"integer", + "max":20, + "min":1 + }, "MaxOneYearInSeconds":{ "type":"long", "max":31622400, @@ -672,7 +997,21 @@ "max":3008, "min":960 }, + "NotFoundException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "error":{"httpStatusCode":404}, + "exception":true + }, "NullableBoolean":{"type":"boolean"}, + "PaginationToken":{ + "type":"string", + "max":512, + "min":1, + "pattern":"^.+$" + }, "RequestEntityTooLargeException":{ "type":"structure", "members":{ @@ -681,6 +1020,12 @@ "error":{"httpStatusCode":413}, "exception":true }, + "ResourceArn":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"arn:(aws[a-zA-Z-]*)?:synthetics:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:(canary|group):[0-9a-z_\\-]+" + }, "ResourceNotFoundException":{ "type":"structure", "members":{ @@ -722,6 +1067,14 @@ "max":5, "min":0 }, + "ServiceQuotaExceededException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "error":{"httpStatusCode":402}, + "exception":true + }, "StartCanaryRequest":{ "type":"structure", "required":["Name"], @@ -759,6 +1112,10 @@ "max":1024, "min":1 }, + "StringList":{ + "type":"list", + "member":{"shape":"String"} + }, "SubnetId":{"type":"string"}, "SubnetIds":{ "type":"list", @@ -793,7 +1150,7 @@ ], "members":{ "ResourceArn":{ - "shape":"CanaryArn", + "shape":"ResourceArn", "location":"uri", "locationName":"resourceArn" }, @@ -815,6 +1172,14 @@ "max":252, "min":4 }, + "TooManyRequestsException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "error":{"httpStatusCode":429}, + "exception":true + }, "UUID":{ "type":"string", "pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" @@ -827,7 +1192,7 @@ ], "members":{ "ResourceArn":{ - "shape":"CanaryArn", + "shape":"ResourceArn", "location":"uri", "locationName":"resourceArn" }, diff --git a/models/apis/synthetics/2017-10-11/docs-2.json b/models/apis/synthetics/2017-10-11/docs-2.json index 305cdfcf75..e0c4a3fc24 100644 --- a/models/apis/synthetics/2017-10-11/docs-2.json +++ b/models/apis/synthetics/2017-10-11/docs-2.json @@ -2,19 +2,27 @@ "version": "2.0", "service": "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 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.

", "operations": { - "CreateCanary": "

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

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.

", - "DeleteCanary": "

Permanently deletes the specified canary.

If you specify DeleteLambda to true, CloudWatch Synthetics also deletes the Lambda functions and layers that are used by the canary.

Other esources 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:

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.

", + "AssociateResource": "

Associates a canary with a group. Using groups can help you with managing and automating your canaries, and you can also view aggregated run results and statistics for all canaries in a group.

You must run this operation in the Region where the canary exists.

", + "CreateCanary": "

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 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 iam:CreateRole, iam:CreatePolicy and iam:AttachRolePolicy permissions. For more information, see Necessary Roles and Permissions.

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.

", + "CreateGroup": "

Creates a group which you can use to associate canaries with each other, including cross-Region canaries. Using groups can help you with managing and automating your canaries, and you can also view aggregated run results and statistics for all canaries in a group.

Groups are global resources. When you create a group, it is replicated across Amazon Web Services Regions, and you can view it and add canaries to it from any Region. Although the group ARN format reflects the Region name where it was created, a group is not constrained to any Region. This means that you can put canaries from multiple Regions into the same group, and then use that group to view and manage all of those canaries in a single view.

Groups are supported in all Regions except the Regions that are disabled by default. For more information about these Regions, see Enabling a Region.

Each group can contain as many as 10 canaries. You can have as many as 20 groups in your account. Any single canary can be a member of up to 10 groups.

", + "DeleteCanary": "

Permanently deletes the specified canary.

If you specify DeleteLambda to true, CloudWatch Synthetics also deletes the Lambda functions and layers that are used by the canary.

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

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.

", + "DeleteGroup": "

Deletes a group. The group doesn't need to be empty to be deleted. If there are canaries in the group, they are not deleted when you delete the group.

Groups are a global resource that appear in all Regions, but the request to delete a group must be made from its home Region. You can find the home Region of a group within its ARN.

", "DescribeCanaries": "

This operation returns a list of the canaries in your account, along with full details about each canary.

This operation supports resource-level authorization using an IAM policy and the Names parameter. If you specify the Names parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response.

You are required to use the Names parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see Limiting a user to viewing specific canaries.

", "DescribeCanariesLastRun": "

Use this operation to see information from the most recent run of each canary that you have created.

This operation supports resource-level authorization using an IAM policy and the Names parameter. If you specify the Names parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response.

You are required to use the Names parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see Limiting a user to viewing specific canaries.

", "DescribeRuntimeVersions": "

Returns a list of Synthetics canary runtime versions. For more information, see Canary Runtime Versions.

", + "DisassociateResource": "

Removes a canary from a group. You must run this operation in the Region where the canary exists.

", "GetCanary": "

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.

", "GetCanaryRuns": "

Retrieves a list of runs for a specified canary.

", - "ListTagsForResource": "

Displays the tags associated with a canary.

", + "GetGroup": "

Returns information about one group. Groups are a global resource, so you can use this operation from any Region.

", + "ListAssociatedGroups": "

Returns a list of the groups that the specified canary is associated with. The canary that you specify must be in the current Region.

", + "ListGroupResources": "

This operation returns a list of the ARNs of the canaries that are associated with the specified group.

", + "ListGroups": "

Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs. The groups from all Regions are returned.

", + "ListTagsForResource": "

Displays the tags associated with a canary or group.

", "StartCanary": "

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.

", - "StopCanary": "

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.

", - "TagResource": "

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.

", - "UntagResource": "

Removes one or more tags from the specified canary.

", - "UpdateCanary": "

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.

" + "StopCanary": "

Stops the canary to prevent all future runs. If the canary is currently running,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.

", + "TagResource": "

Assigns one or more tags (key-value pairs) to the specified canary or group.

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 resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a canary or group.

", + "UntagResource": "

Removes one or more tags from the specified resource.

", + "UpdateCanary": "

Updates the configuration 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.

" }, "shapes": { "ArtifactConfigInput": { @@ -30,6 +38,21 @@ "Canary$ArtifactConfig": "

A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

" } }, + "AssociateResourceRequest": { + "base": null, + "refs": { + } + }, + "AssociateResourceResponse": { + "base": null, + "refs": { + } + }, + "BadRequestException": { + "base": "

The request was not valid.

", + "refs": { + } + }, "BaseScreenshot": { "base": "

A structure representing a screenshot that is used as a baseline during visual monitoring comparisons made by the canary.

", "refs": { @@ -45,7 +68,7 @@ "BaseScreenshotIgnoreCoordinates": { "base": null, "refs": { - "BaseScreenshot$IgnoreCoordinates": "

Coordinates that define the part of a screen to ignore during screenshot comparisons. To obtain the coordinates to use here, use the CloudWatch Logs console to draw the boundaries on the screen. For more information, see {LINK}

" + "BaseScreenshot$IgnoreCoordinates": "

Coordinates that define the part of a screen to ignore during screenshot comparisons. To obtain the coordinates to use here, use the CloudWatch console to draw the boundaries on the screen. For more information, see Editing or deleting a canary

" } }, "BaseScreenshots": { @@ -78,15 +101,15 @@ "refs": { "Canaries$member": null, "CreateCanaryResponse$Canary": "

The full details about the canary you have created.

", - "GetCanaryResponse$Canary": "

A strucure that contains the full information about the canary.

" + "GetCanaryResponse$Canary": "

A structure that contains the full information about the canary.

" } }, "CanaryArn": { "base": null, "refs": { - "ListTagsForResourceRequest$ResourceArn": "

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 .

", - "TagResourceRequest$ResourceArn": "

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 .

", - "UntagResourceRequest$ResourceArn": "

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 .

" + "AssociateResourceRequest$ResourceArn": "

The ARN of the canary that you want to associate with the specified group.

", + "DisassociateResourceRequest$ResourceArn": "

The ARN of the canary that you want to remove from the specified group.

", + "ListAssociatedGroupsRequest$ResourceArn": "

The ARN of the canary that you want to view groups for.

" } }, "CanaryCodeInput": { @@ -121,7 +144,7 @@ "GetCanaryRequest$Name": "

The name of the canary that you want details for.

", "GetCanaryRunsRequest$Name": "

The name of the canary that you want to see runs for.

", "StartCanaryRequest$Name": "

The name of the canary that you want to run. To find canary names, use DescribeCanaries.

", - "StopCanaryRequest$Name": "

The name of the canary that you want to stop. To find the names of your canaries, use DescribeCanaries.

", + "StopCanaryRequest$Name": "

The name of the canary that you want to stop. To find the names of your canaries, use ListCanaries.

", "UpdateCanaryRequest$Name": "

The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries.

You cannot change the name of a canary that has already been created.

" } }, @@ -135,8 +158,8 @@ "CanaryRunConfigInput": { "base": "

A structure that contains input information for a canary run.

", "refs": { - "CreateCanaryRequest$RunConfig": "

A structure that contains the configuration for individual canary runs, such as timeout value.

", - "UpdateCanaryRequest$RunConfig": "

A structure that contains the timeout value that is used for each individual run of the canary.

" + "CreateCanaryRequest$RunConfig": "

A structure that contains the configuration for individual canary runs, such as timeout value and environment variables.

The environment variables keys and values are not encrypted. Do not store sensitive information in this field.

", + "UpdateCanaryRequest$RunConfig": "

A structure that contains the timeout value that is used for each individual run of the canary.

The environment variables keys and values are not encrypted. Do not store sensitive information in this field.

" } }, "CanaryRunConfigOutput": { @@ -233,6 +256,16 @@ "refs": { } }, + "CreateGroupRequest": { + "base": null, + "refs": { + } + }, + "CreateGroupResponse": { + "base": null, + "refs": { + } + }, "DeleteCanaryRequest": { "base": null, "refs": { @@ -243,6 +276,16 @@ "refs": { } }, + "DeleteGroupRequest": { + "base": null, + "refs": { + } + }, + "DeleteGroupResponse": { + "base": null, + "refs": { + } + }, "DescribeCanariesLastRunNameFilter": { "base": null, "refs": { @@ -285,6 +328,16 @@ "refs": { } }, + "DisassociateResourceRequest": { + "base": null, + "refs": { + } + }, + "DisassociateResourceResponse": { + "base": null, + "refs": { + } + }, "EncryptionMode": { "base": null, "refs": { @@ -306,16 +359,21 @@ "EnvironmentVariablesMap": { "base": null, "refs": { - "CanaryRunConfigInput$EnvironmentVariables": "

Specifies the keys and values to use for any environment variables used in the canary script. Use the following format:

{ \"key1\" : \"value1\", \"key2\" : \"value2\", ...}

Keys must start with a letter and be at least two characters. The total size of your environment variables cannot exceed 4 KB. You can't specify any Lambda reserved environment variables as the keys for your environment variables. For more information about reserved keys, see Runtime environment variables.

" + "CanaryRunConfigInput$EnvironmentVariables": "

Specifies the keys and values to use for any environment variables used in the canary script. Use the following format:

{ \"key1\" : \"value1\", \"key2\" : \"value2\", ...}

Keys must start with a letter and be at least two characters. The total size of your environment variables cannot exceed 4 KB. You can't specify any Lambda reserved environment variables as the keys for your environment variables. For more information about reserved keys, see Runtime environment variables.

The environment variables keys and values are not encrypted. Do not store sensitive information in this field.

" } }, "ErrorMessage": { "base": null, "refs": { + "BadRequestException$Message": null, "ConflictException$Message": null, + "InternalFailureException$Message": null, "InternalServerException$Message": null, + "NotFoundException$Message": null, "RequestEntityTooLargeException$Message": null, "ResourceNotFoundException$Message": null, + "ServiceQuotaExceededException$Message": null, + "TooManyRequestsException$Message": null, "ValidationException$Message": null } }, @@ -345,6 +403,66 @@ "refs": { } }, + "GetGroupRequest": { + "base": null, + "refs": { + } + }, + "GetGroupResponse": { + "base": null, + "refs": { + } + }, + "Group": { + "base": "

This structure contains information about one group.

", + "refs": { + "CreateGroupResponse$Group": "

A structure that contains information about the group that was just created.

", + "GetGroupResponse$Group": "

A structure that contains information about the group.

" + } + }, + "GroupArn": { + "base": null, + "refs": { + "Group$Arn": "

The ARN of the group.

", + "GroupSummary$Arn": "

The ARN of the group.

" + } + }, + "GroupIdentifier": { + "base": null, + "refs": { + "AssociateResourceRequest$GroupIdentifier": "

Specifies the group. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.

", + "DeleteGroupRequest$GroupIdentifier": "

Specifies which group to delete. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.

", + "DisassociateResourceRequest$GroupIdentifier": "

Specifies the group. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.

", + "GetGroupRequest$GroupIdentifier": "

Specifies the group to return information for. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.

", + "ListGroupResourcesRequest$GroupIdentifier": "

Specifies the group to return information for. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.

" + } + }, + "GroupName": { + "base": null, + "refs": { + "CreateGroupRequest$Name": "

The name for the group. It can include any Unicode characters.

The names for all groups in your account, across all Regions, must be unique.

", + "Group$Name": "

The name of the group.

", + "GroupSummary$Name": "

The name of the group.

" + } + }, + "GroupSummary": { + "base": "

A structure containing some information about a group.

", + "refs": { + "GroupSummaryList$member": null + } + }, + "GroupSummaryList": { + "base": null, + "refs": { + "ListAssociatedGroupsResponse$Groups": "

An array of structures that contain information about the groups that this canary is associated with.

", + "ListGroupsResponse$Groups": "

An array of structures that each contain information about one group.

" + } + }, + "InternalFailureException": { + "base": "

An internal failure occurred. Try the operation again.

", + "refs": { + } + }, "InternalServerException": { "base": "

An unknown internal error occurred.

", "refs": { @@ -356,6 +474,36 @@ "S3EncryptionConfig$KmsKeyArn": "

The ARN of the customer-managed KMS key to use, if you specify SSE-KMS for EncryptionMode

" } }, + "ListAssociatedGroupsRequest": { + "base": null, + "refs": { + } + }, + "ListAssociatedGroupsResponse": { + "base": null, + "refs": { + } + }, + "ListGroupResourcesRequest": { + "base": null, + "refs": { + } + }, + "ListGroupResourcesResponse": { + "base": null, + "refs": { + } + }, + "ListGroupsRequest": { + "base": null, + "refs": { + } + }, + "ListGroupsResponse": { + "base": null, + "refs": { + } + }, "ListTagsForResourceRequest": { "base": null, "refs": { @@ -379,6 +527,14 @@ "CanaryRunConfigOutput$TimeoutInSeconds": "

How long the canary is allowed to run before it must stop.

" } }, + "MaxGroupResults": { + "base": null, + "refs": { + "ListAssociatedGroupsRequest$MaxResults": "

Specify this parameter to limit how many groups are returned each time you use the ListAssociatedGroups operation. If you omit this parameter, the default of 20 is used.

", + "ListGroupResourcesRequest$MaxResults": "

Specify this parameter to limit how many canary ARNs are returned each time you use the ListGroupResources operation. If you omit this parameter, the default of 20 is used.

", + "ListGroupsRequest$MaxResults": "

Specify this parameter to limit how many groups are returned each time you use the ListGroups operation. If you omit this parameter, the default of 20 is used.

" + } + }, "MaxOneYearInSeconds": { "base": null, "refs": { @@ -412,6 +568,11 @@ "CanaryRunConfigOutput$MemoryInMB": "

The maximum amount of memory available to the canary while it is running, in MB. This value must be a multiple of 64.

" } }, + "NotFoundException": { + "base": "

The specified resource was not found.

", + "refs": { + } + }, "NullableBoolean": { "base": null, "refs": { @@ -419,11 +580,29 @@ "CanaryRunConfigOutput$ActiveTracing": "

Displays whether this canary run used active X-Ray tracing.

" } }, + "PaginationToken": { + "base": null, + "refs": { + "ListAssociatedGroupsRequest$NextToken": "

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.

", + "ListAssociatedGroupsResponse$NextToken": "

A token that indicates that there is more data available. You can use this token in a subsequent ListAssociatedGroups operation to retrieve the next set of results.

", + "ListGroupResourcesRequest$NextToken": "

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.

", + "ListGroupResourcesResponse$NextToken": "

A token that indicates that there is more data available. You can use this token in a subsequent ListGroupResources operation to retrieve the next set of results.

", + "ListGroupsRequest$NextToken": "

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.

" + } + }, "RequestEntityTooLargeException": { "base": "

One of the input resources is larger than is allowed.

", "refs": { } }, + "ResourceArn": { + "base": null, + "refs": { + "ListTagsForResourceRequest$ResourceArn": "

The ARN of the canary or group that you want to view tags for.

The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name .

The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name

", + "TagResourceRequest$ResourceArn": "

The ARN of the canary or group that you're adding tags to.

The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name .

The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name

", + "UntagResourceRequest$ResourceArn": "

The ARN of the canary or group that you're removing tags from.

The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name .

The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name

" + } + }, "ResourceNotFoundException": { "base": "

One of the specified resources was not found.

", "refs": { @@ -469,6 +648,11 @@ "VpcConfigOutput$SecurityGroupIds": "

The IDs of the security groups for this canary.

" } }, + "ServiceQuotaExceededException": { + "base": "

The request exceeded a service quota value.

", + "refs": { + } + }, "StartCanaryRequest": { "base": null, "refs": { @@ -507,12 +691,21 @@ "CanaryStatus$StateReason": "

If the canary has insufficient permissions to run, this field provides more details.

", "CreateCanaryRequest$ArtifactS3Location": "

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

", "CreateCanaryRequest$RuntimeVersion": "

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.

", + "Group$Id": "

The unique ID of the group.

", + "GroupSummary$Id": "

The unique ID of the group.

", "RuntimeVersion$VersionName": "

The name of the runtime version. For a list of valid runtime versions, see Canary Runtime Versions.

", "RuntimeVersion$Description": "

A description of the runtime version, created by Amazon.

", + "StringList$member": null, "UpdateCanaryRequest$RuntimeVersion": "

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.

", "UpdateCanaryRequest$ArtifactS3Location": "

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

", "VisualReferenceInput$BaseCanaryRunId": "

Specifies which canary run to use the screenshots from as the baseline for future visual monitoring with this canary. Valid values are nextrun to use the screenshots from the next run after this update is made, lastrun to use the screenshots from the most recent run before this update was made, or the value of Id in the CanaryRun from any past run of this canary.

", - "VisualReferenceOutput$BaseCanaryRunId": "

The ID of the canary run that produced the screenshots that are used as the baseline for visual monitoring comparisons during future runs of this canary.

" + "VisualReferenceOutput$BaseCanaryRunId": "

The ID of the canary run that produced the baseline screenshots that are used for visual monitoring comparisons by this canary.

" + } + }, + "StringList": { + "base": null, + "refs": { + "ListGroupResourcesResponse$Resources": "

An array of ARNs. These ARNs are for the canaries that are associated with the group.

" } }, "SubnetId": { @@ -546,8 +739,10 @@ "refs": { "Canary$Tags": "

The list of key-value pairs that are associated with the canary.

", "CreateCanaryRequest$Tags": "

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.

", - "ListTagsForResourceResponse$Tags": "

The list of tag keys and values associated with the canary that you specified.

", - "TagResourceRequest$Tags": "

The list of key-value pairs to associate with the canary.

" + "CreateGroupRequest$Tags": "

A list of key-value pairs to associate with the group. You can associate as many as 50 tags with a group.

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.

", + "Group$Tags": "

The list of key-value pairs that are associated with the canary.

", + "ListTagsForResourceResponse$Tags": "

The list of tag keys and values associated with the resource that you specified.

", + "TagResourceRequest$Tags": "

The list of key-value pairs to associate with the resource.

" } }, "TagResourceRequest": { @@ -575,6 +770,8 @@ "CanaryTimeline$LastModified": "

The date and time the canary was most recently modified.

", "CanaryTimeline$LastStarted": "

The date and time that the canary's most recent run started.

", "CanaryTimeline$LastStopped": "

The date and time that the canary's most recent run ended.

", + "Group$CreatedTime": "

The date and time that the group was created.

", + "Group$LastModifiedTime": "

The date and time that the group was most recently updated.

", "RuntimeVersion$ReleaseDate": "

The date that the runtime version was released.

", "RuntimeVersion$DeprecationDate": "

If this runtime version is deprecated, this value is the date of deprecation.

" } @@ -582,14 +779,20 @@ "Token": { "base": null, "refs": { - "DescribeCanariesLastRunRequest$NextToken": "

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.

", + "DescribeCanariesLastRunRequest$NextToken": "

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.

", "DescribeCanariesLastRunResponse$NextToken": "

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.

", "DescribeCanariesRequest$NextToken": "

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.

", "DescribeCanariesResponse$NextToken": "

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.

", "DescribeRuntimeVersionsRequest$NextToken": "

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.

", "DescribeRuntimeVersionsResponse$NextToken": "

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.

", "GetCanaryRunsRequest$NextToken": "

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.

", - "GetCanaryRunsResponse$NextToken": "

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.

" + "GetCanaryRunsResponse$NextToken": "

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.

", + "ListGroupsResponse$NextToken": "

A token that indicates that there is more data available. You can use this token in a subsequent ListGroups operation to retrieve the next set of results.

" + } + }, + "TooManyRequestsException": { + "base": "

There were too many simultaneous requests. Try the operation again.

", + "refs": { } }, "UUID": { @@ -625,7 +828,7 @@ } }, "VisualReferenceInput": { - "base": "

An object that specifies what screenshots to use as a baseline for visual monitoring by this canary, and optionally the parts of the screenshots to ignore during the visual monitoring comparison.

Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 runtime or later. For more information, see Visual monitoring and Visual monitoring blueprint

", + "base": "

An object that specifies what screenshots to use as a baseline for visual monitoring by this canary. It can optionally also specify parts of the screenshots to ignore during the visual monitoring comparison.

Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 runtime or later. For more information, see Visual monitoring and Visual monitoring blueprint

", "refs": { "UpdateCanaryRequest$VisualReference": "

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 and Visual monitoring blueprint

" } diff --git a/models/apis/synthetics/2017-10-11/paginators-1.json b/models/apis/synthetics/2017-10-11/paginators-1.json index e5412aa47f..6deb61db50 100644 --- a/models/apis/synthetics/2017-10-11/paginators-1.json +++ b/models/apis/synthetics/2017-10-11/paginators-1.json @@ -19,6 +19,21 @@ "input_token": "NextToken", "limit_key": "MaxResults", "output_token": "NextToken" + }, + "ListAssociatedGroups": { + "input_token": "NextToken", + "limit_key": "MaxResults", + "output_token": "NextToken" + }, + "ListGroupResources": { + "input_token": "NextToken", + "limit_key": "MaxResults", + "output_token": "NextToken" + }, + "ListGroups": { + "input_token": "NextToken", + "limit_key": "MaxResults", + "output_token": "NextToken" } } } \ No newline at end of file diff --git a/service/cloudformation/api.go b/service/cloudformation/api.go index 6663e16a3c..8b6e62693e 100644 --- a/service/cloudformation/api.go +++ b/service/cloudformation/api.go @@ -9841,6 +9841,27 @@ func (s DeleteStackSetOutput) GoString() string { type DeploymentTargets struct { _ struct{} `type:"structure"` + // Limit deployment targets to individual accounts or include additional accounts + // with provided OUs. + // + // The following is a list of possible values for the AccountFilterType operation. + // + // * INTERSECTION: StackSets deploys to the accounts specified in Accounts + // parameter. + // + // * DIFFERENCE: StackSets excludes the accounts specified in Accounts parameter. + // This enables user to avoid certain accounts within an OU such as suspended + // accounts. + // + // * UNION: (default value) StackSets includes additional accounts deployment + // targets. This is the default value if AccountFilterType is not provided. + // This enables user to update an entire OU and individual accounts from + // a different OU in one request, which used to be two separate requests. + // + // * NONE: Deploys to all the accounts in specified organizational units + // (OU). + AccountFilterType *string `type:"string" enum:"AccountFilterType"` + // The names of one or more Amazon Web Services accounts for which you want // to deploy stack set updates. Accounts []*string `type:"list"` @@ -9884,6 +9905,12 @@ func (s *DeploymentTargets) Validate() error { return nil } +// SetAccountFilterType sets the AccountFilterType field's value. +func (s *DeploymentTargets) SetAccountFilterType(v string) *DeploymentTargets { + s.AccountFilterType = &v + return s +} + // SetAccounts sets the Accounts field's value. func (s *DeploymentTargets) SetAccounts(v []*string) *DeploymentTargets { s.Accounts = v @@ -22706,6 +22733,30 @@ func (s *ValidateTemplateOutput) SetParameters(v []*TemplateParameter) *Validate return s } +const ( + // AccountFilterTypeNone is a AccountFilterType enum value + AccountFilterTypeNone = "NONE" + + // AccountFilterTypeIntersection is a AccountFilterType enum value + AccountFilterTypeIntersection = "INTERSECTION" + + // AccountFilterTypeDifference is a AccountFilterType enum value + AccountFilterTypeDifference = "DIFFERENCE" + + // AccountFilterTypeUnion is a AccountFilterType enum value + AccountFilterTypeUnion = "UNION" +) + +// AccountFilterType_Values returns all elements of the AccountFilterType enum +func AccountFilterType_Values() []string { + return []string{ + AccountFilterTypeNone, + AccountFilterTypeIntersection, + AccountFilterTypeDifference, + AccountFilterTypeUnion, + } +} + const ( // AccountGateStatusSucceeded is a AccountGateStatus enum value AccountGateStatusSucceeded = "SUCCEEDED" diff --git a/service/synthetics/api.go b/service/synthetics/api.go index 5c546d3448..2c8bb23607 100644 --- a/service/synthetics/api.go +++ b/service/synthetics/api.go @@ -13,6 +13,102 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/restjson" ) +const opAssociateResource = "AssociateResource" + +// AssociateResourceRequest generates a "aws/request.Request" representing the +// client's request for the AssociateResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateResource for more information on using the AssociateResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateResourceRequest method. +// req, resp := client.AssociateResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/AssociateResource +func (c *Synthetics) AssociateResourceRequest(input *AssociateResourceInput) (req *request.Request, output *AssociateResourceOutput) { + op := &request.Operation{ + Name: opAssociateResource, + HTTPMethod: "PATCH", + HTTPPath: "/group/{groupIdentifier}/associate", + } + + if input == nil { + input = &AssociateResourceInput{} + } + + output = &AssociateResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateResource API operation for Synthetics. +// +// Associates a canary with a group. Using groups can help you with managing +// and automating your canaries, and you can also view aggregated run results +// and statistics for all canaries in a group. +// +// You must run this operation in the Region where the canary exists. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation AssociateResource for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// * ServiceQuotaExceededException +// The request exceeded a service quota value. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/AssociateResource +func (c *Synthetics) AssociateResource(input *AssociateResourceInput) (*AssociateResourceOutput, error) { + req, out := c.AssociateResourceRequest(input) + return out, req.Send() +} + +// AssociateResourceWithContext is the same as AssociateResource with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) AssociateResourceWithContext(ctx aws.Context, input *AssociateResourceInput, opts ...request.Option) (*AssociateResourceOutput, error) { + req, out := c.AssociateResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateCanary = "CreateCanary" // CreateCanaryRequest generates a "aws/request.Request" representing the @@ -67,9 +163,9 @@ func (c *Synthetics) CreateCanaryRequest(input *CreateCanaryInput) (req *request // 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). +// If you are creating a new IAM role for the canary, you also need 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, @@ -115,6 +211,111 @@ func (c *Synthetics) CreateCanaryWithContext(ctx aws.Context, input *CreateCanar return out, req.Send() } +const opCreateGroup = "CreateGroup" + +// CreateGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGroup for more information on using the CreateGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGroupRequest method. +// req, resp := client.CreateGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/CreateGroup +func (c *Synthetics) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { + op := &request.Operation{ + Name: opCreateGroup, + HTTPMethod: "POST", + HTTPPath: "/group", + } + + if input == nil { + input = &CreateGroupInput{} + } + + output = &CreateGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGroup API operation for Synthetics. +// +// Creates a group which you can use to associate canaries with each other, +// including cross-Region canaries. Using groups can help you with managing +// and automating your canaries, and you can also view aggregated run results +// and statistics for all canaries in a group. +// +// Groups are global resources. When you create a group, it is replicated across +// Amazon Web Services Regions, and you can view it and add canaries to it from +// any Region. Although the group ARN format reflects the Region name where +// it was created, a group is not constrained to any Region. This means that +// you can put canaries from multiple Regions into the same group, and then +// use that group to view and manage all of those canaries in a single view. +// +// Groups are supported in all Regions except the Regions that are disabled +// by default. For more information about these Regions, see Enabling a Region +// (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable). +// +// Each group can contain as many as 10 canaries. You can have as many as 20 +// groups in your account. Any single canary can be a member of up to 10 groups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation CreateGroup for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// * ServiceQuotaExceededException +// The request exceeded a service quota value. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/CreateGroup +func (c *Synthetics) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { + req, out := c.CreateGroupRequest(input) + return out, req.Send() +} + +// CreateGroupWithContext is the same as CreateGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { + req, out := c.CreateGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteCanary = "DeleteCanary" // DeleteCanaryRequest generates a "aws/request.Request" representing the @@ -165,7 +366,7 @@ func (c *Synthetics) DeleteCanaryRequest(input *DeleteCanaryInput) (req *request // If you specify DeleteLambda to true, CloudWatch Synthetics also deletes the // Lambda functions and layers that are used by the canary. // -// Other esources used and created by the canary are not automatically deleted. +// Other 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: // @@ -226,6 +427,100 @@ func (c *Synthetics) DeleteCanaryWithContext(ctx aws.Context, input *DeleteCanar return out, req.Send() } +const opDeleteGroup = "DeleteGroup" + +// DeleteGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGroup for more information on using the DeleteGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGroupRequest method. +// req, resp := client.DeleteGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DeleteGroup +func (c *Synthetics) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { + op := &request.Operation{ + Name: opDeleteGroup, + HTTPMethod: "DELETE", + HTTPPath: "/group/{groupIdentifier}", + } + + if input == nil { + input = &DeleteGroupInput{} + } + + output = &DeleteGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteGroup API operation for Synthetics. +// +// Deletes a group. The group doesn't need to be empty to be deleted. If there +// are canaries in the group, they are not deleted when you delete the group. +// +// Groups are a global resource that appear in all Regions, but the request +// to delete a group must be made from its home Region. You can find the home +// Region of a group within its ARN. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation DeleteGroup for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DeleteGroup +func (c *Synthetics) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { + req, out := c.DeleteGroupRequest(input) + return out, req.Send() +} + +// DeleteGroupWithContext is the same as DeleteGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { + req, out := c.DeleteGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeCanaries = "DescribeCanaries" // DescribeCanariesRequest generates a "aws/request.Request" representing the @@ -671,60 +966,60 @@ func (c *Synthetics) DescribeRuntimeVersionsPagesWithContext(ctx aws.Context, in return p.Err() } -const opGetCanary = "GetCanary" +const opDisassociateResource = "DisassociateResource" -// GetCanaryRequest generates a "aws/request.Request" representing the -// client's request for the GetCanary operation. The "output" return +// DisassociateResourceRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetCanary for more information on using the GetCanary +// See DisassociateResource for more information on using the DisassociateResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetCanaryRequest method. -// req, resp := client.GetCanaryRequest(params) +// // Example sending a request using the DisassociateResourceRequest method. +// req, resp := client.DisassociateResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary -func (c *Synthetics) GetCanaryRequest(input *GetCanaryInput) (req *request.Request, output *GetCanaryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DisassociateResource +func (c *Synthetics) DisassociateResourceRequest(input *DisassociateResourceInput) (req *request.Request, output *DisassociateResourceOutput) { op := &request.Operation{ - Name: opGetCanary, - HTTPMethod: "GET", - HTTPPath: "/canary/{name}", + Name: opDisassociateResource, + HTTPMethod: "PATCH", + HTTPPath: "/group/{groupIdentifier}/disassociate", } if input == nil { - input = &GetCanaryInput{} + input = &DisassociateResourceInput{} } - output = &GetCanaryOutput{} + output = &DisassociateResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// GetCanary API operation for Synthetics. +// DisassociateResource API operation for Synthetics. // -// 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). +// Removes a canary from a group. You must run this operation in the Region +// where the canary exists. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Synthetics's -// API operation GetCanary for usage and error information. +// API operation DisassociateResource for usage and error information. // // Returned Error Types: // * InternalServerException @@ -733,59 +1028,149 @@ func (c *Synthetics) GetCanaryRequest(input *GetCanaryInput) (req *request.Reque // * ValidationException // A parameter could not be validated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary -func (c *Synthetics) GetCanary(input *GetCanaryInput) (*GetCanaryOutput, error) { - req, out := c.GetCanaryRequest(input) +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DisassociateResource +func (c *Synthetics) DisassociateResource(input *DisassociateResourceInput) (*DisassociateResourceOutput, error) { + req, out := c.DisassociateResourceRequest(input) return out, req.Send() } -// GetCanaryWithContext is the same as GetCanary with the addition of +// DisassociateResourceWithContext is the same as DisassociateResource with the addition of // the ability to pass a context and additional request options. // -// See GetCanary for details on how to use this API operation. +// See DisassociateResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Synthetics) GetCanaryWithContext(ctx aws.Context, input *GetCanaryInput, opts ...request.Option) (*GetCanaryOutput, error) { - req, out := c.GetCanaryRequest(input) +func (c *Synthetics) DisassociateResourceWithContext(ctx aws.Context, input *DisassociateResourceInput, opts ...request.Option) (*DisassociateResourceOutput, error) { + req, out := c.DisassociateResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetCanaryRuns = "GetCanaryRuns" +const opGetCanary = "GetCanary" -// GetCanaryRunsRequest generates a "aws/request.Request" representing the -// client's request for the GetCanaryRuns operation. The "output" return +// GetCanaryRequest generates a "aws/request.Request" representing the +// client's request for the GetCanary operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See GetCanaryRuns for more information on using the GetCanaryRuns +// See GetCanary for more information on using the GetCanary // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the GetCanaryRunsRequest method. -// req, resp := client.GetCanaryRunsRequest(params) +// // Example sending a request using the GetCanaryRequest method. +// req, resp := client.GetCanaryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanaryRuns -func (c *Synthetics) GetCanaryRunsRequest(input *GetCanaryRunsInput) (req *request.Request, output *GetCanaryRunsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary +func (c *Synthetics) GetCanaryRequest(input *GetCanaryInput) (req *request.Request, output *GetCanaryOutput) { op := &request.Operation{ - Name: opGetCanaryRuns, - HTTPMethod: "POST", - HTTPPath: "/canary/{name}/runs", + Name: opGetCanary, + HTTPMethod: "GET", + HTTPPath: "/canary/{name}", + } + + if input == nil { + input = &GetCanaryInput{} + } + + output = &GetCanaryOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCanary API operation for Synthetics. +// +// 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). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation GetCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary +func (c *Synthetics) GetCanary(input *GetCanaryInput) (*GetCanaryOutput, error) { + req, out := c.GetCanaryRequest(input) + return out, req.Send() +} + +// GetCanaryWithContext is the same as GetCanary with the addition of +// the ability to pass a context and additional request options. +// +// See GetCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) GetCanaryWithContext(ctx aws.Context, input *GetCanaryInput, opts ...request.Option) (*GetCanaryOutput, error) { + req, out := c.GetCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCanaryRuns = "GetCanaryRuns" + +// GetCanaryRunsRequest generates a "aws/request.Request" representing the +// client's request for the GetCanaryRuns operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCanaryRuns for more information on using the GetCanaryRuns +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCanaryRunsRequest method. +// req, resp := client.GetCanaryRunsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanaryRuns +func (c *Synthetics) GetCanaryRunsRequest(input *GetCanaryRunsInput) (req *request.Request, output *GetCanaryRunsOutput) { + op := &request.Operation{ + Name: opGetCanaryRuns, + HTTPMethod: "POST", + HTTPPath: "/canary/{name}/runs", Paginator: &request.Paginator{ InputTokens: []string{"NextToken"}, OutputTokens: []string{"NextToken"}, @@ -898,146 +1283,154 @@ func (c *Synthetics) GetCanaryRunsPagesWithContext(ctx aws.Context, input *GetCa return p.Err() } -const opListTagsForResource = "ListTagsForResource" +const opGetGroup = "GetGroup" -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return +// GetGroupRequest generates a "aws/request.Request" representing the +// client's request for the GetGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See ListTagsForResource for more information on using the ListTagsForResource +// See GetGroup for more information on using the GetGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) +// // Example sending a request using the GetGroupRequest method. +// req, resp := client.GetGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource -func (c *Synthetics) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetGroup +func (c *Synthetics) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { op := &request.Operation{ - Name: opListTagsForResource, + Name: opGetGroup, HTTPMethod: "GET", - HTTPPath: "/tags/{resourceArn}", + HTTPPath: "/group/{groupIdentifier}", } if input == nil { - input = &ListTagsForResourceInput{} + input = &GetGroupInput{} } - output = &ListTagsForResourceOutput{} + output = &GetGroupOutput{} req = c.newRequest(op, input, output) return } -// ListTagsForResource API operation for Synthetics. +// GetGroup API operation for Synthetics. // -// Displays the tags associated with a canary. +// Returns information about one group. Groups are a global resource, so you +// can use this operation from any Region. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Synthetics's -// API operation ListTagsForResource for usage and error information. +// API operation GetGroup for usage and error information. // // Returned Error Types: // * InternalServerException // An unknown internal error occurred. // +// * ValidationException +// A parameter could not be validated. +// // * ResourceNotFoundException // One of the specified resources was not found. // -// * ValidationException -// A parameter could not be validated. +// * ConflictException +// A conflicting operation is already in progress. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource -func (c *Synthetics) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetGroup +func (c *Synthetics) GetGroup(input *GetGroupInput) (*GetGroupOutput, error) { + req, out := c.GetGroupRequest(input) return out, req.Send() } -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// GetGroupWithContext is the same as GetGroup with the addition of // the ability to pass a context and additional request options. // -// See ListTagsForResource for details on how to use this API operation. +// See GetGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Synthetics) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) +func (c *Synthetics) GetGroupWithContext(ctx aws.Context, input *GetGroupInput, opts ...request.Option) (*GetGroupOutput, error) { + req, out := c.GetGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStartCanary = "StartCanary" +const opListAssociatedGroups = "ListAssociatedGroups" -// StartCanaryRequest generates a "aws/request.Request" representing the -// client's request for the StartCanary operation. The "output" return +// ListAssociatedGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListAssociatedGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StartCanary for more information on using the StartCanary +// See ListAssociatedGroups for more information on using the ListAssociatedGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StartCanaryRequest method. -// req, resp := client.StartCanaryRequest(params) +// // Example sending a request using the ListAssociatedGroupsRequest method. +// req, resp := client.ListAssociatedGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary -func (c *Synthetics) StartCanaryRequest(input *StartCanaryInput) (req *request.Request, output *StartCanaryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListAssociatedGroups +func (c *Synthetics) ListAssociatedGroupsRequest(input *ListAssociatedGroupsInput) (req *request.Request, output *ListAssociatedGroupsOutput) { op := &request.Operation{ - Name: opStartCanary, + Name: opListAssociatedGroups, HTTPMethod: "POST", - HTTPPath: "/canary/{name}/start", + HTTPPath: "/resource/{resourceArn}/groups", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { - input = &StartCanaryInput{} + input = &ListAssociatedGroupsInput{} } - output = &StartCanaryOutput{} + output = &ListAssociatedGroupsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// StartCanary API operation for Synthetics. +// ListAssociatedGroups API operation for Synthetics. // -// 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). +// Returns a list of the groups that the specified canary is associated with. +// The canary that you specify must be in the current Region. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Synthetics's -// API operation StartCanary for usage and error information. +// API operation ListAssociatedGroups for usage and error information. // // Returned Error Types: // * InternalServerException @@ -1049,90 +1442,139 @@ func (c *Synthetics) StartCanaryRequest(input *StartCanaryInput) (req *request.R // * ResourceNotFoundException // One of the specified resources was not found. // -// * ConflictException -// A conflicting operation is already in progress. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary -func (c *Synthetics) StartCanary(input *StartCanaryInput) (*StartCanaryOutput, error) { - req, out := c.StartCanaryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListAssociatedGroups +func (c *Synthetics) ListAssociatedGroups(input *ListAssociatedGroupsInput) (*ListAssociatedGroupsOutput, error) { + req, out := c.ListAssociatedGroupsRequest(input) return out, req.Send() } -// StartCanaryWithContext is the same as StartCanary with the addition of +// ListAssociatedGroupsWithContext is the same as ListAssociatedGroups with the addition of // the ability to pass a context and additional request options. // -// See StartCanary for details on how to use this API operation. +// See ListAssociatedGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Synthetics) StartCanaryWithContext(ctx aws.Context, input *StartCanaryInput, opts ...request.Option) (*StartCanaryOutput, error) { - req, out := c.StartCanaryRequest(input) +func (c *Synthetics) ListAssociatedGroupsWithContext(ctx aws.Context, input *ListAssociatedGroupsInput, opts ...request.Option) (*ListAssociatedGroupsOutput, error) { + req, out := c.ListAssociatedGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopCanary = "StopCanary" +// ListAssociatedGroupsPages iterates over the pages of a ListAssociatedGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListAssociatedGroups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListAssociatedGroups operation. +// pageNum := 0 +// err := client.ListAssociatedGroupsPages(params, +// func(page *synthetics.ListAssociatedGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Synthetics) ListAssociatedGroupsPages(input *ListAssociatedGroupsInput, fn func(*ListAssociatedGroupsOutput, bool) bool) error { + return c.ListAssociatedGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// StopCanaryRequest generates a "aws/request.Request" representing the -// client's request for the StopCanary operation. The "output" return +// ListAssociatedGroupsPagesWithContext same as ListAssociatedGroupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) ListAssociatedGroupsPagesWithContext(ctx aws.Context, input *ListAssociatedGroupsInput, fn func(*ListAssociatedGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListAssociatedGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListAssociatedGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListAssociatedGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListGroupResources = "ListGroupResources" + +// ListGroupResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListGroupResources operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See StopCanary for more information on using the StopCanary +// See ListGroupResources for more information on using the ListGroupResources // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the StopCanaryRequest method. -// req, resp := client.StopCanaryRequest(params) +// // Example sending a request using the ListGroupResourcesRequest method. +// req, resp := client.ListGroupResourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary -func (c *Synthetics) StopCanaryRequest(input *StopCanaryInput) (req *request.Request, output *StopCanaryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListGroupResources +func (c *Synthetics) ListGroupResourcesRequest(input *ListGroupResourcesInput) (req *request.Request, output *ListGroupResourcesOutput) { op := &request.Operation{ - Name: opStopCanary, + Name: opListGroupResources, HTTPMethod: "POST", - HTTPPath: "/canary/{name}/stop", + HTTPPath: "/group/{groupIdentifier}/resources", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { - input = &StopCanaryInput{} + input = &ListGroupResourcesInput{} } - output = &StopCanaryOutput{} + output = &ListGroupResourcesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// StopCanary API operation for Synthetics. -// -// 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. +// ListGroupResources API operation for Synthetics. // -// You can use StartCanary to start it running again with the canary’s current -// schedule at any point in the future. +// This operation returns a list of the ARNs of the canaries that are associated +// with the specified group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Synthetics's -// API operation StopCanary for usage and error information. +// API operation ListGroupResources for usage and error information. // // Returned Error Types: // * InternalServerException @@ -1147,272 +1589,367 @@ func (c *Synthetics) StopCanaryRequest(input *StopCanaryInput) (req *request.Req // * ConflictException // A conflicting operation is already in progress. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary -func (c *Synthetics) StopCanary(input *StopCanaryInput) (*StopCanaryOutput, error) { - req, out := c.StopCanaryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListGroupResources +func (c *Synthetics) ListGroupResources(input *ListGroupResourcesInput) (*ListGroupResourcesOutput, error) { + req, out := c.ListGroupResourcesRequest(input) return out, req.Send() } -// StopCanaryWithContext is the same as StopCanary with the addition of +// ListGroupResourcesWithContext is the same as ListGroupResources with the addition of // the ability to pass a context and additional request options. // -// See StopCanary for details on how to use this API operation. +// See ListGroupResources for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Synthetics) StopCanaryWithContext(ctx aws.Context, input *StopCanaryInput, opts ...request.Option) (*StopCanaryOutput, error) { - req, out := c.StopCanaryRequest(input) +func (c *Synthetics) ListGroupResourcesWithContext(ctx aws.Context, input *ListGroupResourcesInput, opts ...request.Option) (*ListGroupResourcesOutput, error) { + req, out := c.ListGroupResourcesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource" - -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagResource for more information on using the TagResource -// API call, and error handling. +// ListGroupResourcesPages iterates over the pages of a ListGroupResources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. // -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// See ListGroupResources method for more information on how to use this operation. // +// Note: This operation can generate multiple requests to a service. // -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) +// // Example iterating over at most 3 pages of a ListGroupResources operation. +// pageNum := 0 +// err := client.ListGroupResourcesPages(params, +// func(page *synthetics.ListGroupResourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) // -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } +func (c *Synthetics) ListGroupResourcesPages(input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool) error { + return c.ListGroupResourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListGroupResourcesPagesWithContext same as ListGroupResourcesPages except +// it takes a Context and allows setting request options on the pages. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource -func (c *Synthetics) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/tags/{resourceArn}", +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) ListGroupResourcesPagesWithContext(ctx aws.Context, input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListGroupResourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListGroupResourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, } - if input == nil { - input = &TagResourceInput{} + for p.Next() { + if !fn(p.Page().(*ListGroupResourcesOutput), !p.HasNextPage()) { + break + } } - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return + return p.Err() } -// TagResource API operation for Synthetics. +const opListGroups = "ListGroups" + +// ListGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. // -// Assigns one or more tags (key-value pairs) to the specified canary. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// 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. +// See ListGroups for more information on using the ListGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// 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. +// // Example sending a request using the ListGroupsRequest method. +// req, resp := client.ListGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListGroups +func (c *Synthetics) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { + op := &request.Operation{ + Name: opListGroups, + HTTPMethod: "POST", + HTTPPath: "/groups", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListGroupsInput{} + } + + output = &ListGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGroups API operation for Synthetics. // -// You can associate as many as 50 tags with a canary. +// Returns a list of all groups in the account, displaying their names, unique +// IDs, and ARNs. The groups from all Regions are returned. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Synthetics's -// API operation TagResource for usage and error information. +// API operation ListGroups for usage and error information. // // Returned Error Types: // * InternalServerException // An unknown internal error occurred. // -// * ResourceNotFoundException -// One of the specified resources was not found. -// // * ValidationException // A parameter could not be validated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource -func (c *Synthetics) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListGroups +func (c *Synthetics) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { + req, out := c.ListGroupsRequest(input) return out, req.Send() } -// TagResourceWithContext is the same as TagResource with the addition of +// ListGroupsWithContext is the same as ListGroups with the addition of // the ability to pass a context and additional request options. // -// See TagResource for details on how to use this API operation. +// See ListGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Synthetics) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +func (c *Synthetics) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { + req, out := c.ListGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUntagResource = "UntagResource" +// ListGroupsPages iterates over the pages of a ListGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListGroups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListGroups operation. +// pageNum := 0 +// err := client.ListGroupsPages(params, +// func(page *synthetics.ListGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Synthetics) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { + return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return +// ListGroupsPagesWithContext same as ListGroupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UntagResource for more information on using the UntagResource +// See ListTagsForResource for more information on using the ListTagsForResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource -func (c *Synthetics) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource +func (c *Synthetics) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "DELETE", + Name: opListTagsForResource, + HTTPMethod: "GET", HTTPPath: "/tags/{resourceArn}", } if input == nil { - input = &UntagResourceInput{} + input = &ListTagsForResourceInput{} } - output = &UntagResourceOutput{} + output = &ListTagsForResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UntagResource API operation for Synthetics. +// ListTagsForResource API operation for Synthetics. // -// Removes one or more tags from the specified canary. +// Displays the tags associated with a canary or group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Synthetics's -// API operation UntagResource for usage and error information. +// API operation ListTagsForResource for usage and error information. // // Returned Error Types: -// * InternalServerException -// An unknown internal error occurred. +// * BadRequestException +// The request was not valid. // -// * ResourceNotFoundException -// One of the specified resources was not found. +// * NotFoundException +// The specified resource was not found. // -// * ValidationException -// A parameter could not be validated. +// * TooManyRequestsException +// There were too many simultaneous requests. Try the operation again. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource -func (c *Synthetics) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +// * ConflictException +// A conflicting operation is already in progress. +// +// * InternalFailureException +// An internal failure occurred. Try the operation again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource +func (c *Synthetics) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) return out, req.Send() } -// UntagResourceWithContext is the same as UntagResource with the addition of +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of // the ability to pass a context and additional request options. // -// See UntagResource for details on how to use this API operation. +// See ListTagsForResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Synthetics) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +func (c *Synthetics) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateCanary = "UpdateCanary" +const opStartCanary = "StartCanary" -// UpdateCanaryRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCanary operation. The "output" return +// StartCanaryRequest generates a "aws/request.Request" representing the +// client's request for the StartCanary operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See UpdateCanary for more information on using the UpdateCanary +// See StartCanary for more information on using the StartCanary // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the UpdateCanaryRequest method. -// req, resp := client.UpdateCanaryRequest(params) +// // Example sending a request using the StartCanaryRequest method. +// req, resp := client.StartCanaryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary -func (c *Synthetics) UpdateCanaryRequest(input *UpdateCanaryInput) (req *request.Request, output *UpdateCanaryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary +func (c *Synthetics) StartCanaryRequest(input *StartCanaryInput) (req *request.Request, output *StartCanaryOutput) { op := &request.Operation{ - Name: opUpdateCanary, - HTTPMethod: "PATCH", - HTTPPath: "/canary/{name}", + Name: opStartCanary, + HTTPMethod: "POST", + HTTPPath: "/canary/{name}/start", } if input == nil { - input = &UpdateCanaryInput{} + input = &StartCanaryInput{} } - output = &UpdateCanaryOutput{} + output = &StartCanaryOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateCanary API operation for Synthetics. -// -// Use this operation to change the settings of a canary that has already been -// created. +// StartCanary API operation for Synthetics. // -// 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). +// 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). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Synthetics's -// API operation UpdateCanary for usage and error information. +// API operation StartCanary for usage and error information. // // Returned Error Types: // * InternalServerException @@ -1427,63 +1964,448 @@ func (c *Synthetics) UpdateCanaryRequest(input *UpdateCanaryInput) (req *request // * ConflictException // A conflicting operation is already in progress. // -// * RequestEntityTooLargeException -// One of the input resources is larger than is allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary -func (c *Synthetics) UpdateCanary(input *UpdateCanaryInput) (*UpdateCanaryOutput, error) { - req, out := c.UpdateCanaryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary +func (c *Synthetics) StartCanary(input *StartCanaryInput) (*StartCanaryOutput, error) { + req, out := c.StartCanaryRequest(input) return out, req.Send() } -// UpdateCanaryWithContext is the same as UpdateCanary with the addition of +// StartCanaryWithContext is the same as StartCanary with the addition of // the ability to pass a context and additional request options. // -// See UpdateCanary for details on how to use this API operation. +// See StartCanary for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Synthetics) UpdateCanaryWithContext(ctx aws.Context, input *UpdateCanaryInput, opts ...request.Option) (*UpdateCanaryOutput, error) { - req, out := c.UpdateCanaryRequest(input) +func (c *Synthetics) StartCanaryWithContext(ctx aws.Context, input *StartCanaryInput, opts ...request.Option) (*StartCanaryOutput, error) { + req, out := c.StartCanaryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// A structure that contains the configuration for canary artifacts, including -// the encryption-at-rest settings for artifacts that the canary uploads to -// Amazon S3. -type ArtifactConfigInput_ struct { - _ struct{} `type:"structure"` - - // A structure that contains the configuration of the encryption-at-rest settings - // for artifacts that the canary uploads to Amazon S3. Artifact encryption functionality - // is available only for canaries that use Synthetics runtime version syn-nodejs-puppeteer-3.3 - // or later. For more information, see Encrypting canary artifacts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_artifact_encryption.html) - S3Encryption *S3EncryptionConfig `type:"structure"` -} +const opStopCanary = "StopCanary" -// String returns the string representation. +// StopCanaryRequest generates a "aws/request.Request" representing the +// client's request for the StopCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. // -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ArtifactConfigInput_) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ArtifactConfigInput_) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. +// See StopCanary for more information on using the StopCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopCanaryRequest method. +// req, resp := client.StopCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary +func (c *Synthetics) StopCanaryRequest(input *StopCanaryInput) (req *request.Request, output *StopCanaryOutput) { + op := &request.Operation{ + Name: opStopCanary, + HTTPMethod: "POST", + HTTPPath: "/canary/{name}/stop", + } + + if input == nil { + input = &StopCanaryInput{} + } + + output = &StopCanaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopCanary API operation for Synthetics. +// +// Stops the canary to prevent all future runs. If the canary is currently running,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. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation StopCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary +func (c *Synthetics) StopCanary(input *StopCanaryInput) (*StopCanaryOutput, error) { + req, out := c.StopCanaryRequest(input) + return out, req.Send() +} + +// StopCanaryWithContext is the same as StopCanary with the addition of +// the ability to pass a context and additional request options. +// +// See StopCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) StopCanaryWithContext(ctx aws.Context, input *StopCanaryInput, opts ...request.Option) (*StopCanaryOutput, error) { + req, out := c.StopCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource +func (c *Synthetics) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Synthetics. +// +// Assigns one or more tags (key-value pairs) to the specified canary or group. +// +// 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 resource, this tag is appended to the +// list of tags associated with the resource. If you specify a tag key that +// is already associated with the resource, the new tag value that you specify +// replaces the previous value for that tag. +// +// You can associate as many as 50 tags with a canary or group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// The request was not valid. +// +// * NotFoundException +// The specified resource was not found. +// +// * TooManyRequestsException +// There were too many simultaneous requests. Try the operation again. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// * InternalFailureException +// An internal failure occurred. Try the operation again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource +func (c *Synthetics) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource +func (c *Synthetics) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Synthetics. +// +// Removes one or more tags from the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// The request was not valid. +// +// * NotFoundException +// The specified resource was not found. +// +// * TooManyRequestsException +// There were too many simultaneous requests. Try the operation again. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// * InternalFailureException +// An internal failure occurred. Try the operation again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource +func (c *Synthetics) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCanary = "UpdateCanary" + +// UpdateCanaryRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCanary operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCanary for more information on using the UpdateCanary +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCanaryRequest method. +// req, resp := client.UpdateCanaryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary +func (c *Synthetics) UpdateCanaryRequest(input *UpdateCanaryInput) (req *request.Request, output *UpdateCanaryOutput) { + op := &request.Operation{ + Name: opUpdateCanary, + HTTPMethod: "PATCH", + HTTPPath: "/canary/{name}", + } + + if input == nil { + input = &UpdateCanaryInput{} + } + + output = &UpdateCanaryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateCanary API operation for Synthetics. +// +// Updates the configuration 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). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Synthetics's +// API operation UpdateCanary for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// An unknown internal error occurred. +// +// * ValidationException +// A parameter could not be validated. +// +// * ResourceNotFoundException +// One of the specified resources was not found. +// +// * ConflictException +// A conflicting operation is already in progress. +// +// * RequestEntityTooLargeException +// One of the input resources is larger than is allowed. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary +func (c *Synthetics) UpdateCanary(input *UpdateCanaryInput) (*UpdateCanaryOutput, error) { + req, out := c.UpdateCanaryRequest(input) + return out, req.Send() +} + +// UpdateCanaryWithContext is the same as UpdateCanary with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCanary for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Synthetics) UpdateCanaryWithContext(ctx aws.Context, input *UpdateCanaryInput, opts ...request.Option) (*UpdateCanaryOutput, error) { + req, out := c.UpdateCanaryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A structure that contains the configuration for canary artifacts, including +// the encryption-at-rest settings for artifacts that the canary uploads to +// Amazon S3. +type ArtifactConfigInput_ struct { + _ struct{} `type:"structure"` + + // A structure that contains the configuration of the encryption-at-rest settings + // for artifacts that the canary uploads to Amazon S3. Artifact encryption functionality + // is available only for canaries that use Synthetics runtime version syn-nodejs-puppeteer-3.3 + // or later. For more information, see Encrypting canary artifacts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_artifact_encryption.html) + S3Encryption *S3EncryptionConfig `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ArtifactConfigInput_) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ArtifactConfigInput_) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. func (s *ArtifactConfigInput_) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ArtifactConfigInput_"} if s.S3Encryption != nil { @@ -1492,27 +2414,629 @@ func (s *ArtifactConfigInput_) Validate() error { } } - if invalidParams.Len() > 0 { - return invalidParams - } - return nil + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Encryption sets the S3Encryption field's value. +func (s *ArtifactConfigInput_) SetS3Encryption(v *S3EncryptionConfig) *ArtifactConfigInput_ { + s.S3Encryption = v + return s +} + +// A structure that contains the configuration for canary artifacts, including +// the encryption-at-rest settings for artifacts that the canary uploads to +// Amazon S3. +type ArtifactConfigOutput_ struct { + _ struct{} `type:"structure"` + + // A structure that contains the configuration of encryption settings for canary + // artifacts that are stored in Amazon S3. + S3Encryption *S3EncryptionConfig `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ArtifactConfigOutput_) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ArtifactConfigOutput_) GoString() string { + return s.String() +} + +// SetS3Encryption sets the S3Encryption field's value. +func (s *ArtifactConfigOutput_) SetS3Encryption(v *S3EncryptionConfig) *ArtifactConfigOutput_ { + s.S3Encryption = v + return s +} + +type AssociateResourceInput struct { + _ struct{} `type:"structure"` + + // Specifies the group. You can specify the group name, the ARN, or the group + // ID as the GroupIdentifier. + // + // GroupIdentifier is a required field + GroupIdentifier *string `location:"uri" locationName:"groupIdentifier" min:"1" type:"string" required:"true"` + + // The ARN of the canary that you want to associate with the specified group. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateResourceInput"} + if s.GroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIdentifier")) + } + if s.GroupIdentifier != nil && len(*s.GroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupIdentifier", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupIdentifier sets the GroupIdentifier field's value. +func (s *AssociateResourceInput) SetGroupIdentifier(v string) *AssociateResourceInput { + s.GroupIdentifier = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *AssociateResourceInput) SetResourceArn(v string) *AssociateResourceInput { + s.ResourceArn = &v + return s +} + +type AssociateResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateResourceOutput) GoString() string { + return s.String() +} + +// The request was not valid. +type BadRequestException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s BadRequestException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s BadRequestException) GoString() string { + return s.String() +} + +func newErrorBadRequestException(v protocol.ResponseMetadata) error { + return &BadRequestException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *BadRequestException) Code() string { + return "BadRequestException" +} + +// Message returns the exception's message. +func (s *BadRequestException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *BadRequestException) OrigErr() error { + return nil +} + +func (s *BadRequestException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *BadRequestException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *BadRequestException) RequestID() string { + return s.RespMetadata.RequestID +} + +// A structure representing a screenshot that is used as a baseline during visual +// monitoring comparisons made by the canary. +type BaseScreenshot struct { + _ struct{} `type:"structure"` + + // Coordinates that define the part of a screen to ignore during screenshot + // comparisons. To obtain the coordinates to use here, use the CloudWatch console + // to draw the boundaries on the screen. For more information, see Editing or + // deleting a canary (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/synthetics_canaries_deletion.html) + IgnoreCoordinates []*string `type:"list"` + + // The name of the screenshot. This is generated the first time the canary is + // run after the UpdateCanary operation that specified for this canary to perform + // visual monitoring. + // + // ScreenshotName is a required field + ScreenshotName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s BaseScreenshot) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s BaseScreenshot) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BaseScreenshot) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BaseScreenshot"} + if s.ScreenshotName == nil { + invalidParams.Add(request.NewErrParamRequired("ScreenshotName")) + } + if s.ScreenshotName != nil && len(*s.ScreenshotName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ScreenshotName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIgnoreCoordinates sets the IgnoreCoordinates field's value. +func (s *BaseScreenshot) SetIgnoreCoordinates(v []*string) *BaseScreenshot { + s.IgnoreCoordinates = v + return s +} + +// SetScreenshotName sets the ScreenshotName field's value. +func (s *BaseScreenshot) SetScreenshotName(v string) *BaseScreenshot { + s.ScreenshotName = &v + return s +} + +// This structure contains all information about one canary in your account. +type Canary struct { + _ struct{} `type:"structure"` + + // 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 *ArtifactConfigOutput_ `type:"structure"` + + // The location in Amazon S3 where Synthetics stores artifacts from the runs + // of this canary. Artifacts include the log file, screenshots, and HAR files. + ArtifactS3Location *string `min:"1" type:"string"` + + // This structure contains information about the canary's Lambda handler and + // where its code is stored by CloudWatch Synthetics. + Code *CanaryCodeOutput `type:"structure"` + + // The ARN of the Lambda function that is used as your canary's engine. For + // more information about Lambda ARN format, see Resources and Conditions for + // Lambda Actions (https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html). + EngineArn *string `min:"1" type:"string"` + + // The ARN of the IAM role used to run the canary. This role must include lambda.amazonaws.com + // as a principal in the trust policy. + ExecutionRoleArn *string `min:"1" type:"string"` + + // The number of days to retain data about failed runs of this canary. + FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // The unique ID of this canary. + Id *string `type:"string"` + + // The name of the canary. + Name *string `min:"1" type:"string"` + + // A structure that contains information about a canary run. + RunConfig *CanaryRunConfigOutput `type:"structure"` + + // Specifies the runtime version to use for the canary. 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 `min:"1" type:"string"` + + // A structure that contains information about how often the canary is to run, + // and when these runs are to stop. + Schedule *CanaryScheduleOutput `type:"structure"` + + // A structure that contains information about the canary's status. + Status *CanaryStatus `type:"structure"` + + // The number of days to retain data about successful runs of this canary. + SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` + + // The list of key-value pairs that are associated with the canary. + Tags map[string]*string `min:"1" type:"map"` + + // A structure that contains information about when the canary was created, + // modified, and most recently run. + Timeline *CanaryTimeline `type:"structure"` + + // If this canary performs visual monitoring by comparing screenshots, this + // structure contains the ID of the canary run to use as the baseline for screenshots, + // and the coordinates of any parts of the screen to ignore during the visual + // monitoring comparison. + VisualReference *VisualReferenceOutput_ `type:"structure"` + + // If this canary is to test an endpoint in a VPC, this structure contains information + // about the subnets 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 *VpcConfigOutput `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Canary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Canary) GoString() string { + return s.String() +} + +// SetArtifactConfig sets the ArtifactConfig field's value. +func (s *Canary) SetArtifactConfig(v *ArtifactConfigOutput_) *Canary { + s.ArtifactConfig = v + return s +} + +// SetArtifactS3Location sets the ArtifactS3Location field's value. +func (s *Canary) SetArtifactS3Location(v string) *Canary { + s.ArtifactS3Location = &v + return s +} + +// SetCode sets the Code field's value. +func (s *Canary) SetCode(v *CanaryCodeOutput) *Canary { + s.Code = v + return s +} + +// SetEngineArn sets the EngineArn field's value. +func (s *Canary) SetEngineArn(v string) *Canary { + s.EngineArn = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *Canary) SetExecutionRoleArn(v string) *Canary { + s.ExecutionRoleArn = &v + return s +} + +// SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. +func (s *Canary) SetFailureRetentionPeriodInDays(v int64) *Canary { + s.FailureRetentionPeriodInDays = &v + return s +} + +// SetId sets the Id field's value. +func (s *Canary) SetId(v string) *Canary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *Canary) SetName(v string) *Canary { + s.Name = &v + return s +} + +// SetRunConfig sets the RunConfig field's value. +func (s *Canary) SetRunConfig(v *CanaryRunConfigOutput) *Canary { + s.RunConfig = v + return s +} + +// SetRuntimeVersion sets the RuntimeVersion field's value. +func (s *Canary) SetRuntimeVersion(v string) *Canary { + s.RuntimeVersion = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *Canary) SetSchedule(v *CanaryScheduleOutput) *Canary { + s.Schedule = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Canary) SetStatus(v *CanaryStatus) *Canary { + s.Status = v + return s +} + +// SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. +func (s *Canary) SetSuccessRetentionPeriodInDays(v int64) *Canary { + s.SuccessRetentionPeriodInDays = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Canary) SetTags(v map[string]*string) *Canary { + s.Tags = v + return s +} + +// SetTimeline sets the Timeline field's value. +func (s *Canary) SetTimeline(v *CanaryTimeline) *Canary { + s.Timeline = v + return s +} + +// SetVisualReference sets the VisualReference field's value. +func (s *Canary) SetVisualReference(v *VisualReferenceOutput_) *Canary { + s.VisualReference = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *Canary) SetVpcConfig(v *VpcConfigOutput) *Canary { + s.VpcConfig = v + return s +} + +// Use this structure to input your script code for the canary. This structure +// contains the Lambda handler with the location where the canary should start +// running the script. If the script is stored in an S3 bucket, the bucket name, +// key, and version are also included. If the script was passed into the canary +// directly, the script code is contained in the value of Zipfile. +type CanaryCodeInput struct { + _ struct{} `type:"structure"` + + // The entry point to use for the source code when running the canary. For canaries + // that use the syn-python-selenium-1.0 runtime or a syn-nodejs.puppeteer runtime + // earlier than syn-nodejs.puppeteer-3.4, the handler must be specified as fileName.handler. + // For syn-python-selenium-1.1, syn-nodejs.puppeteer-3.4, and later runtimes, + // the handler can be specified as fileName.functionName , or you can specify + // a folder where canary scripts reside as folder/fileName.functionName . + // + // Handler is a required field + Handler *string `min:"1" type:"string" required:"true"` + + // If your canary script is located in S3, specify the bucket name here. Do + // not include s3:// as the start of the bucket name. + S3Bucket *string `min:"1" type:"string"` + + // The S3 key of your script. For more information, see Working with Amazon + // S3 Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html). + S3Key *string `min:"1" type:"string"` + + // The S3 version ID of your script. + S3Version *string `min:"1" type:"string"` + + // If you input your canary script directly into the canary instead of referring + // to an S3 location, the value of this parameter is the base64-encoded contents + // of the .zip file that contains the script. It must be smaller than 225 Kb. + // + // For large canary scripts, we recommend that you use an S3 location instead + // of inputting it directly with this parameter. + // ZipFile is automatically base64 encoded/decoded by the SDK. + ZipFile []byte `min:"1" type:"blob"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryCodeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryCodeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CanaryCodeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CanaryCodeInput"} + if s.Handler == nil { + invalidParams.Add(request.NewErrParamRequired("Handler")) + } + if s.Handler != nil && len(*s.Handler) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Handler", 1)) + } + if s.S3Bucket != nil && len(*s.S3Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 1)) + } + if s.S3Key != nil && len(*s.S3Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) + } + if s.S3Version != nil && len(*s.S3Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Version", 1)) + } + if s.ZipFile != nil && len(s.ZipFile) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ZipFile", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHandler sets the Handler field's value. +func (s *CanaryCodeInput) SetHandler(v string) *CanaryCodeInput { + s.Handler = &v + return s +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *CanaryCodeInput) SetS3Bucket(v string) *CanaryCodeInput { + s.S3Bucket = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *CanaryCodeInput) SetS3Key(v string) *CanaryCodeInput { + s.S3Key = &v + return s +} + +// SetS3Version sets the S3Version field's value. +func (s *CanaryCodeInput) SetS3Version(v string) *CanaryCodeInput { + s.S3Version = &v + return s +} + +// SetZipFile sets the ZipFile field's value. +func (s *CanaryCodeInput) SetZipFile(v []byte) *CanaryCodeInput { + s.ZipFile = v + return s +} + +// This structure contains information about the canary's Lambda handler and +// where its code is stored by CloudWatch Synthetics. +type CanaryCodeOutput struct { + _ struct{} `type:"structure"` + + // The entry point to use for the source code when running the canary. + Handler *string `min:"1" type:"string"` + + // The ARN of the Lambda layer where Synthetics stores the canary script code. + SourceLocationArn *string `min:"1" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryCodeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryCodeOutput) GoString() string { + return s.String() } -// SetS3Encryption sets the S3Encryption field's value. -func (s *ArtifactConfigInput_) SetS3Encryption(v *S3EncryptionConfig) *ArtifactConfigInput_ { - s.S3Encryption = v +// SetHandler sets the Handler field's value. +func (s *CanaryCodeOutput) SetHandler(v string) *CanaryCodeOutput { + s.Handler = &v return s } -// A structure that contains the configuration for canary artifacts, including -// the encryption-at-rest settings for artifacts that the canary uploads to -// Amazon S3. -type ArtifactConfigOutput_ struct { +// SetSourceLocationArn sets the SourceLocationArn field's value. +func (s *CanaryCodeOutput) SetSourceLocationArn(v string) *CanaryCodeOutput { + s.SourceLocationArn = &v + return s +} + +// This structure contains information about the most recent run of a single +// canary. +type CanaryLastRun struct { _ struct{} `type:"structure"` - // A structure that contains the configuration of encryption settings for canary - // artifacts that are stored in Amazon S3. - S3Encryption *S3EncryptionConfig `type:"structure"` + // The name of the canary. + CanaryName *string `min:"1" type:"string"` + + // The results from this canary's most recent run. + LastRun *CanaryRun `type:"structure"` } // String returns the string representation. @@ -1520,7 +3044,7 @@ type ArtifactConfigOutput_ struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ArtifactConfigOutput_) String() string { +func (s CanaryLastRun) String() string { return awsutil.Prettify(s) } @@ -1529,32 +3053,130 @@ func (s ArtifactConfigOutput_) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ArtifactConfigOutput_) GoString() string { +func (s CanaryLastRun) GoString() string { return s.String() } -// SetS3Encryption sets the S3Encryption field's value. -func (s *ArtifactConfigOutput_) SetS3Encryption(v *S3EncryptionConfig) *ArtifactConfigOutput_ { - s.S3Encryption = v +// SetCanaryName sets the CanaryName field's value. +func (s *CanaryLastRun) SetCanaryName(v string) *CanaryLastRun { + s.CanaryName = &v return s } -// A structure representing a screenshot that is used as a baseline during visual -// monitoring comparisons made by the canary. -type BaseScreenshot struct { +// SetLastRun sets the LastRun field's value. +func (s *CanaryLastRun) SetLastRun(v *CanaryRun) *CanaryLastRun { + s.LastRun = v + return s +} + +// This structure contains the details about one run of one canary. +type CanaryRun struct { _ struct{} `type:"structure"` - // Coordinates that define the part of a screen to ignore during screenshot - // comparisons. To obtain the coordinates to use here, use the CloudWatch Logs - // console to draw the boundaries on the screen. For more information, see {LINK} - IgnoreCoordinates []*string `type:"list"` + // The location where the canary stored artifacts from the run. Artifacts include + // the log file, screenshots, and HAR files. + ArtifactS3Location *string `min:"1" type:"string"` - // The name of the screenshot. This is generated the first time the canary is - // run after the UpdateCanary operation that specified for this canary to perform - // visual monitoring. + // A unique ID that identifies this canary run. + Id *string `type:"string"` + + // The name of the canary. + Name *string `min:"1" type:"string"` + + // The status of this run. + Status *CanaryRunStatus `type:"structure"` + + // A structure that contains the start and end times of this run. + Timeline *CanaryRunTimeline `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryRun) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryRun) GoString() string { + return s.String() +} + +// SetArtifactS3Location sets the ArtifactS3Location field's value. +func (s *CanaryRun) SetArtifactS3Location(v string) *CanaryRun { + s.ArtifactS3Location = &v + return s +} + +// SetId sets the Id field's value. +func (s *CanaryRun) SetId(v string) *CanaryRun { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *CanaryRun) SetName(v string) *CanaryRun { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CanaryRun) SetStatus(v *CanaryRunStatus) *CanaryRun { + s.Status = v + return s +} + +// SetTimeline sets the Timeline field's value. +func (s *CanaryRun) SetTimeline(v *CanaryRunTimeline) *CanaryRun { + s.Timeline = v + return s +} + +// A structure that contains input information for a canary run. +type CanaryRunConfigInput struct { + _ struct{} `type:"structure"` + + // Specifies whether this canary is to use active X-Ray tracing when it runs. + // Active tracing enables this canary run to be displayed in the ServiceLens + // and X-Ray service maps even if the canary does not hit an endpoint that has + // X-Ray tracing enabled. Using X-Ray tracing incurs charges. For more information, + // see Canaries and X-Ray tracing (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html). // - // ScreenshotName is a required field - ScreenshotName *string `min:"1" type:"string" required:"true"` + // You can enable active tracing only for canaries that use version syn-nodejs-2.0 + // or later for their canary runtime. + ActiveTracing *bool `type:"boolean"` + + // Specifies the keys and values to use for any environment variables used in + // the canary script. Use the following format: + // + // { "key1" : "value1", "key2" : "value2", ...} + // + // Keys must start with a letter and be at least two characters. The total size + // of your environment variables cannot exceed 4 KB. You can't specify any Lambda + // reserved environment variables as the keys for your environment variables. + // For more information about reserved keys, see Runtime environment variables + // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime). + // + // The environment variables keys and values are not encrypted. Do not store + // sensitive information in this field. + EnvironmentVariables map[string]*string `type:"map"` + + // The maximum amount of memory available to the canary while it is running, + // in MB. This value must be a multiple of 64. + MemoryInMB *int64 `min:"960" type:"integer"` + + // How long the canary is allowed to run before it must stop. You can't set + // this time to be longer than the frequency of the runs of this canary. + // + // If you omit this field, the frequency of the canary is used as this value, + // up to a maximum of 14 minutes. + TimeoutInSeconds *int64 `min:"3" type:"integer"` } // String returns the string representation. @@ -1562,7 +3184,7 @@ type BaseScreenshot struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s BaseScreenshot) String() string { +func (s CanaryRunConfigInput) String() string { return awsutil.Prettify(s) } @@ -1571,18 +3193,18 @@ func (s BaseScreenshot) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s BaseScreenshot) GoString() string { +func (s CanaryRunConfigInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *BaseScreenshot) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BaseScreenshot"} - if s.ScreenshotName == nil { - invalidParams.Add(request.NewErrParamRequired("ScreenshotName")) +func (s *CanaryRunConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CanaryRunConfigInput"} + if s.MemoryInMB != nil && *s.MemoryInMB < 960 { + invalidParams.Add(request.NewErrParamMinValue("MemoryInMB", 960)) } - if s.ScreenshotName != nil && len(*s.ScreenshotName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ScreenshotName", 1)) + if s.TimeoutInSeconds != nil && *s.TimeoutInSeconds < 3 { + invalidParams.Add(request.NewErrParamMinValue("TimeoutInSeconds", 3)) } if invalidParams.Len() > 0 { @@ -1591,87 +3213,94 @@ func (s *BaseScreenshot) Validate() error { return nil } -// SetIgnoreCoordinates sets the IgnoreCoordinates field's value. -func (s *BaseScreenshot) SetIgnoreCoordinates(v []*string) *BaseScreenshot { - s.IgnoreCoordinates = v +// SetActiveTracing sets the ActiveTracing field's value. +func (s *CanaryRunConfigInput) SetActiveTracing(v bool) *CanaryRunConfigInput { + s.ActiveTracing = &v return s } -// SetScreenshotName sets the ScreenshotName field's value. -func (s *BaseScreenshot) SetScreenshotName(v string) *BaseScreenshot { - s.ScreenshotName = &v +// SetEnvironmentVariables sets the EnvironmentVariables field's value. +func (s *CanaryRunConfigInput) SetEnvironmentVariables(v map[string]*string) *CanaryRunConfigInput { + s.EnvironmentVariables = v return s } -// This structure contains all information about one canary in your account. -type Canary struct { - _ struct{} `type:"structure"` - - // 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 *ArtifactConfigOutput_ `type:"structure"` - - // The location in Amazon S3 where Synthetics stores artifacts from the runs - // of this canary. Artifacts include the log file, screenshots, and HAR files. - ArtifactS3Location *string `min:"1" type:"string"` - - // This structure contains information about the canary's Lambda handler and - // where its code is stored by CloudWatch Synthetics. - Code *CanaryCodeOutput `type:"structure"` +// SetMemoryInMB sets the MemoryInMB field's value. +func (s *CanaryRunConfigInput) SetMemoryInMB(v int64) *CanaryRunConfigInput { + s.MemoryInMB = &v + return s +} - // The ARN of the Lambda function that is used as your canary's engine. For - // more information about Lambda ARN format, see Resources and Conditions for - // Lambda Actions (https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html). - EngineArn *string `min:"1" type:"string"` +// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. +func (s *CanaryRunConfigInput) SetTimeoutInSeconds(v int64) *CanaryRunConfigInput { + s.TimeoutInSeconds = &v + return s +} - // The ARN of the IAM role used to run the canary. This role must include lambda.amazonaws.com - // as a principal in the trust policy. - ExecutionRoleArn *string `min:"1" type:"string"` +// A structure that contains information about a canary run. +type CanaryRunConfigOutput struct { + _ struct{} `type:"structure"` - // The number of days to retain data about failed runs of this canary. - FailureRetentionPeriodInDays *int64 `min:"1" type:"integer"` + // Displays whether this canary run used active X-Ray tracing. + ActiveTracing *bool `type:"boolean"` - // The unique ID of this canary. - Id *string `type:"string"` + // The maximum amount of memory available to the canary while it is running, + // in MB. This value must be a multiple of 64. + MemoryInMB *int64 `min:"960" type:"integer"` - // The name of the canary. - Name *string `min:"1" type:"string"` + // How long the canary is allowed to run before it must stop. + TimeoutInSeconds *int64 `min:"3" type:"integer"` +} - // A structure that contains information about a canary run. - RunConfig *CanaryRunConfigOutput `type:"structure"` +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryRunConfigOutput) String() string { + return awsutil.Prettify(s) +} - // Specifies the runtime version to use for the canary. 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 `min:"1" type:"string"` +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryRunConfigOutput) GoString() string { + return s.String() +} - // A structure that contains information about how often the canary is to run, - // and when these runs are to stop. - Schedule *CanaryScheduleOutput `type:"structure"` +// SetActiveTracing sets the ActiveTracing field's value. +func (s *CanaryRunConfigOutput) SetActiveTracing(v bool) *CanaryRunConfigOutput { + s.ActiveTracing = &v + return s +} - // A structure that contains information about the canary's status. - Status *CanaryStatus `type:"structure"` +// SetMemoryInMB sets the MemoryInMB field's value. +func (s *CanaryRunConfigOutput) SetMemoryInMB(v int64) *CanaryRunConfigOutput { + s.MemoryInMB = &v + return s +} - // The number of days to retain data about successful runs of this canary. - SuccessRetentionPeriodInDays *int64 `min:"1" type:"integer"` +// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. +func (s *CanaryRunConfigOutput) SetTimeoutInSeconds(v int64) *CanaryRunConfigOutput { + s.TimeoutInSeconds = &v + return s +} - // The list of key-value pairs that are associated with the canary. - Tags map[string]*string `min:"1" type:"map"` +// This structure contains the status information about a canary run. +type CanaryRunStatus struct { + _ struct{} `type:"structure"` - // A structure that contains information about when the canary was created, - // modified, and most recently run. - Timeline *CanaryTimeline `type:"structure"` + // The current state of the run. + State *string `type:"string" enum:"CanaryRunState"` - // If this canary performs visual monitoring by comparing screenshots, this - // structure contains the ID of the canary run to use as the baseline for screenshots, - // and the coordinates of any parts of the screen to ignore during the visual - // monitoring comparison. - VisualReference *VisualReferenceOutput_ `type:"structure"` + // If run of the canary failed, this field contains the reason for the error. + StateReason *string `min:"1" type:"string"` - // If this canary is to test an endpoint in a VPC, this structure contains information - // about the subnets 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 *VpcConfigOutput `type:"structure"` + // If this value is CANARY_FAILURE, an exception occurred in the canary code. + // If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics. + StateReasonCode *string `type:"string" enum:"CanaryRunStateReasonCode"` } // String returns the string representation. @@ -1679,7 +3308,7 @@ type Canary struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Canary) String() string { +func (s CanaryRunStatus) String() string { return awsutil.Prettify(s) } @@ -1688,149 +3317,218 @@ func (s Canary) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s Canary) GoString() string { +func (s CanaryRunStatus) GoString() string { return s.String() } -// SetArtifactConfig sets the ArtifactConfig field's value. -func (s *Canary) SetArtifactConfig(v *ArtifactConfigOutput_) *Canary { - s.ArtifactConfig = v +// SetState sets the State field's value. +func (s *CanaryRunStatus) SetState(v string) *CanaryRunStatus { + s.State = &v return s } -// SetArtifactS3Location sets the ArtifactS3Location field's value. -func (s *Canary) SetArtifactS3Location(v string) *Canary { - s.ArtifactS3Location = &v +// SetStateReason sets the StateReason field's value. +func (s *CanaryRunStatus) SetStateReason(v string) *CanaryRunStatus { + s.StateReason = &v return s } -// SetCode sets the Code field's value. -func (s *Canary) SetCode(v *CanaryCodeOutput) *Canary { - s.Code = v +// SetStateReasonCode sets the StateReasonCode field's value. +func (s *CanaryRunStatus) SetStateReasonCode(v string) *CanaryRunStatus { + s.StateReasonCode = &v return s } -// SetEngineArn sets the EngineArn field's value. -func (s *Canary) SetEngineArn(v string) *Canary { - s.EngineArn = &v - return s +// This structure contains the start and end times of a single canary run. +type CanaryRunTimeline struct { + _ struct{} `type:"structure"` + + // The end time of the run. + Completed *time.Time `type:"timestamp"` + + // The start time of the run. + Started *time.Time `type:"timestamp"` } -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *Canary) SetExecutionRoleArn(v string) *Canary { - s.ExecutionRoleArn = &v - return s +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryRunTimeline) String() string { + return awsutil.Prettify(s) } -// SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. -func (s *Canary) SetFailureRetentionPeriodInDays(v int64) *Canary { - s.FailureRetentionPeriodInDays = &v - return s +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryRunTimeline) GoString() string { + return s.String() } -// SetId sets the Id field's value. -func (s *Canary) SetId(v string) *Canary { - s.Id = &v +// SetCompleted sets the Completed field's value. +func (s *CanaryRunTimeline) SetCompleted(v time.Time) *CanaryRunTimeline { + s.Completed = &v return s } -// SetName sets the Name field's value. -func (s *Canary) SetName(v string) *Canary { - s.Name = &v +// SetStarted sets the Started field's value. +func (s *CanaryRunTimeline) SetStarted(v time.Time) *CanaryRunTimeline { + s.Started = &v return s } -// SetRunConfig sets the RunConfig field's value. -func (s *Canary) SetRunConfig(v *CanaryRunConfigOutput) *Canary { - s.RunConfig = v - return s +// This structure specifies how often a canary is to make runs and the date +// and time when it should stop making runs. +type CanaryScheduleInput struct { + _ struct{} `type:"structure"` + + // How long, in seconds, for the canary to continue making regular runs according + // to the schedule in the Expression value. If you specify 0, the canary continues + // making runs until you stop it. If you omit this field, the default of 0 is + // used. + DurationInSeconds *int64 `type:"long"` + + // A rate expression or a cron expression that defines how often the canary + // is to run. + // + // For a rate expression, The syntax is rate(number unit). unit can be minute, + // minutes, or hour. + // + // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) + // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. + // You can specify a frequency between rate(1 minute) and rate(1 hour). + // + // Specifying rate(0 minute) or rate(0 hour) is a special value that causes + // the canary to run only once when it is started. + // + // Use cron(expression) to specify a cron expression. You can't schedule a canary + // to wait for more than a year before running. For information about the syntax + // for cron expressions, see Scheduling canary runs using cron (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html). + // + // Expression is a required field + Expression *string `min:"1" type:"string" required:"true"` } -// SetRuntimeVersion sets the RuntimeVersion field's value. -func (s *Canary) SetRuntimeVersion(v string) *Canary { - s.RuntimeVersion = &v - return s +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryScheduleInput) String() string { + return awsutil.Prettify(s) } -// SetSchedule sets the Schedule field's value. -func (s *Canary) SetSchedule(v *CanaryScheduleOutput) *Canary { - s.Schedule = v - return s +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryScheduleInput) GoString() string { + return s.String() } -// SetStatus sets the Status field's value. -func (s *Canary) SetStatus(v *CanaryStatus) *Canary { - s.Status = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CanaryScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CanaryScheduleInput"} + if s.Expression == nil { + invalidParams.Add(request.NewErrParamRequired("Expression")) + } + if s.Expression != nil && len(*s.Expression) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. -func (s *Canary) SetSuccessRetentionPeriodInDays(v int64) *Canary { - s.SuccessRetentionPeriodInDays = &v +// SetDurationInSeconds sets the DurationInSeconds field's value. +func (s *CanaryScheduleInput) SetDurationInSeconds(v int64) *CanaryScheduleInput { + s.DurationInSeconds = &v return s } -// SetTags sets the Tags field's value. -func (s *Canary) SetTags(v map[string]*string) *Canary { - s.Tags = v +// SetExpression sets the Expression field's value. +func (s *CanaryScheduleInput) SetExpression(v string) *CanaryScheduleInput { + s.Expression = &v return s } -// SetTimeline sets the Timeline field's value. -func (s *Canary) SetTimeline(v *CanaryTimeline) *Canary { - s.Timeline = v - return s +// How long, in seconds, for the canary to continue making regular runs according +// to the schedule in the Expression value. +type CanaryScheduleOutput struct { + _ struct{} `type:"structure"` + + // How long, in seconds, for the canary to continue making regular runs after + // it was created. The runs are performed according to the schedule in the Expression + // value. + DurationInSeconds *int64 `type:"long"` + + // A rate expression or a cron expression that defines how often the canary + // is to run. + // + // For a rate expression, The syntax is rate(number unit). unit can be minute, + // minutes, or hour. + // + // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) + // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. + // You can specify a frequency between rate(1 minute) and rate(1 hour). + // + // Specifying rate(0 minute) or rate(0 hour) is a special value that causes + // the canary to run only once when it is started. + // + // Use cron(expression) to specify a cron expression. For information about + // the syntax for cron expressions, see Scheduling canary runs using cron (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html). + Expression *string `min:"1" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CanaryScheduleOutput) GoString() string { + return s.String() } -// SetVisualReference sets the VisualReference field's value. -func (s *Canary) SetVisualReference(v *VisualReferenceOutput_) *Canary { - s.VisualReference = v +// SetDurationInSeconds sets the DurationInSeconds field's value. +func (s *CanaryScheduleOutput) SetDurationInSeconds(v int64) *CanaryScheduleOutput { + s.DurationInSeconds = &v return s } -// SetVpcConfig sets the VpcConfig field's value. -func (s *Canary) SetVpcConfig(v *VpcConfigOutput) *Canary { - s.VpcConfig = v +// SetExpression sets the Expression field's value. +func (s *CanaryScheduleOutput) SetExpression(v string) *CanaryScheduleOutput { + s.Expression = &v return s } -// Use this structure to input your script code for the canary. This structure -// contains the Lambda handler with the location where the canary should start -// running the script. If the script is stored in an S3 bucket, the bucket name, -// key, and version are also included. If the script was passed into the canary -// directly, the script code is contained in the value of Zipfile. -type CanaryCodeInput struct { +// A structure that contains the current state of the canary. +type CanaryStatus struct { _ struct{} `type:"structure"` - // The entry point to use for the source code when running the canary. For canaries - // that use the syn-python-selenium-1.0 runtime or a syn-nodejs.puppeteer runtime - // earlier than syn-nodejs.puppeteer-3.4, the handler must be specified as fileName.handler. - // For syn-python-selenium-1.1, syn-nodejs.puppeteer-3.4, and later runtimes, - // the handler can be specified as fileName.functionName , or you can specify - // a folder where canary scripts reside as folder/fileName.functionName . - // - // Handler is a required field - Handler *string `min:"1" type:"string" required:"true"` - - // If your canary script is located in S3, specify the bucket name here. Do - // not include s3:// as the start of the bucket name. - S3Bucket *string `min:"1" type:"string"` - - // The S3 key of your script. For more information, see Working with Amazon - // S3 Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html). - S3Key *string `min:"1" type:"string"` + // The current state of the canary. + State *string `type:"string" enum:"CanaryState"` - // The S3 version ID of your script. - S3Version *string `min:"1" type:"string"` + // If the canary has insufficient permissions to run, this field provides more + // details. + StateReason *string `min:"1" type:"string"` - // If you input your canary script directly into the canary instead of referring - // to an S3 location, the value of this parameter is the base64-encoded contents - // of the .zip file that contains the script. It must be smaller than 225 Kb. - // - // For large canary scripts, we recommend that you use an S3 location instead - // of inputting it directly with this parameter. - // ZipFile is automatically base64 encoded/decoded by the SDK. - ZipFile []byte `min:"1" type:"blob"` + // If the canary cannot run or has failed, this field displays the reason. + StateReasonCode *string `type:"string" enum:"CanaryStateReasonCode"` } // String returns the string representation. @@ -1838,7 +3536,7 @@ type CanaryCodeInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryCodeInput) String() string { +func (s CanaryStatus) String() string { return awsutil.Prettify(s) } @@ -1847,78 +3545,44 @@ func (s CanaryCodeInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryCodeInput) GoString() string { +func (s CanaryStatus) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CanaryCodeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CanaryCodeInput"} - if s.Handler == nil { - invalidParams.Add(request.NewErrParamRequired("Handler")) - } - if s.Handler != nil && len(*s.Handler) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Handler", 1)) - } - if s.S3Bucket != nil && len(*s.S3Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 1)) - } - if s.S3Key != nil && len(*s.S3Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) - } - if s.S3Version != nil && len(*s.S3Version) < 1 { - invalidParams.Add(request.NewErrParamMinLen("S3Version", 1)) - } - if s.ZipFile != nil && len(s.ZipFile) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ZipFile", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHandler sets the Handler field's value. -func (s *CanaryCodeInput) SetHandler(v string) *CanaryCodeInput { - s.Handler = &v +// SetState sets the State field's value. +func (s *CanaryStatus) SetState(v string) *CanaryStatus { + s.State = &v return s } -// SetS3Bucket sets the S3Bucket field's value. -func (s *CanaryCodeInput) SetS3Bucket(v string) *CanaryCodeInput { - s.S3Bucket = &v +// SetStateReason sets the StateReason field's value. +func (s *CanaryStatus) SetStateReason(v string) *CanaryStatus { + s.StateReason = &v return s } -// SetS3Key sets the S3Key field's value. -func (s *CanaryCodeInput) SetS3Key(v string) *CanaryCodeInput { - s.S3Key = &v +// SetStateReasonCode sets the StateReasonCode field's value. +func (s *CanaryStatus) SetStateReasonCode(v string) *CanaryStatus { + s.StateReasonCode = &v return s } -// SetS3Version sets the S3Version field's value. -func (s *CanaryCodeInput) SetS3Version(v string) *CanaryCodeInput { - s.S3Version = &v - return s -} +// This structure contains information about when the canary was created and +// modified. +type CanaryTimeline struct { + _ struct{} `type:"structure"` -// SetZipFile sets the ZipFile field's value. -func (s *CanaryCodeInput) SetZipFile(v []byte) *CanaryCodeInput { - s.ZipFile = v - return s -} + // The date and time the canary was created. + Created *time.Time `type:"timestamp"` -// This structure contains information about the canary's Lambda handler and -// where its code is stored by CloudWatch Synthetics. -type CanaryCodeOutput struct { - _ struct{} `type:"structure"` + // The date and time the canary was most recently modified. + LastModified *time.Time `type:"timestamp"` - // The entry point to use for the source code when running the canary. - Handler *string `min:"1" type:"string"` + // The date and time that the canary's most recent run started. + LastStarted *time.Time `type:"timestamp"` - // The ARN of the Lambda layer where Synthetics stores the canary script code. - SourceLocationArn *string `min:"1" type:"string"` + // The date and time that the canary's most recent run ended. + LastStopped *time.Time `type:"timestamp"` } // String returns the string representation. @@ -1926,7 +3590,7 @@ type CanaryCodeOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryCodeOutput) String() string { +func (s CanaryTimeline) String() string { return awsutil.Prettify(s) } @@ -1935,32 +3599,40 @@ func (s CanaryCodeOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryCodeOutput) GoString() string { +func (s CanaryTimeline) GoString() string { return s.String() } -// SetHandler sets the Handler field's value. -func (s *CanaryCodeOutput) SetHandler(v string) *CanaryCodeOutput { - s.Handler = &v +// SetCreated sets the Created field's value. +func (s *CanaryTimeline) SetCreated(v time.Time) *CanaryTimeline { + s.Created = &v return s } -// SetSourceLocationArn sets the SourceLocationArn field's value. -func (s *CanaryCodeOutput) SetSourceLocationArn(v string) *CanaryCodeOutput { - s.SourceLocationArn = &v +// SetLastModified sets the LastModified field's value. +func (s *CanaryTimeline) SetLastModified(v time.Time) *CanaryTimeline { + s.LastModified = &v return s } -// This structure contains information about the most recent run of a single -// canary. -type CanaryLastRun struct { - _ struct{} `type:"structure"` +// SetLastStarted sets the LastStarted field's value. +func (s *CanaryTimeline) SetLastStarted(v time.Time) *CanaryTimeline { + s.LastStarted = &v + return s +} - // The name of the canary. - CanaryName *string `min:"1" type:"string"` +// SetLastStopped sets the LastStopped field's value. +func (s *CanaryTimeline) SetLastStopped(v time.Time) *CanaryTimeline { + s.LastStopped = &v + return s +} - // The results from this canary's most recent run. - LastRun *CanaryRun `type:"structure"` +// A conflicting operation is already in progress. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. @@ -1968,7 +3640,7 @@ type CanaryLastRun struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryLastRun) String() string { +func (s ConflictException) String() string { return awsutil.Prettify(s) } @@ -1977,41 +3649,144 @@ func (s CanaryLastRun) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryLastRun) GoString() string { +func (s ConflictException) GoString() string { return s.String() } -// SetCanaryName sets the CanaryName field's value. -func (s *CanaryLastRun) SetCanaryName(v string) *CanaryLastRun { - s.CanaryName = &v - return s -} +func newErrorConflictException(v protocol.ResponseMetadata) error { + return &ConflictException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s *ConflictException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ConflictException) OrigErr() error { + return nil +} + +func (s *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + +type CreateCanaryInput struct { + _ struct{} `type:"structure"` + + // 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 *ArtifactConfigInput_ `type:"structure"` + + // 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 is a required field + ArtifactS3Location *string `min:"1" type:"string" required:"true"` + + // 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 is a required field + Code *CanaryCodeInput `type:"structure" required:"true"` + + // 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 + // + // ExecutionRoleArn is a required field + ExecutionRoleArn *string `min:"1" type:"string" required:"true"` + + // 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 *int64 `min:"1" type:"integer"` -// SetLastRun sets the LastRun field's value. -func (s *CanaryLastRun) SetLastRun(v *CanaryRun) *CanaryLastRun { - s.LastRun = v - return s -} + // 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). + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` -// This structure contains the details about one run of one canary. -type CanaryRun struct { - _ struct{} `type:"structure"` + // A structure that contains the configuration for individual canary runs, such + // as timeout value and environment variables. + // + // The environment variables keys and values are not encrypted. Do not store + // sensitive information in this field. + RunConfig *CanaryRunConfigInput `type:"structure"` - // The location where the canary stored artifacts from the run. Artifacts include - // the log file, screenshots, and HAR files. - ArtifactS3Location *string `min:"1" type:"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). + // + // RuntimeVersion is a required field + RuntimeVersion *string `min:"1" type:"string" required:"true"` - // A unique ID that identifies this canary run. - Id *string `type:"string"` + // A structure that contains information about how often the canary is to run + // and when these test runs are to stop. + // + // Schedule is a required field + Schedule *CanaryScheduleInput `type:"structure" required:"true"` - // The name of the canary. - Name *string `min:"1" type:"string"` + // 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 *int64 `min:"1" type:"integer"` - // The status of this run. - Status *CanaryRunStatus `type:"structure"` + // 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 `min:"1" type:"map"` - // A structure that contains the start and end times of this run. - Timeline *CanaryRunTimeline `type:"structure"` + // 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 *VpcConfigInput `type:"structure"` } // String returns the string representation. @@ -2019,7 +3794,7 @@ type CanaryRun struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRun) String() string { +func (s CreateCanaryInput) String() string { return awsutil.Prettify(s) } @@ -2028,149 +3803,156 @@ func (s CanaryRun) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRun) GoString() string { +func (s CreateCanaryInput) GoString() string { return s.String() } -// SetArtifactS3Location sets the ArtifactS3Location field's value. -func (s *CanaryRun) SetArtifactS3Location(v string) *CanaryRun { - s.ArtifactS3Location = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCanaryInput"} + if s.ArtifactS3Location == nil { + invalidParams.Add(request.NewErrParamRequired("ArtifactS3Location")) + } + if s.ArtifactS3Location != nil && len(*s.ArtifactS3Location) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ArtifactS3Location", 1)) + } + if s.Code == nil { + invalidParams.Add(request.NewErrParamRequired("Code")) + } + if s.ExecutionRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) + } + if s.ExecutionRoleArn != nil && len(*s.ExecutionRoleArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleArn", 1)) + } + if s.FailureRetentionPeriodInDays != nil && *s.FailureRetentionPeriodInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("FailureRetentionPeriodInDays", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RuntimeVersion == nil { + invalidParams.Add(request.NewErrParamRequired("RuntimeVersion")) + } + if s.RuntimeVersion != nil && len(*s.RuntimeVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuntimeVersion", 1)) + } + if s.Schedule == nil { + invalidParams.Add(request.NewErrParamRequired("Schedule")) + } + if s.SuccessRetentionPeriodInDays != nil && *s.SuccessRetentionPeriodInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("SuccessRetentionPeriodInDays", 1)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.ArtifactConfig != nil { + if err := s.ArtifactConfig.Validate(); err != nil { + invalidParams.AddNested("ArtifactConfig", err.(request.ErrInvalidParams)) + } + } + if s.Code != nil { + if err := s.Code.Validate(); err != nil { + invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) + } + } + if s.RunConfig != nil { + if err := s.RunConfig.Validate(); err != nil { + invalidParams.AddNested("RunConfig", err.(request.ErrInvalidParams)) + } + } + if s.Schedule != nil { + if err := s.Schedule.Validate(); err != nil { + invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetId sets the Id field's value. -func (s *CanaryRun) SetId(v string) *CanaryRun { - s.Id = &v +// SetArtifactConfig sets the ArtifactConfig field's value. +func (s *CreateCanaryInput) SetArtifactConfig(v *ArtifactConfigInput_) *CreateCanaryInput { + s.ArtifactConfig = v return s } -// SetName sets the Name field's value. -func (s *CanaryRun) SetName(v string) *CanaryRun { - s.Name = &v +// SetArtifactS3Location sets the ArtifactS3Location field's value. +func (s *CreateCanaryInput) SetArtifactS3Location(v string) *CreateCanaryInput { + s.ArtifactS3Location = &v return s } -// SetStatus sets the Status field's value. -func (s *CanaryRun) SetStatus(v *CanaryRunStatus) *CanaryRun { - s.Status = v +// SetCode sets the Code field's value. +func (s *CreateCanaryInput) SetCode(v *CanaryCodeInput) *CreateCanaryInput { + s.Code = v return s } -// SetTimeline sets the Timeline field's value. -func (s *CanaryRun) SetTimeline(v *CanaryRunTimeline) *CanaryRun { - s.Timeline = v +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *CreateCanaryInput) SetExecutionRoleArn(v string) *CreateCanaryInput { + s.ExecutionRoleArn = &v return s } -// A structure that contains input information for a canary run. -type CanaryRunConfigInput struct { - _ struct{} `type:"structure"` - - // Specifies whether this canary is to use active X-Ray tracing when it runs. - // Active tracing enables this canary run to be displayed in the ServiceLens - // and X-Ray service maps even if the canary does not hit an endpoint that has - // X-Ray tracing enabled. Using X-Ray tracing incurs charges. For more information, - // see Canaries and X-Ray tracing (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_tracing.html). - // - // You can enable active tracing only for canaries that use version syn-nodejs-2.0 - // or later for their canary runtime. - ActiveTracing *bool `type:"boolean"` - - // Specifies the keys and values to use for any environment variables used in - // the canary script. Use the following format: - // - // { "key1" : "value1", "key2" : "value2", ...} - // - // Keys must start with a letter and be at least two characters. The total size - // of your environment variables cannot exceed 4 KB. You can't specify any Lambda - // reserved environment variables as the keys for your environment variables. - // For more information about reserved keys, see Runtime environment variables - // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime). - EnvironmentVariables map[string]*string `type:"map"` - - // The maximum amount of memory available to the canary while it is running, - // in MB. This value must be a multiple of 64. - MemoryInMB *int64 `min:"960" type:"integer"` - - // How long the canary is allowed to run before it must stop. You can't set - // this time to be longer than the frequency of the runs of this canary. - // - // If you omit this field, the frequency of the canary is used as this value, - // up to a maximum of 14 minutes. - TimeoutInSeconds *int64 `min:"3" type:"integer"` +// SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. +func (s *CreateCanaryInput) SetFailureRetentionPeriodInDays(v int64) *CreateCanaryInput { + s.FailureRetentionPeriodInDays = &v + return s } -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CanaryRunConfigInput) String() string { - return awsutil.Prettify(s) +// SetName sets the Name field's value. +func (s *CreateCanaryInput) SetName(v string) *CreateCanaryInput { + s.Name = &v + return s } -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CanaryRunConfigInput) GoString() string { - return s.String() +// SetRunConfig sets the RunConfig field's value. +func (s *CreateCanaryInput) SetRunConfig(v *CanaryRunConfigInput) *CreateCanaryInput { + s.RunConfig = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CanaryRunConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CanaryRunConfigInput"} - if s.MemoryInMB != nil && *s.MemoryInMB < 960 { - invalidParams.Add(request.NewErrParamMinValue("MemoryInMB", 960)) - } - if s.TimeoutInSeconds != nil && *s.TimeoutInSeconds < 3 { - invalidParams.Add(request.NewErrParamMinValue("TimeoutInSeconds", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetRuntimeVersion sets the RuntimeVersion field's value. +func (s *CreateCanaryInput) SetRuntimeVersion(v string) *CreateCanaryInput { + s.RuntimeVersion = &v + return s } -// SetActiveTracing sets the ActiveTracing field's value. -func (s *CanaryRunConfigInput) SetActiveTracing(v bool) *CanaryRunConfigInput { - s.ActiveTracing = &v +// SetSchedule sets the Schedule field's value. +func (s *CreateCanaryInput) SetSchedule(v *CanaryScheduleInput) *CreateCanaryInput { + s.Schedule = v return s } -// SetEnvironmentVariables sets the EnvironmentVariables field's value. -func (s *CanaryRunConfigInput) SetEnvironmentVariables(v map[string]*string) *CanaryRunConfigInput { - s.EnvironmentVariables = v +// SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. +func (s *CreateCanaryInput) SetSuccessRetentionPeriodInDays(v int64) *CreateCanaryInput { + s.SuccessRetentionPeriodInDays = &v return s } -// SetMemoryInMB sets the MemoryInMB field's value. -func (s *CanaryRunConfigInput) SetMemoryInMB(v int64) *CanaryRunConfigInput { - s.MemoryInMB = &v +// SetTags sets the Tags field's value. +func (s *CreateCanaryInput) SetTags(v map[string]*string) *CreateCanaryInput { + s.Tags = v return s } -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *CanaryRunConfigInput) SetTimeoutInSeconds(v int64) *CanaryRunConfigInput { - s.TimeoutInSeconds = &v +// SetVpcConfig sets the VpcConfig field's value. +func (s *CreateCanaryInput) SetVpcConfig(v *VpcConfigInput) *CreateCanaryInput { + s.VpcConfig = v return s } -// A structure that contains information about a canary run. -type CanaryRunConfigOutput struct { +type CreateCanaryOutput struct { _ struct{} `type:"structure"` - // Displays whether this canary run used active X-Ray tracing. - ActiveTracing *bool `type:"boolean"` - - // The maximum amount of memory available to the canary while it is running, - // in MB. This value must be a multiple of 64. - MemoryInMB *int64 `min:"960" type:"integer"` - - // How long the canary is allowed to run before it must stop. - TimeoutInSeconds *int64 `min:"3" type:"integer"` + // The full details about the canary you have created. + Canary *Canary `type:"structure"` } // String returns the string representation. @@ -2178,7 +3960,7 @@ type CanaryRunConfigOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRunConfigOutput) String() string { +func (s CreateCanaryOutput) String() string { return awsutil.Prettify(s) } @@ -2187,41 +3969,33 @@ func (s CanaryRunConfigOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRunConfigOutput) GoString() string { +func (s CreateCanaryOutput) GoString() string { return s.String() } -// SetActiveTracing sets the ActiveTracing field's value. -func (s *CanaryRunConfigOutput) SetActiveTracing(v bool) *CanaryRunConfigOutput { - s.ActiveTracing = &v - return s -} - -// SetMemoryInMB sets the MemoryInMB field's value. -func (s *CanaryRunConfigOutput) SetMemoryInMB(v int64) *CanaryRunConfigOutput { - s.MemoryInMB = &v - return s -} - -// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. -func (s *CanaryRunConfigOutput) SetTimeoutInSeconds(v int64) *CanaryRunConfigOutput { - s.TimeoutInSeconds = &v +// SetCanary sets the Canary field's value. +func (s *CreateCanaryOutput) SetCanary(v *Canary) *CreateCanaryOutput { + s.Canary = v return s } -// This structure contains the status information about a canary run. -type CanaryRunStatus struct { +type CreateGroupInput struct { _ struct{} `type:"structure"` - // The current state of the run. - State *string `type:"string" enum:"CanaryRunState"` - - // If run of the canary failed, this field contains the reason for the error. - StateReason *string `min:"1" type:"string"` + // The name for the group. It can include any Unicode characters. + // + // The names for all groups in your account, across all Regions, must be unique. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` - // If this value is CANARY_FAILURE, an exception occurred in the canary code. - // If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics. - StateReasonCode *string `type:"string" enum:"CanaryRunStateReasonCode"` + // A list of key-value pairs to associate with the group. You can associate + // as many as 50 tags with a group. + // + // 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 `min:"1" type:"map"` } // String returns the string representation. @@ -2229,7 +4003,7 @@ type CanaryRunStatus struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRunStatus) String() string { +func (s CreateGroupInput) String() string { return awsutil.Prettify(s) } @@ -2238,37 +4012,46 @@ func (s CanaryRunStatus) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRunStatus) GoString() string { +func (s CreateGroupInput) GoString() string { return s.String() } -// SetState sets the State field's value. -func (s *CanaryRunStatus) SetState(v string) *CanaryRunStatus { - s.State = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetStateReason sets the StateReason field's value. -func (s *CanaryRunStatus) SetStateReason(v string) *CanaryRunStatus { - s.StateReason = &v +// SetName sets the Name field's value. +func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { + s.Name = &v return s } -// SetStateReasonCode sets the StateReasonCode field's value. -func (s *CanaryRunStatus) SetStateReasonCode(v string) *CanaryRunStatus { - s.StateReasonCode = &v +// SetTags sets the Tags field's value. +func (s *CreateGroupInput) SetTags(v map[string]*string) *CreateGroupInput { + s.Tags = v return s } -// This structure contains the start and end times of a single canary run. -type CanaryRunTimeline struct { +type CreateGroupOutput struct { _ struct{} `type:"structure"` - // The end time of the run. - Completed *time.Time `type:"timestamp"` - - // The start time of the run. - Started *time.Time `type:"timestamp"` + // A structure that contains information about the group that was just created. + Group *Group `type:"structure"` } // String returns the string representation. @@ -2276,7 +4059,7 @@ type CanaryRunTimeline struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRunTimeline) String() string { +func (s CreateGroupOutput) String() string { return awsutil.Prettify(s) } @@ -2285,52 +4068,30 @@ func (s CanaryRunTimeline) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryRunTimeline) GoString() string { +func (s CreateGroupOutput) GoString() string { return s.String() } -// SetCompleted sets the Completed field's value. -func (s *CanaryRunTimeline) SetCompleted(v time.Time) *CanaryRunTimeline { - s.Completed = &v - return s -} - -// SetStarted sets the Started field's value. -func (s *CanaryRunTimeline) SetStarted(v time.Time) *CanaryRunTimeline { - s.Started = &v +// SetGroup sets the Group field's value. +func (s *CreateGroupOutput) SetGroup(v *Group) *CreateGroupOutput { + s.Group = v return s } -// This structure specifies how often a canary is to make runs and the date -// and time when it should stop making runs. -type CanaryScheduleInput struct { - _ struct{} `type:"structure"` - - // How long, in seconds, for the canary to continue making regular runs according - // to the schedule in the Expression value. If you specify 0, the canary continues - // making runs until you stop it. If you omit this field, the default of 0 is - // used. - DurationInSeconds *int64 `type:"long"` +type DeleteCanaryInput struct { + _ struct{} `type:"structure" nopayload:"true"` - // A rate expression or a cron expression that defines how often the canary - // is to run. - // - // For a rate expression, The syntax is rate(number unit). unit can be minute, - // minutes, or hour. - // - // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) - // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. - // You can specify a frequency between rate(1 minute) and rate(1 hour). - // - // Specifying rate(0 minute) or rate(0 hour) is a special value that causes - // the canary to run only once when it is started. + // Specifies whether to also delete the Lambda functions and layers used by + // this canary. The default is false. // - // Use cron(expression) to specify a cron expression. You can't schedule a canary - // to wait for more than a year before running. For information about the syntax - // for cron expressions, see Scheduling canary runs using cron (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html). + // Type: Boolean + DeleteLambda *bool `location:"querystring" locationName:"deleteLambda" type:"boolean"` + + // 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). // - // Expression is a required field - Expression *string `min:"1" type:"string" required:"true"` + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -2338,7 +4099,7 @@ type CanaryScheduleInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryScheduleInput) String() string { +func (s DeleteCanaryInput) String() string { return awsutil.Prettify(s) } @@ -2347,18 +4108,18 @@ func (s CanaryScheduleInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryScheduleInput) GoString() string { +func (s DeleteCanaryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CanaryScheduleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CanaryScheduleInput"} - if s.Expression == nil { - invalidParams.Add(request.NewErrParamRequired("Expression")) +func (s *DeleteCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCanaryInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.Expression != nil && len(*s.Expression) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Expression", 1)) + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { @@ -2367,44 +4128,92 @@ func (s *CanaryScheduleInput) Validate() error { return nil } -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *CanaryScheduleInput) SetDurationInSeconds(v int64) *CanaryScheduleInput { - s.DurationInSeconds = &v +// SetDeleteLambda sets the DeleteLambda field's value. +func (s *DeleteCanaryInput) SetDeleteLambda(v bool) *DeleteCanaryInput { + s.DeleteLambda = &v return s } -// SetExpression sets the Expression field's value. -func (s *CanaryScheduleInput) SetExpression(v string) *CanaryScheduleInput { - s.Expression = &v +// SetName sets the Name field's value. +func (s *DeleteCanaryInput) SetName(v string) *DeleteCanaryInput { + s.Name = &v return s } -// How long, in seconds, for the canary to continue making regular runs according -// to the schedule in the Expression value. -type CanaryScheduleOutput struct { +type DeleteCanaryOutput struct { _ struct{} `type:"structure"` +} - // How long, in seconds, for the canary to continue making regular runs after - // it was created. The runs are performed according to the schedule in the Expression - // value. - DurationInSeconds *int64 `type:"long"` +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteCanaryOutput) String() string { + return awsutil.Prettify(s) +} - // A rate expression or a cron expression that defines how often the canary - // is to run. - // - // For a rate expression, The syntax is rate(number unit). unit can be minute, - // minutes, or hour. - // - // For example, rate(1 minute) runs the canary once a minute, rate(10 minutes) - // runs it once every 10 minutes, and rate(1 hour) runs it once every hour. - // You can specify a frequency between rate(1 minute) and rate(1 hour). - // - // Specifying rate(0 minute) or rate(0 hour) is a special value that causes - // the canary to run only once when it is started. +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteCanaryOutput) GoString() string { + return s.String() +} + +type DeleteGroupInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Specifies which group to delete. You can specify the group name, the ARN, + // or the group ID as the GroupIdentifier. // - // Use cron(expression) to specify a cron expression. For information about - // the syntax for cron expressions, see Scheduling canary runs using cron (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_cron.html). - Expression *string `min:"1" type:"string"` + // GroupIdentifier is a required field + GroupIdentifier *string `location:"uri" locationName:"groupIdentifier" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} + if s.GroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIdentifier")) + } + if s.GroupIdentifier != nil && len(*s.GroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupIdentifier sets the GroupIdentifier field's value. +func (s *DeleteGroupInput) SetGroupIdentifier(v string) *DeleteGroupInput { + s.GroupIdentifier = &v + return s +} + +type DeleteGroupOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation. @@ -2412,7 +4221,7 @@ type CanaryScheduleOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryScheduleOutput) String() string { +func (s DeleteGroupOutput) String() string { return awsutil.Prettify(s) } @@ -2421,35 +4230,35 @@ func (s CanaryScheduleOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryScheduleOutput) GoString() string { +func (s DeleteGroupOutput) GoString() string { return s.String() } -// SetDurationInSeconds sets the DurationInSeconds field's value. -func (s *CanaryScheduleOutput) SetDurationInSeconds(v int64) *CanaryScheduleOutput { - s.DurationInSeconds = &v - return s -} - -// SetExpression sets the Expression field's value. -func (s *CanaryScheduleOutput) SetExpression(v string) *CanaryScheduleOutput { - s.Expression = &v - return s -} - -// A structure that contains the current state of the canary. -type CanaryStatus struct { +type DescribeCanariesInput struct { _ struct{} `type:"structure"` - // The current state of the canary. - State *string `type:"string" enum:"CanaryState"` + // 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 *int64 `min:"1" type:"integer"` - // If the canary has insufficient permissions to run, this field provides more - // details. - StateReason *string `min:"1" type:"string"` + // Use this parameter to return only canaries that match the names that you + // specify here. You can specify as many as five canary names. + // + // If you specify this parameter, the operation is successful only if you have + // authorization to view all the canaries that you specify in your request. + // If you do not have permission to view any of the canaries, the request fails + // with a 403 response. + // + // You are required to use this parameter if you are logged on to a user or + // role that has an IAM policy that restricts which canaries that you are allowed + // to view. For more information, see Limiting a user to viewing specific canaries + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html). + Names []*string `min:"1" type:"list"` - // If the canary cannot run or has failed, this field displays the reason. - StateReasonCode *string `type:"string" enum:"CanaryStateReasonCode"` + // 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 `min:"4" type:"string"` } // String returns the string representation. @@ -2457,7 +4266,7 @@ type CanaryStatus struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryStatus) String() string { +func (s DescribeCanariesInput) String() string { return awsutil.Prettify(s) } @@ -2466,44 +4275,73 @@ func (s CanaryStatus) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryStatus) GoString() string { +func (s DescribeCanariesInput) GoString() string { return s.String() } -// SetState sets the State field's value. -func (s *CanaryStatus) SetState(v string) *CanaryStatus { - s.State = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCanariesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Names != nil && len(s.Names) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Names", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeCanariesInput) SetMaxResults(v int64) *DescribeCanariesInput { + s.MaxResults = &v return s } -// SetStateReason sets the StateReason field's value. -func (s *CanaryStatus) SetStateReason(v string) *CanaryStatus { - s.StateReason = &v +// SetNames sets the Names field's value. +func (s *DescribeCanariesInput) SetNames(v []*string) *DescribeCanariesInput { + s.Names = v return s } -// SetStateReasonCode sets the StateReasonCode field's value. -func (s *CanaryStatus) SetStateReasonCode(v string) *CanaryStatus { - s.StateReasonCode = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesInput) SetNextToken(v string) *DescribeCanariesInput { + s.NextToken = &v return s } -// This structure contains information about when the canary was created and -// modified. -type CanaryTimeline struct { +type DescribeCanariesLastRunInput struct { _ struct{} `type:"structure"` - // The date and time the canary was created. - Created *time.Time `type:"timestamp"` - - // The date and time the canary was most recently modified. - LastModified *time.Time `type:"timestamp"` + // 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 *int64 `min:"1" type:"integer"` - // The date and time that the canary's most recent run started. - LastStarted *time.Time `type:"timestamp"` + // Use this parameter to return only canaries that match the names that you + // specify here. You can specify as many as five canary names. + // + // If you specify this parameter, the operation is successful only if you have + // authorization to view all the canaries that you specify in your request. + // If you do not have permission to view any of the canaries, the request fails + // with a 403 response. + // + // You are required to use the Names parameter if you are logged on to a user + // or role that has an IAM policy that restricts which canaries that you are + // allowed to view. For more information, see Limiting a user to viewing specific + // canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html). + Names []*string `min:"1" type:"list"` - // The date and time that the canary's most recent run ended. - LastStopped *time.Time `type:"timestamp"` + // 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 `min:"4" type:"string"` } // String returns the string representation. @@ -2511,7 +4349,7 @@ type CanaryTimeline struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryTimeline) String() string { +func (s DescribeCanariesLastRunInput) String() string { return awsutil.Prettify(s) } @@ -2520,40 +4358,57 @@ func (s CanaryTimeline) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CanaryTimeline) GoString() string { +func (s DescribeCanariesLastRunInput) GoString() string { return s.String() } -// SetCreated sets the Created field's value. -func (s *CanaryTimeline) SetCreated(v time.Time) *CanaryTimeline { - s.Created = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCanariesLastRunInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesLastRunInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Names != nil && len(s.Names) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Names", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetLastModified sets the LastModified field's value. -func (s *CanaryTimeline) SetLastModified(v time.Time) *CanaryTimeline { - s.LastModified = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeCanariesLastRunInput) SetMaxResults(v int64) *DescribeCanariesLastRunInput { + s.MaxResults = &v return s } -// SetLastStarted sets the LastStarted field's value. -func (s *CanaryTimeline) SetLastStarted(v time.Time) *CanaryTimeline { - s.LastStarted = &v +// SetNames sets the Names field's value. +func (s *DescribeCanariesLastRunInput) SetNames(v []*string) *DescribeCanariesLastRunInput { + s.Names = v return s } -// SetLastStopped sets the LastStopped field's value. -func (s *CanaryTimeline) SetLastStopped(v time.Time) *CanaryTimeline { - s.LastStopped = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesLastRunInput) SetNextToken(v string) *DescribeCanariesLastRunInput { + s.NextToken = &v return s } -// A conflicting operation is already in progress. -type ConflictException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` +type DescribeCanariesLastRunOutput struct { + _ struct{} `type:"structure"` - Message_ *string `locationName:"Message" type:"string"` + // An array that contains the information from the most recent run of each canary. + CanariesLastRun []*CanaryLastRun `type:"list"` + + // 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 `min:"4" type:"string"` } // String returns the string representation. @@ -2561,7 +4416,7 @@ type ConflictException struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ConflictException) String() string { +func (s DescribeCanariesLastRunOutput) String() string { return awsutil.Prettify(s) } @@ -2570,141 +4425,77 @@ func (s ConflictException) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s ConflictException) GoString() string { +func (s DescribeCanariesLastRunOutput) GoString() string { return s.String() } -func newErrorConflictException(v protocol.ResponseMetadata) error { - return &ConflictException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ConflictException) Code() string { - return "ConflictException" -} - -// Message returns the exception's message. -func (s *ConflictException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ConflictException) OrigErr() error { - return nil -} - -func (s *ConflictException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ConflictException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ConflictException) RequestID() string { - return s.RespMetadata.RequestID +// SetCanariesLastRun sets the CanariesLastRun field's value. +func (s *DescribeCanariesLastRunOutput) SetCanariesLastRun(v []*CanaryLastRun) *DescribeCanariesLastRunOutput { + s.CanariesLastRun = v + return s } -type CreateCanaryInput struct { - _ struct{} `type:"structure"` - - // 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 *ArtifactConfigInput_ `type:"structure"` - - // 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 is a required field - ArtifactS3Location *string `min:"1" type:"string" required:"true"` - - // 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 is a required field - Code *CanaryCodeInput `type:"structure" required:"true"` +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesLastRunOutput) SetNextToken(v string) *DescribeCanariesLastRunOutput { + s.NextToken = &v + return s +} - // 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 - // - // ExecutionRoleArn is a required field - ExecutionRoleArn *string `min:"1" type:"string" required:"true"` +type DescribeCanariesOutput struct { + _ struct{} `type:"structure"` - // 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 *int64 `min:"1" type:"integer"` + // Returns an array. Each item in the array contains the full information about + // one canary. + Canaries []*Canary `type:"list"` - // 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). - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` + // 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 `min:"4" type:"string"` +} - // A structure that contains the configuration for individual canary runs, such - // as timeout value. - RunConfig *CanaryRunConfigInput `type:"structure"` +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeCanariesOutput) String() string { + return awsutil.Prettify(s) +} - // 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). - // - // RuntimeVersion is a required field - RuntimeVersion *string `min:"1" type:"string" required:"true"` +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeCanariesOutput) GoString() string { + return s.String() +} - // A structure that contains information about how often the canary is to run - // and when these test runs are to stop. - // - // Schedule is a required field - Schedule *CanaryScheduleInput `type:"structure" required:"true"` +// SetCanaries sets the Canaries field's value. +func (s *DescribeCanariesOutput) SetCanaries(v []*Canary) *DescribeCanariesOutput { + s.Canaries = v + return s +} - // 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 *int64 `min:"1" type:"integer"` +// SetNextToken sets the NextToken field's value. +func (s *DescribeCanariesOutput) SetNextToken(v string) *DescribeCanariesOutput { + s.NextToken = &v + return s +} - // 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 `min:"1" type:"map"` +type DescribeRuntimeVersionsInput struct { + _ struct{} `type:"structure"` - // 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 *VpcConfigInput `type:"structure"` + // 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 *int64 `min:"1" type:"integer"` + + // 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 `min:"4" type:"string"` } // String returns the string representation. @@ -2712,7 +4503,7 @@ type CreateCanaryInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateCanaryInput) String() string { +func (s DescribeRuntimeVersionsInput) String() string { return awsutil.Prettify(s) } @@ -2721,71 +4512,18 @@ func (s CreateCanaryInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateCanaryInput) GoString() string { +func (s DescribeRuntimeVersionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCanaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCanaryInput"} - if s.ArtifactS3Location == nil { - invalidParams.Add(request.NewErrParamRequired("ArtifactS3Location")) - } - if s.ArtifactS3Location != nil && len(*s.ArtifactS3Location) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ArtifactS3Location", 1)) - } - if s.Code == nil { - invalidParams.Add(request.NewErrParamRequired("Code")) - } - if s.ExecutionRoleArn == nil { - invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) - } - if s.ExecutionRoleArn != nil && len(*s.ExecutionRoleArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleArn", 1)) - } - if s.FailureRetentionPeriodInDays != nil && *s.FailureRetentionPeriodInDays < 1 { - invalidParams.Add(request.NewErrParamMinValue("FailureRetentionPeriodInDays", 1)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.RuntimeVersion == nil { - invalidParams.Add(request.NewErrParamRequired("RuntimeVersion")) - } - if s.RuntimeVersion != nil && len(*s.RuntimeVersion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RuntimeVersion", 1)) - } - if s.Schedule == nil { - invalidParams.Add(request.NewErrParamRequired("Schedule")) - } - if s.SuccessRetentionPeriodInDays != nil && *s.SuccessRetentionPeriodInDays < 1 { - invalidParams.Add(request.NewErrParamMinValue("SuccessRetentionPeriodInDays", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.ArtifactConfig != nil { - if err := s.ArtifactConfig.Validate(); err != nil { - invalidParams.AddNested("ArtifactConfig", err.(request.ErrInvalidParams)) - } - } - if s.Code != nil { - if err := s.Code.Validate(); err != nil { - invalidParams.AddNested("Code", err.(request.ErrInvalidParams)) - } - } - if s.RunConfig != nil { - if err := s.RunConfig.Validate(); err != nil { - invalidParams.AddNested("RunConfig", err.(request.ErrInvalidParams)) - } +func (s *DescribeRuntimeVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRuntimeVersionsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } - if s.Schedule != nil { - if err := s.Schedule.Validate(); err != nil { - invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) - } + if s.NextToken != nil && len(*s.NextToken) < 4 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) } if invalidParams.Len() > 0 { @@ -2794,83 +4532,130 @@ func (s *CreateCanaryInput) Validate() error { return nil } -// SetArtifactConfig sets the ArtifactConfig field's value. -func (s *CreateCanaryInput) SetArtifactConfig(v *ArtifactConfigInput_) *CreateCanaryInput { - s.ArtifactConfig = v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeRuntimeVersionsInput) SetMaxResults(v int64) *DescribeRuntimeVersionsInput { + s.MaxResults = &v return s } -// SetArtifactS3Location sets the ArtifactS3Location field's value. -func (s *CreateCanaryInput) SetArtifactS3Location(v string) *CreateCanaryInput { - s.ArtifactS3Location = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeRuntimeVersionsInput) SetNextToken(v string) *DescribeRuntimeVersionsInput { + s.NextToken = &v return s } -// SetCode sets the Code field's value. -func (s *CreateCanaryInput) SetCode(v *CanaryCodeInput) *CreateCanaryInput { - s.Code = v - return s +type DescribeRuntimeVersionsOutput struct { + _ struct{} `type:"structure"` + + // 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 `min:"4" type:"string"` + + // An array of objects that display the details about each Synthetics canary + // runtime version. + RuntimeVersions []*RuntimeVersion `type:"list"` } -// SetExecutionRoleArn sets the ExecutionRoleArn field's value. -func (s *CreateCanaryInput) SetExecutionRoleArn(v string) *CreateCanaryInput { - s.ExecutionRoleArn = &v - return s +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeRuntimeVersionsOutput) String() string { + return awsutil.Prettify(s) } -// SetFailureRetentionPeriodInDays sets the FailureRetentionPeriodInDays field's value. -func (s *CreateCanaryInput) SetFailureRetentionPeriodInDays(v int64) *CreateCanaryInput { - s.FailureRetentionPeriodInDays = &v - return s +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DescribeRuntimeVersionsOutput) GoString() string { + return s.String() } -// SetName sets the Name field's value. -func (s *CreateCanaryInput) SetName(v string) *CreateCanaryInput { - s.Name = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeRuntimeVersionsOutput) SetNextToken(v string) *DescribeRuntimeVersionsOutput { + s.NextToken = &v return s } -// SetRunConfig sets the RunConfig field's value. -func (s *CreateCanaryInput) SetRunConfig(v *CanaryRunConfigInput) *CreateCanaryInput { - s.RunConfig = v +// SetRuntimeVersions sets the RuntimeVersions field's value. +func (s *DescribeRuntimeVersionsOutput) SetRuntimeVersions(v []*RuntimeVersion) *DescribeRuntimeVersionsOutput { + s.RuntimeVersions = v return s } -// SetRuntimeVersion sets the RuntimeVersion field's value. -func (s *CreateCanaryInput) SetRuntimeVersion(v string) *CreateCanaryInput { - s.RuntimeVersion = &v - return s +type DisassociateResourceInput struct { + _ struct{} `type:"structure"` + + // Specifies the group. You can specify the group name, the ARN, or the group + // ID as the GroupIdentifier. + // + // GroupIdentifier is a required field + GroupIdentifier *string `location:"uri" locationName:"groupIdentifier" min:"1" type:"string" required:"true"` + + // The ARN of the canary that you want to remove from the specified group. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateResourceInput) GoString() string { + return s.String() } -// SetSchedule sets the Schedule field's value. -func (s *CreateCanaryInput) SetSchedule(v *CanaryScheduleInput) *CreateCanaryInput { - s.Schedule = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateResourceInput"} + if s.GroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIdentifier")) + } + if s.GroupIdentifier != nil && len(*s.GroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupIdentifier", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } -// SetSuccessRetentionPeriodInDays sets the SuccessRetentionPeriodInDays field's value. -func (s *CreateCanaryInput) SetSuccessRetentionPeriodInDays(v int64) *CreateCanaryInput { - s.SuccessRetentionPeriodInDays = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetTags sets the Tags field's value. -func (s *CreateCanaryInput) SetTags(v map[string]*string) *CreateCanaryInput { - s.Tags = v +// SetGroupIdentifier sets the GroupIdentifier field's value. +func (s *DisassociateResourceInput) SetGroupIdentifier(v string) *DisassociateResourceInput { + s.GroupIdentifier = &v return s } -// SetVpcConfig sets the VpcConfig field's value. -func (s *CreateCanaryInput) SetVpcConfig(v *VpcConfigInput) *CreateCanaryInput { - s.VpcConfig = v +// SetResourceArn sets the ResourceArn field's value. +func (s *DisassociateResourceInput) SetResourceArn(v string) *DisassociateResourceInput { + s.ResourceArn = &v return s } -type CreateCanaryOutput struct { +type DisassociateResourceOutput struct { _ struct{} `type:"structure"` - - // The full details about the canary you have created. - Canary *Canary `type:"structure"` } // String returns the string representation. @@ -2878,7 +4663,7 @@ type CreateCanaryOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateCanaryOutput) String() string { +func (s DisassociateResourceOutput) String() string { return awsutil.Prettify(s) } @@ -2887,27 +4672,14 @@ func (s CreateCanaryOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s CreateCanaryOutput) GoString() string { +func (s DisassociateResourceOutput) GoString() string { return s.String() } -// SetCanary sets the Canary field's value. -func (s *CreateCanaryOutput) SetCanary(v *Canary) *CreateCanaryOutput { - s.Canary = v - return s -} - -type DeleteCanaryInput struct { +type GetCanaryInput struct { _ struct{} `type:"structure" nopayload:"true"` - // Specifies whether to also delete the Lambda functions and layers used by - // this canary. The default is false. - // - // Type: Boolean - DeleteLambda *bool `location:"querystring" locationName:"deleteLambda" type:"boolean"` - - // 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). + // The name of the canary that you want details for. // // Name is a required field Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` @@ -2918,7 +4690,7 @@ type DeleteCanaryInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteCanaryInput) String() string { +func (s GetCanaryInput) String() string { return awsutil.Prettify(s) } @@ -2927,13 +4699,13 @@ func (s DeleteCanaryInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteCanaryInput) GoString() string { +func (s GetCanaryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCanaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCanaryInput"} +func (s *GetCanaryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCanaryInput"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -2947,20 +4719,17 @@ func (s *DeleteCanaryInput) Validate() error { return nil } -// SetDeleteLambda sets the DeleteLambda field's value. -func (s *DeleteCanaryInput) SetDeleteLambda(v bool) *DeleteCanaryInput { - s.DeleteLambda = &v - return s -} - // SetName sets the Name field's value. -func (s *DeleteCanaryInput) SetName(v string) *DeleteCanaryInput { +func (s *GetCanaryInput) SetName(v string) *GetCanaryInput { s.Name = &v return s } -type DeleteCanaryOutput struct { +type GetCanaryOutput struct { _ struct{} `type:"structure"` + + // A structure that contains the full information about the canary. + Canary *Canary `type:"structure"` } // String returns the string representation. @@ -2968,7 +4737,7 @@ type DeleteCanaryOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteCanaryOutput) String() string { +func (s GetCanaryOutput) String() string { return awsutil.Prettify(s) } @@ -2977,34 +4746,32 @@ func (s DeleteCanaryOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DeleteCanaryOutput) GoString() string { +func (s GetCanaryOutput) GoString() string { return s.String() } -type DescribeCanariesInput struct { +// SetCanary sets the Canary field's value. +func (s *GetCanaryOutput) SetCanary(v *Canary) *GetCanaryOutput { + s.Canary = v + return s +} + +type GetCanaryRunsInput struct { _ struct{} `type:"structure"` - // Specify this parameter to limit how many canaries are returned each time - // you use the DescribeCanaries operation. If you omit this parameter, the default + // 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 *int64 `min:"1" type:"integer"` - // Use this parameter to return only canaries that match the names that you - // specify here. You can specify as many as five canary names. - // - // If you specify this parameter, the operation is successful only if you have - // authorization to view all the canaries that you specify in your request. - // If you do not have permission to view any of the canaries, the request fails - // with a 403 response. + // The name of the canary that you want to see runs for. // - // You are required to use this parameter if you are logged on to a user or - // role that has an IAM policy that restricts which canaries that you are allowed - // to view. For more information, see Limiting a user to viewing specific canaries - // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html). - Names []*string `min:"1" type:"list"` + // Name is a required field + Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` // 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. + // token in a subsequent GetCanaryRuns operation to retrieve the next set of + // results. NextToken *string `min:"4" type:"string"` } @@ -3013,7 +4780,7 @@ type DescribeCanariesInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesInput) String() string { +func (s GetCanaryRunsInput) String() string { return awsutil.Prettify(s) } @@ -3022,18 +4789,21 @@ func (s DescribeCanariesInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesInput) GoString() string { +func (s GetCanaryRunsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCanariesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesInput"} +func (s *GetCanaryRunsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCanaryRunsInput"} if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } - if s.Names != nil && len(s.Names) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Names", 1)) + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.NextToken != nil && len(*s.NextToken) < 4 { invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) @@ -3046,48 +4816,33 @@ func (s *DescribeCanariesInput) Validate() error { } // SetMaxResults sets the MaxResults field's value. -func (s *DescribeCanariesInput) SetMaxResults(v int64) *DescribeCanariesInput { +func (s *GetCanaryRunsInput) SetMaxResults(v int64) *GetCanaryRunsInput { s.MaxResults = &v return s } -// SetNames sets the Names field's value. -func (s *DescribeCanariesInput) SetNames(v []*string) *DescribeCanariesInput { - s.Names = v +// SetName sets the Name field's value. +func (s *GetCanaryRunsInput) SetName(v string) *GetCanaryRunsInput { + s.Name = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeCanariesInput) SetNextToken(v string) *DescribeCanariesInput { +func (s *GetCanaryRunsInput) SetNextToken(v string) *GetCanaryRunsInput { s.NextToken = &v return s } -type DescribeCanariesLastRunInput struct { +type GetCanaryRunsOutput struct { _ struct{} `type:"structure"` - // 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 *int64 `min:"1" type:"integer"` - - // Use this parameter to return only canaries that match the names that you - // specify here. You can specify as many as five canary names. - // - // If you specify this parameter, the operation is successful only if you have - // authorization to view all the canaries that you specify in your request. - // If you do not have permission to view any of the canaries, the request fails - // with a 403 response. - // - // You are required to use the Names parameter if you are logged on to a user - // or role that has an IAM policy that restricts which canaries that you are - // allowed to view. For more information, see Limiting a user to viewing specific - // canaries (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Restricted.html). - Names []*string `min:"1" type:"list"` + // An array of structures. Each structure contains the details of one of the + // retrieved canary runs. + CanaryRuns []*CanaryRun `type:"list"` // 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. + // token in a subsequent GetCanaryRuns operation to retrieve the next set of + // results. NextToken *string `min:"4" type:"string"` } @@ -3096,7 +4851,7 @@ type DescribeCanariesLastRunInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesLastRunInput) String() string { +func (s GetCanaryRunsOutput) String() string { return awsutil.Prettify(s) } @@ -3105,21 +4860,58 @@ func (s DescribeCanariesLastRunInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesLastRunInput) GoString() string { +func (s GetCanaryRunsOutput) GoString() string { + return s.String() +} + +// SetCanaryRuns sets the CanaryRuns field's value. +func (s *GetCanaryRunsOutput) SetCanaryRuns(v []*CanaryRun) *GetCanaryRunsOutput { + s.CanaryRuns = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCanaryRunsOutput) SetNextToken(v string) *GetCanaryRunsOutput { + s.NextToken = &v + return s +} + +type GetGroupInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Specifies the group to return information for. You can specify the group + // name, the ARN, or the group ID as the GroupIdentifier. + // + // GroupIdentifier is a required field + GroupIdentifier *string `location:"uri" locationName:"groupIdentifier" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeCanariesLastRunInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeCanariesLastRunInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.Names != nil && len(s.Names) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Names", 1)) +func (s *GetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"} + if s.GroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIdentifier")) } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + if s.GroupIdentifier != nil && len(*s.GroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupIdentifier", 1)) } if invalidParams.Len() > 0 { @@ -3128,34 +4920,64 @@ func (s *DescribeCanariesLastRunInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeCanariesLastRunInput) SetMaxResults(v int64) *DescribeCanariesLastRunInput { - s.MaxResults = &v +// SetGroupIdentifier sets the GroupIdentifier field's value. +func (s *GetGroupInput) SetGroupIdentifier(v string) *GetGroupInput { + s.GroupIdentifier = &v return s } -// SetNames sets the Names field's value. -func (s *DescribeCanariesLastRunInput) SetNames(v []*string) *DescribeCanariesLastRunInput { - s.Names = v - return s +type GetGroupOutput struct { + _ struct{} `type:"structure"` + + // A structure that contains information about the group. + Group *Group `type:"structure"` } -// SetNextToken sets the NextToken field's value. -func (s *DescribeCanariesLastRunInput) SetNextToken(v string) *DescribeCanariesLastRunInput { - s.NextToken = &v +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetGroupOutput) GoString() string { + return s.String() +} + +// SetGroup sets the Group field's value. +func (s *GetGroupOutput) SetGroup(v *Group) *GetGroupOutput { + s.Group = v return s } -type DescribeCanariesLastRunOutput struct { +// This structure contains information about one group. +type Group struct { _ struct{} `type:"structure"` - // An array that contains the information from the most recent run of each canary. - CanariesLastRun []*CanaryLastRun `type:"list"` + // The ARN of the group. + Arn *string `min:"1" type:"string"` - // 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 `min:"4" type:"string"` + // The date and time that the group was created. + CreatedTime *time.Time `type:"timestamp"` + + // The unique ID of the group. + Id *string `min:"1" type:"string"` + + // The date and time that the group was most recently updated. + LastModifiedTime *time.Time `type:"timestamp"` + + // The name of the group. + Name *string `min:"1" type:"string"` + + // The list of key-value pairs that are associated with the canary. + Tags map[string]*string `min:"1" type:"map"` } // String returns the string representation. @@ -3163,7 +4985,7 @@ type DescribeCanariesLastRunOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesLastRunOutput) String() string { +func (s Group) String() string { return awsutil.Prettify(s) } @@ -3172,33 +4994,58 @@ func (s DescribeCanariesLastRunOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesLastRunOutput) GoString() string { +func (s Group) GoString() string { return s.String() } -// SetCanariesLastRun sets the CanariesLastRun field's value. -func (s *DescribeCanariesLastRunOutput) SetCanariesLastRun(v []*CanaryLastRun) *DescribeCanariesLastRunOutput { - s.CanariesLastRun = v +// SetArn sets the Arn field's value. +func (s *Group) SetArn(v string) *Group { + s.Arn = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeCanariesLastRunOutput) SetNextToken(v string) *DescribeCanariesLastRunOutput { - s.NextToken = &v +// SetCreatedTime sets the CreatedTime field's value. +func (s *Group) SetCreatedTime(v time.Time) *Group { + s.CreatedTime = &v return s } -type DescribeCanariesOutput struct { +// SetId sets the Id field's value. +func (s *Group) SetId(v string) *Group { + s.Id = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *Group) SetLastModifiedTime(v time.Time) *Group { + s.LastModifiedTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *Group) SetName(v string) *Group { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Group) SetTags(v map[string]*string) *Group { + s.Tags = v + return s +} + +// A structure containing some information about a group. +type GroupSummary struct { _ struct{} `type:"structure"` - // Returns an array. Each item in the array contains the full information about - // one canary. - Canaries []*Canary `type:"list"` + // The ARN of the group. + Arn *string `min:"1" type:"string"` - // 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 `min:"4" type:"string"` + // The unique ID of the group. + Id *string `min:"1" type:"string"` + + // The name of the group. + Name *string `min:"1" type:"string"` } // String returns the string representation. @@ -3206,7 +5053,7 @@ type DescribeCanariesOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesOutput) String() string { +func (s GroupSummary) String() string { return awsutil.Prettify(s) } @@ -3215,34 +5062,34 @@ func (s DescribeCanariesOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeCanariesOutput) GoString() string { +func (s GroupSummary) GoString() string { return s.String() } -// SetCanaries sets the Canaries field's value. -func (s *DescribeCanariesOutput) SetCanaries(v []*Canary) *DescribeCanariesOutput { - s.Canaries = v +// SetArn sets the Arn field's value. +func (s *GroupSummary) SetArn(v string) *GroupSummary { + s.Arn = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeCanariesOutput) SetNextToken(v string) *DescribeCanariesOutput { - s.NextToken = &v +// SetId sets the Id field's value. +func (s *GroupSummary) SetId(v string) *GroupSummary { + s.Id = &v return s } -type DescribeRuntimeVersionsInput struct { - _ struct{} `type:"structure"` +// SetName sets the Name field's value. +func (s *GroupSummary) SetName(v string) *GroupSummary { + s.Name = &v + return s +} - // 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 *int64 `min:"1" type:"integer"` +// An internal failure occurred. Try the operation again. +type InternalFailureException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - // 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 `min:"4" type:"string"` + Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. @@ -3250,7 +5097,7 @@ type DescribeRuntimeVersionsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeRuntimeVersionsInput) String() string { +func (s InternalFailureException) String() string { return awsutil.Prettify(s) } @@ -3259,49 +5106,54 @@ func (s DescribeRuntimeVersionsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeRuntimeVersionsInput) GoString() string { +func (s InternalFailureException) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRuntimeVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRuntimeVersionsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) +func newErrorInternalFailureException(v protocol.ResponseMetadata) error { + return &InternalFailureException{ + RespMetadata: v, } +} - if invalidParams.Len() > 0 { - return invalidParams +// Code returns the exception type name. +func (s *InternalFailureException) Code() string { + return "InternalFailureException" +} + +// Message returns the exception's message. +func (s *InternalFailureException) Message() string { + if s.Message_ != nil { + return *s.Message_ } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalFailureException) OrigErr() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeRuntimeVersionsInput) SetMaxResults(v int64) *DescribeRuntimeVersionsInput { - s.MaxResults = &v - return s +func (s *InternalFailureException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) } -// SetNextToken sets the NextToken field's value. -func (s *DescribeRuntimeVersionsInput) SetNextToken(v string) *DescribeRuntimeVersionsInput { - s.NextToken = &v - return s +// Status code returns the HTTP status code for the request's response error. +func (s *InternalFailureException) StatusCode() int { + return s.RespMetadata.StatusCode } -type DescribeRuntimeVersionsOutput struct { - _ struct{} `type:"structure"` +// RequestID returns the service's response RequestID for request. +func (s *InternalFailureException) RequestID() string { + return s.RespMetadata.RequestID +} - // 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 `min:"4" type:"string"` +// An unknown internal error occurred. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - // An array of objects that display the details about each Synthetics canary - // runtime version. - RuntimeVersions []*RuntimeVersion `type:"list"` + Message_ *string `locationName:"Message" type:"string"` } // String returns the string representation. @@ -3309,7 +5161,7 @@ type DescribeRuntimeVersionsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeRuntimeVersionsOutput) String() string { +func (s InternalServerException) String() string { return awsutil.Prettify(s) } @@ -3318,29 +5170,64 @@ func (s DescribeRuntimeVersionsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s DescribeRuntimeVersionsOutput) GoString() string { +func (s InternalServerException) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeRuntimeVersionsOutput) SetNextToken(v string) *DescribeRuntimeVersionsOutput { - s.NextToken = &v - return s +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } } -// SetRuntimeVersions sets the RuntimeVersions field's value. -func (s *DescribeRuntimeVersionsOutput) SetRuntimeVersions(v []*RuntimeVersion) *DescribeRuntimeVersionsOutput { - s.RuntimeVersions = v - return s +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" } -type GetCanaryInput struct { - _ struct{} `type:"structure" nopayload:"true"` +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} - // The name of the canary that you want details for. +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalServerException) OrigErr() error { + return nil +} + +func (s *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListAssociatedGroupsInput struct { + _ struct{} `type:"structure"` + + // Specify this parameter to limit how many groups are returned each time you + // use the ListAssociatedGroups operation. If you omit this parameter, the default + // of 20 is used. + MaxResults *int64 `min:"1" type:"integer"` + + // 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 `min:"1" type:"string"` + + // The ARN of the canary that you want to view groups for. // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` } // String returns the string representation. @@ -3348,7 +5235,7 @@ type GetCanaryInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryInput) String() string { +func (s ListAssociatedGroupsInput) String() string { return awsutil.Prettify(s) } @@ -3357,18 +5244,24 @@ func (s GetCanaryInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryInput) GoString() string { +func (s ListAssociatedGroupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetCanaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCanaryInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *ListAssociatedGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAssociatedGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) } if invalidParams.Len() > 0 { @@ -3377,17 +5270,35 @@ func (s *GetCanaryInput) Validate() error { return nil } -// SetName sets the Name field's value. -func (s *GetCanaryInput) SetName(v string) *GetCanaryInput { - s.Name = &v +// SetMaxResults sets the MaxResults field's value. +func (s *ListAssociatedGroupsInput) SetMaxResults(v int64) *ListAssociatedGroupsInput { + s.MaxResults = &v return s } -type GetCanaryOutput struct { +// SetNextToken sets the NextToken field's value. +func (s *ListAssociatedGroupsInput) SetNextToken(v string) *ListAssociatedGroupsInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListAssociatedGroupsInput) SetResourceArn(v string) *ListAssociatedGroupsInput { + s.ResourceArn = &v + return s +} + +type ListAssociatedGroupsOutput struct { _ struct{} `type:"structure"` - // A strucure that contains the full information about the canary. - Canary *Canary `type:"structure"` + // An array of structures that contain information about the groups that this + // canary is associated with. + Groups []*GroupSummary `type:"list"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent ListAssociatedGroups operation to retrieve the next + // set of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation. @@ -3395,7 +5306,7 @@ type GetCanaryOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryOutput) String() string { +func (s ListAssociatedGroupsOutput) String() string { return awsutil.Prettify(s) } @@ -3404,33 +5315,39 @@ func (s GetCanaryOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryOutput) GoString() string { +func (s ListAssociatedGroupsOutput) GoString() string { return s.String() } -// SetCanary sets the Canary field's value. -func (s *GetCanaryOutput) SetCanary(v *Canary) *GetCanaryOutput { - s.Canary = v +// SetGroups sets the Groups field's value. +func (s *ListAssociatedGroupsOutput) SetGroups(v []*GroupSummary) *ListAssociatedGroupsOutput { + s.Groups = v return s } -type GetCanaryRunsInput struct { - _ struct{} `type:"structure"` +// SetNextToken sets the NextToken field's value. +func (s *ListAssociatedGroupsOutput) SetNextToken(v string) *ListAssociatedGroupsOutput { + s.NextToken = &v + return s +} - // 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 *int64 `min:"1" type:"integer"` +type ListGroupResourcesInput struct { + _ struct{} `type:"structure"` - // The name of the canary that you want to see runs for. + // Specifies the group to return information for. You can specify the group + // name, the ARN, or the group ID as the GroupIdentifier. // - // Name is a required field - Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` + // GroupIdentifier is a required field + GroupIdentifier *string `location:"uri" locationName:"groupIdentifier" min:"1" type:"string" required:"true"` + + // Specify this parameter to limit how many canary ARNs are returned each time + // you use the ListGroupResources operation. If you omit this parameter, the + // default of 20 is used. + MaxResults *int64 `min:"1" type:"integer"` // 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 `min:"4" type:"string"` + // token in a subsequent operation to retrieve the next set of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation. @@ -3438,7 +5355,7 @@ type GetCanaryRunsInput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryRunsInput) String() string { +func (s ListGroupResourcesInput) String() string { return awsutil.Prettify(s) } @@ -3447,24 +5364,24 @@ func (s GetCanaryRunsInput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryRunsInput) GoString() string { +func (s ListGroupResourcesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetCanaryRunsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCanaryRunsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) +func (s *ListGroupResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupResourcesInput"} + if s.GroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIdentifier")) } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) + if s.GroupIdentifier != nil && len(*s.GroupIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupIdentifier", 1)) } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } - if s.NextToken != nil && len(*s.NextToken) < 4 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 4)) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -3473,35 +5390,35 @@ func (s *GetCanaryRunsInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *GetCanaryRunsInput) SetMaxResults(v int64) *GetCanaryRunsInput { - s.MaxResults = &v +// SetGroupIdentifier sets the GroupIdentifier field's value. +func (s *ListGroupResourcesInput) SetGroupIdentifier(v string) *ListGroupResourcesInput { + s.GroupIdentifier = &v return s } -// SetName sets the Name field's value. -func (s *GetCanaryRunsInput) SetName(v string) *GetCanaryRunsInput { - s.Name = &v +// SetMaxResults sets the MaxResults field's value. +func (s *ListGroupResourcesInput) SetMaxResults(v int64) *ListGroupResourcesInput { + s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *GetCanaryRunsInput) SetNextToken(v string) *GetCanaryRunsInput { +func (s *ListGroupResourcesInput) SetNextToken(v string) *ListGroupResourcesInput { s.NextToken = &v return s } -type GetCanaryRunsOutput struct { +type ListGroupResourcesOutput struct { _ struct{} `type:"structure"` - // An array of structures. Each structure contains the details of one of the - // retrieved canary runs. - CanaryRuns []*CanaryRun `type:"list"` - // 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 `min:"4" type:"string"` + // token in a subsequent ListGroupResources operation to retrieve the next set + // of results. + NextToken *string `min:"1" type:"string"` + + // An array of ARNs. These ARNs are for the canaries that are associated with + // the group. + Resources []*string `type:"list"` } // String returns the string representation. @@ -3509,7 +5426,7 @@ type GetCanaryRunsOutput struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryRunsOutput) String() string { +func (s ListGroupResourcesOutput) String() string { return awsutil.Prettify(s) } @@ -3518,28 +5435,33 @@ func (s GetCanaryRunsOutput) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s GetCanaryRunsOutput) GoString() string { +func (s ListGroupResourcesOutput) GoString() string { return s.String() } -// SetCanaryRuns sets the CanaryRuns field's value. -func (s *GetCanaryRunsOutput) SetCanaryRuns(v []*CanaryRun) *GetCanaryRunsOutput { - s.CanaryRuns = v +// SetNextToken sets the NextToken field's value. +func (s *ListGroupResourcesOutput) SetNextToken(v string) *ListGroupResourcesOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *GetCanaryRunsOutput) SetNextToken(v string) *GetCanaryRunsOutput { - s.NextToken = &v +// SetResources sets the Resources field's value. +func (s *ListGroupResourcesOutput) SetResources(v []*string) *ListGroupResourcesOutput { + s.Resources = v return s } -// An unknown internal error occurred. -type InternalServerException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` +type ListGroupsInput struct { + _ struct{} `type:"structure"` - Message_ *string `locationName:"Message" type:"string"` + // Specify this parameter to limit how many groups are returned each time you + // use the ListGroups operation. If you omit this parameter, the default of + // 20 is used. + MaxResults *int64 `min:"1" type:"integer"` + + // 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 `min:"1" type:"string"` } // String returns the string representation. @@ -3547,7 +5469,7 @@ type InternalServerException struct { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s InternalServerException) String() string { +func (s ListGroupsInput) String() string { return awsutil.Prettify(s) } @@ -3556,55 +5478,88 @@ func (s InternalServerException) String() string { // API parameter values that are decorated as "sensitive" in the API will not // be included in the string output. The member name will be present, but the // value will be replaced with "sensitive". -func (s InternalServerException) GoString() string { +func (s ListGroupsInput) GoString() string { return s.String() } -func newErrorInternalServerException(v protocol.ResponseMetadata) error { - return &InternalServerException{ - RespMetadata: v, +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams } + return nil } -// Code returns the exception type name. -func (s *InternalServerException) Code() string { - return "InternalServerException" +// SetMaxResults sets the MaxResults field's value. +func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput { + s.MaxResults = &v + return s } -// Message returns the exception's message. -func (s *InternalServerException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" +// SetNextToken sets the NextToken field's value. +func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { + s.NextToken = &v + return s } -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InternalServerException) OrigErr() error { - return nil +type ListGroupsOutput struct { + _ struct{} `type:"structure"` + + // An array of structures that each contain information about one group. + Groups []*GroupSummary `type:"list"` + + // A token that indicates that there is more data available. You can use this + // token in a subsequent ListGroups operation to retrieve the next set of results. + NextToken *string `min:"4" type:"string"` } -func (s *InternalServerException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListGroupsOutput) String() string { + return awsutil.Prettify(s) } -// Status code returns the HTTP status code for the request's response error. -func (s *InternalServerException) StatusCode() int { - return s.RespMetadata.StatusCode +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListGroupsOutput) GoString() string { + return s.String() } -// RequestID returns the service's response RequestID for request. -func (s *InternalServerException) RequestID() string { - return s.RespMetadata.RequestID +// SetGroups sets the Groups field's value. +func (s *ListGroupsOutput) SetGroups(v []*GroupSummary) *ListGroupsOutput { + s.Groups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { + s.NextToken = &v + return s } type ListTagsForResourceInput struct { _ struct{} `type:"structure" nopayload:"true"` - // The ARN of the canary that you want to view tags for. + // The ARN of the canary or group that you want to view tags for. // // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . // + // The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name + // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` } @@ -3652,7 +5607,7 @@ func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResource type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` - // The list of tag keys and values associated with the canary that you specified. + // The list of tag keys and values associated with the resource that you specified. Tags map[string]*string `min:"1" type:"map"` } @@ -3680,6 +5635,70 @@ func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForRe return s } +// The specified resource was not found. +type NotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s NotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s NotFoundException) GoString() string { + return s.String() +} + +func newErrorNotFoundException(v protocol.ResponseMetadata) error { + return &NotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *NotFoundException) Code() string { + return "NotFoundException" +} + +// Message returns the exception's message. +func (s *NotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *NotFoundException) OrigErr() error { + return nil +} + +func (s *NotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *NotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *NotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + // One of the input resources is larger than is allowed. type RequestEntityTooLargeException struct { _ struct{} `type:"structure"` @@ -3932,6 +5951,70 @@ func (s *S3EncryptionConfig) SetKmsKeyArn(v string) *S3EncryptionConfig { return s } +// The request exceeded a service quota value. +type ServiceQuotaExceededException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) GoString() string { + return s.String() +} + +func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { + return &ServiceQuotaExceededException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ServiceQuotaExceededException) Code() string { + return "ServiceQuotaExceededException" +} + +// Message returns the exception's message. +func (s *ServiceQuotaExceededException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceQuotaExceededException) OrigErr() error { + return nil +} + +func (s *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + type StartCanaryInput struct { _ struct{} `type:"structure" nopayload:"true"` @@ -4008,7 +6091,7 @@ type StopCanaryInput struct { _ struct{} `type:"structure" nopayload:"true"` // 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). + // use ListCanaries (https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html). // // Name is a required field Name *string `location:"uri" locationName:"name" min:"1" type:"string" required:"true"` @@ -4079,14 +6162,16 @@ func (s StopCanaryOutput) GoString() string { type TagResourceInput struct { _ struct{} `type:"structure"` - // The ARN of the canary that you're adding tags to. + // The ARN of the canary or group that you're adding tags to. // // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . // + // The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name + // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` - // The list of key-value pairs to associate with the canary. + // The list of key-value pairs to associate with the resource. // // Tags is a required field Tags map[string]*string `min:"1" type:"map" required:"true"` @@ -4166,13 +6251,79 @@ func (s TagResourceOutput) GoString() string { return s.String() } +// There were too many simultaneous requests. Try the operation again. +type TooManyRequestsException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TooManyRequestsException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TooManyRequestsException) GoString() string { + return s.String() +} + +func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { + return &TooManyRequestsException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *TooManyRequestsException) Code() string { + return "TooManyRequestsException" +} + +// Message returns the exception's message. +func (s *TooManyRequestsException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *TooManyRequestsException) OrigErr() error { + return nil +} + +func (s *TooManyRequestsException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID +} + type UntagResourceInput struct { _ struct{} `type:"structure" nopayload:"true"` - // The ARN of the canary that you're removing tags from. + // The ARN of the canary or group that you're removing tags from. // // The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name . // + // The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name + // // ResourceArn is a required field ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` @@ -4306,6 +6457,9 @@ type UpdateCanaryInput struct { // A structure that contains the timeout value that is used for each individual // run of the canary. + // + // The environment variables keys and values are not encrypted. Do not store + // sensitive information in this field. RunConfig *CanaryRunConfigInput `type:"structure"` // Specifies the runtime version to use for the canary. For a list of valid @@ -4569,8 +6723,8 @@ func (s *ValidationException) RequestID() string { } // An object that specifies what screenshots to use as a baseline for visual -// monitoring by this canary, and optionally the parts of the screenshots to -// ignore during the visual monitoring comparison. +// monitoring by this canary. It can optionally also specify parts of the screenshots +// to ignore during the visual monitoring comparison. // // 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) @@ -4660,8 +6814,8 @@ func (s *VisualReferenceInput_) SetBaseScreenshots(v []*BaseScreenshot) *VisualR type VisualReferenceOutput_ struct { _ struct{} `type:"structure"` - // The ID of the canary run that produced the screenshots that are used as the - // baseline for visual monitoring comparisons during future runs of this canary. + // The ID of the canary run that produced the baseline screenshots that are + // used for visual monitoring comparisons by this canary. BaseCanaryRunId *string `min:"1" type:"string"` // An array of screenshots that are used as the baseline for comparisons during diff --git a/service/synthetics/errors.go b/service/synthetics/errors.go index 24a274db5a..546590df9d 100644 --- a/service/synthetics/errors.go +++ b/service/synthetics/errors.go @@ -8,18 +8,36 @@ import ( const ( + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // The request was not valid. + ErrCodeBadRequestException = "BadRequestException" + // ErrCodeConflictException for service response error code // "ConflictException". // // A conflicting operation is already in progress. ErrCodeConflictException = "ConflictException" + // ErrCodeInternalFailureException for service response error code + // "InternalFailureException". + // + // An internal failure occurred. Try the operation again. + ErrCodeInternalFailureException = "InternalFailureException" + // ErrCodeInternalServerException for service response error code // "InternalServerException". // // An unknown internal error occurred. ErrCodeInternalServerException = "InternalServerException" + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // The specified resource was not found. + ErrCodeNotFoundException = "NotFoundException" + // ErrCodeRequestEntityTooLargeException for service response error code // "RequestEntityTooLargeException". // @@ -32,6 +50,18 @@ const ( // One of the specified resources was not found. ErrCodeResourceNotFoundException = "ResourceNotFoundException" + // ErrCodeServiceQuotaExceededException for service response error code + // "ServiceQuotaExceededException". + // + // The request exceeded a service quota value. + ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // There were too many simultaneous requests. Try the operation again. + ErrCodeTooManyRequestsException = "TooManyRequestsException" + // ErrCodeValidationException for service response error code // "ValidationException". // @@ -40,9 +70,14 @@ const ( ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "BadRequestException": newErrorBadRequestException, "ConflictException": newErrorConflictException, + "InternalFailureException": newErrorInternalFailureException, "InternalServerException": newErrorInternalServerException, + "NotFoundException": newErrorNotFoundException, "RequestEntityTooLargeException": newErrorRequestEntityTooLargeException, "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, + "TooManyRequestsException": newErrorTooManyRequestsException, "ValidationException": newErrorValidationException, } diff --git a/service/synthetics/syntheticsiface/interface.go b/service/synthetics/syntheticsiface/interface.go index 5f80c0b5b4..7c05acac8e 100644 --- a/service/synthetics/syntheticsiface/interface.go +++ b/service/synthetics/syntheticsiface/interface.go @@ -26,7 +26,7 @@ import ( // // myFunc uses an SDK service client to make a request to // // Synthetics. // func myFunc(svc syntheticsiface.SyntheticsAPI) bool { -// // Make svc.CreateCanary request +// // Make svc.AssociateResource request // } // // func main() { @@ -42,7 +42,7 @@ import ( // type mockSyntheticsClient struct { // syntheticsiface.SyntheticsAPI // } -// func (m *mockSyntheticsClient) CreateCanary(input *synthetics.CreateCanaryInput) (*synthetics.CreateCanaryOutput, error) { +// func (m *mockSyntheticsClient) AssociateResource(input *synthetics.AssociateResourceInput) (*synthetics.AssociateResourceOutput, error) { // // mock response/functionality // } // @@ -60,14 +60,26 @@ import ( // and waiters. Its suggested to use the pattern above for testing, or using // tooling to generate mocks to satisfy the interfaces. type SyntheticsAPI interface { + AssociateResource(*synthetics.AssociateResourceInput) (*synthetics.AssociateResourceOutput, error) + AssociateResourceWithContext(aws.Context, *synthetics.AssociateResourceInput, ...request.Option) (*synthetics.AssociateResourceOutput, error) + AssociateResourceRequest(*synthetics.AssociateResourceInput) (*request.Request, *synthetics.AssociateResourceOutput) + CreateCanary(*synthetics.CreateCanaryInput) (*synthetics.CreateCanaryOutput, error) CreateCanaryWithContext(aws.Context, *synthetics.CreateCanaryInput, ...request.Option) (*synthetics.CreateCanaryOutput, error) CreateCanaryRequest(*synthetics.CreateCanaryInput) (*request.Request, *synthetics.CreateCanaryOutput) + CreateGroup(*synthetics.CreateGroupInput) (*synthetics.CreateGroupOutput, error) + CreateGroupWithContext(aws.Context, *synthetics.CreateGroupInput, ...request.Option) (*synthetics.CreateGroupOutput, error) + CreateGroupRequest(*synthetics.CreateGroupInput) (*request.Request, *synthetics.CreateGroupOutput) + DeleteCanary(*synthetics.DeleteCanaryInput) (*synthetics.DeleteCanaryOutput, error) DeleteCanaryWithContext(aws.Context, *synthetics.DeleteCanaryInput, ...request.Option) (*synthetics.DeleteCanaryOutput, error) DeleteCanaryRequest(*synthetics.DeleteCanaryInput) (*request.Request, *synthetics.DeleteCanaryOutput) + DeleteGroup(*synthetics.DeleteGroupInput) (*synthetics.DeleteGroupOutput, error) + DeleteGroupWithContext(aws.Context, *synthetics.DeleteGroupInput, ...request.Option) (*synthetics.DeleteGroupOutput, error) + DeleteGroupRequest(*synthetics.DeleteGroupInput) (*request.Request, *synthetics.DeleteGroupOutput) + DescribeCanaries(*synthetics.DescribeCanariesInput) (*synthetics.DescribeCanariesOutput, error) DescribeCanariesWithContext(aws.Context, *synthetics.DescribeCanariesInput, ...request.Option) (*synthetics.DescribeCanariesOutput, error) DescribeCanariesRequest(*synthetics.DescribeCanariesInput) (*request.Request, *synthetics.DescribeCanariesOutput) @@ -89,6 +101,10 @@ type SyntheticsAPI interface { DescribeRuntimeVersionsPages(*synthetics.DescribeRuntimeVersionsInput, func(*synthetics.DescribeRuntimeVersionsOutput, bool) bool) error DescribeRuntimeVersionsPagesWithContext(aws.Context, *synthetics.DescribeRuntimeVersionsInput, func(*synthetics.DescribeRuntimeVersionsOutput, bool) bool, ...request.Option) error + DisassociateResource(*synthetics.DisassociateResourceInput) (*synthetics.DisassociateResourceOutput, error) + DisassociateResourceWithContext(aws.Context, *synthetics.DisassociateResourceInput, ...request.Option) (*synthetics.DisassociateResourceOutput, error) + DisassociateResourceRequest(*synthetics.DisassociateResourceInput) (*request.Request, *synthetics.DisassociateResourceOutput) + GetCanary(*synthetics.GetCanaryInput) (*synthetics.GetCanaryOutput, error) GetCanaryWithContext(aws.Context, *synthetics.GetCanaryInput, ...request.Option) (*synthetics.GetCanaryOutput, error) GetCanaryRequest(*synthetics.GetCanaryInput) (*request.Request, *synthetics.GetCanaryOutput) @@ -100,6 +116,31 @@ type SyntheticsAPI interface { GetCanaryRunsPages(*synthetics.GetCanaryRunsInput, func(*synthetics.GetCanaryRunsOutput, bool) bool) error GetCanaryRunsPagesWithContext(aws.Context, *synthetics.GetCanaryRunsInput, func(*synthetics.GetCanaryRunsOutput, bool) bool, ...request.Option) error + GetGroup(*synthetics.GetGroupInput) (*synthetics.GetGroupOutput, error) + GetGroupWithContext(aws.Context, *synthetics.GetGroupInput, ...request.Option) (*synthetics.GetGroupOutput, error) + GetGroupRequest(*synthetics.GetGroupInput) (*request.Request, *synthetics.GetGroupOutput) + + ListAssociatedGroups(*synthetics.ListAssociatedGroupsInput) (*synthetics.ListAssociatedGroupsOutput, error) + ListAssociatedGroupsWithContext(aws.Context, *synthetics.ListAssociatedGroupsInput, ...request.Option) (*synthetics.ListAssociatedGroupsOutput, error) + ListAssociatedGroupsRequest(*synthetics.ListAssociatedGroupsInput) (*request.Request, *synthetics.ListAssociatedGroupsOutput) + + ListAssociatedGroupsPages(*synthetics.ListAssociatedGroupsInput, func(*synthetics.ListAssociatedGroupsOutput, bool) bool) error + ListAssociatedGroupsPagesWithContext(aws.Context, *synthetics.ListAssociatedGroupsInput, func(*synthetics.ListAssociatedGroupsOutput, bool) bool, ...request.Option) error + + ListGroupResources(*synthetics.ListGroupResourcesInput) (*synthetics.ListGroupResourcesOutput, error) + ListGroupResourcesWithContext(aws.Context, *synthetics.ListGroupResourcesInput, ...request.Option) (*synthetics.ListGroupResourcesOutput, error) + ListGroupResourcesRequest(*synthetics.ListGroupResourcesInput) (*request.Request, *synthetics.ListGroupResourcesOutput) + + ListGroupResourcesPages(*synthetics.ListGroupResourcesInput, func(*synthetics.ListGroupResourcesOutput, bool) bool) error + ListGroupResourcesPagesWithContext(aws.Context, *synthetics.ListGroupResourcesInput, func(*synthetics.ListGroupResourcesOutput, bool) bool, ...request.Option) error + + ListGroups(*synthetics.ListGroupsInput) (*synthetics.ListGroupsOutput, error) + ListGroupsWithContext(aws.Context, *synthetics.ListGroupsInput, ...request.Option) (*synthetics.ListGroupsOutput, error) + ListGroupsRequest(*synthetics.ListGroupsInput) (*request.Request, *synthetics.ListGroupsOutput) + + ListGroupsPages(*synthetics.ListGroupsInput, func(*synthetics.ListGroupsOutput, bool) bool) error + ListGroupsPagesWithContext(aws.Context, *synthetics.ListGroupsInput, func(*synthetics.ListGroupsOutput, bool) bool, ...request.Option) error + ListTagsForResource(*synthetics.ListTagsForResourceInput) (*synthetics.ListTagsForResourceOutput, error) ListTagsForResourceWithContext(aws.Context, *synthetics.ListTagsForResourceInput, ...request.Option) (*synthetics.ListTagsForResourceOutput, error) ListTagsForResourceRequest(*synthetics.ListTagsForResourceInput) (*request.Request, *synthetics.ListTagsForResourceOutput)