diff --git a/CHANGELOG.md b/CHANGELOG.md index be866d01fd5..18a52d6c380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +Release v1.34.34 (2020-09-29) +=== + +### Service Client Updates +* `service/connect`: Updates service documentation +* `service/ec2`: Updates service documentation + * This release adds support for Client to Client routing for AWS Client VPN. +* `service/schemas`: Updates service API and documentation +* `service/ssm`: Updates service documentation + * Simple update to description of ComplianceItemStatus. +* `service/timestream-query`: Adds new service +* `service/timestream-write`: Adds new service + Release v1.34.33 (2020-09-28) === diff --git a/aws/endpoints/defaults.go b/aws/endpoints/defaults.go index 5dc078b1c67..c16aedce2f3 100644 --- a/aws/endpoints/defaults.go +++ b/aws/endpoints/defaults.go @@ -3127,6 +3127,9 @@ var awsPartition = partition{ "identitystore": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, diff --git a/aws/version.go b/aws/version.go index c5cee5fa87a..f6275fc9eca 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.34.33" +const SDKVersion = "1.34.34" diff --git a/models/apis/connect/2017-08-08/docs-2.json b/models/apis/connect/2017-08-08/docs-2.json index aa918081593..0b6b7db8312 100644 --- a/models/apis/connect/2017-08-08/docs-2.json +++ b/models/apis/connect/2017-08-08/docs-2.json @@ -1,13 +1,13 @@ { "version": "2.0", - "service": "

Amazon Connect is a cloud-based contact center solution that makes it easy to set up and manage a customer contact center and provide reliable customer engagement at any scale.

Amazon Connect provides rich metrics and real-time reporting that allow you to optimize contact routing. You can also resolve customer issues more efficiently by putting customers in touch with the right agents.

There are limits to the number of Amazon Connect resources that you can create and limits to the number of requests that you can make per second. For more information, see Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

To connect programmatically to an AWS service, you use an endpoint. For a list of Amazon Connect endpoints, see Amazon Connect Endpoints.

", + "service": "

Amazon Connect is a cloud-based contact center solution that makes it easy to set up and manage a customer contact center and provide reliable customer engagement at any scale.

Amazon Connect provides rich metrics and real-time reporting that allow you to optimize contact routing. You can also resolve customer issues more efficiently by putting customers in touch with the right agents.

There are limits to the number of Amazon Connect resources that you can create and limits to the number of requests that you can make per second. For more information, see Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

To connect programmatically to an AWS service, you use an endpoint. For a list of Amazon Connect endpoints, see Amazon Connect Endpoints.

Working with contact flows? Check out the Amazon Connect Flow language.

", "operations": { "AssociateRoutingProfileQueues": "

Associates a set of queues with a routing profile.

", - "CreateContactFlow": "

Creates a contact flow for the specified Amazon Connect instance.

", + "CreateContactFlow": "

Creates a contact flow for the specified Amazon Connect instance.

You can also create and update contact flows using the Amazon Connect Flow language.

", "CreateRoutingProfile": "

Creates a new routing profile.

", "CreateUser": "

Creates a user account for the specified Amazon Connect instance.

For information about how to create user accounts using the Amazon Connect console, see Add Users in the Amazon Connect Administrator Guide.

", "DeleteUser": "

Deletes a user account from the specified Amazon Connect instance.

For information about what happens to a user's data when their account is deleted, see Delete Users from Your Amazon Connect Instance in the Amazon Connect Administrator Guide.

", - "DescribeContactFlow": "

Describes the specified contact flow.

", + "DescribeContactFlow": "

Describes the specified contact flow.

You can also create and update contact flows using the Amazon Connect Flow language.

", "DescribeRoutingProfile": "

Describes the specified routing profile.

", "DescribeUser": "

Describes the specified user account. You can find the instance ID in the console (it’s the final part of the ARN). The console does not display the user IDs. Instead, list the users and note the IDs provided in the output.

", "DescribeUserHierarchyGroup": "

Describes the specified hierarchy group.

", @@ -17,7 +17,7 @@ "GetCurrentMetricData": "

Gets the real-time metric data from the specified Amazon Connect instance.

For a description of each metric, see Real-time Metrics Definitions in the Amazon Connect Administrator Guide.

", "GetFederationToken": "

Retrieves a token for federation.

", "GetMetricData": "

Gets historical metric data from the specified Amazon Connect instance.

For a description of each historical metric, see Historical Metrics Definitions in the Amazon Connect Administrator Guide.

", - "ListContactFlows": "

Provides information about the contact flows for the specified Amazon Connect instance.

For more information about contact flows, see Contact Flows in the Amazon Connect Administrator Guide.

", + "ListContactFlows": "

Provides information about the contact flows for the specified Amazon Connect instance.

You can also create and update contact flows using the Amazon Connect Flow language.

For more information about contact flows, see Contact Flows in the Amazon Connect Administrator Guide.

", "ListHoursOfOperations": "

Provides information about the hours of operation for the specified Amazon Connect instance.

For more information about hours of operation, see Set the Hours of Operation for a Queue in the Amazon Connect Administrator Guide.

", "ListPhoneNumbers": "

Provides information about the phone numbers for the specified Amazon Connect instance.

For more information about phone numbers, see Set Up Phone Numbers for Your Contact Center in the Amazon Connect Administrator Guide.

", "ListPrompts": "

Provides information about the prompts for the specified Amazon Connect instance.

", @@ -35,10 +35,10 @@ "StopContact": "

Ends the specified contact.

", "StopContactRecording": "

When a contact is being recorded, this API stops recording the call. StopContactRecording is a one-time action. If you use StopContactRecording to stop recording an ongoing call, you can't use StartContactRecording to restart it. For scenarios where the recording has started and you want to suspend it for sensitive information (for example, to collect a credit card number), and then restart it, use SuspendContactRecording and ResumeContactRecording.

Only voice recordings are supported at this time.

", "SuspendContactRecording": "

When a contact is being recorded, this API suspends recording the call. For example, you might suspend the call recording while collecting sensitive information, such as a credit card number. Then use ResumeContactRecording to restart recording.

The period of time that the recording is suspended is filled with silence in the final recording.

Only voice recordings are supported at this time.

", - "TagResource": "

Adds the specified tags to the specified resource.

The supported resource type is users.

For sample policies that use tags, see Amazon Connect Identity-Based Policy Examples in the Amazon Connect Administrator Guide.

", + "TagResource": "

Adds the specified tags to the specified resource.

The supported resource types are users, routing profiles, and contact flows.

For sample policies that use tags, see Amazon Connect Identity-Based Policy Examples in the Amazon Connect Administrator Guide.

", "UntagResource": "

Removes the specified tags from the specified resource.

", - "UpdateContactAttributes": "

Creates or updates the contact attributes associated with the specified contact.

You can add or update attributes for both ongoing and completed contacts. For example, you can update the customer's name or the reason the customer called while the call is active, or add notes about steps that the agent took during the call that are displayed to the next agent that takes the call. You can also update attributes for a contact using data from your CRM application and save the data with the contact in Amazon Connect. You could also flag calls for additional analysis, such as legal review or identifying abusive callers.

Contact attributes are available in Amazon Connect for 24 months, and are then deleted.

Important: You cannot use the operation to update attributes for contacts that occurred prior to the release of the API, September 12, 2018. You can update attributes only for contacts that started after the release of the API. If you attempt to update attributes for a contact that occurred prior to the release of the API, a 400 error is returned. This applies also to queued callbacks that were initiated prior to the release of the API but are still active in your instance.

", - "UpdateContactFlowContent": "

Updates the specified contact flow.

", + "UpdateContactAttributes": "

Creates or updates the contact attributes associated with the specified contact.

You can add or update attributes for both ongoing and completed contacts. For example, you can update the customer's name or the reason the customer called while the call is active, or add notes about steps that the agent took during the call that are displayed to the next agent that takes the call. You can also update attributes for a contact using data from your CRM application and save the data with the contact in Amazon Connect. You could also flag calls for additional analysis, such as legal review or identifying abusive callers.

Contact attributes are available in Amazon Connect for 24 months, and are then deleted.

This operation is also available in the Amazon Connect Flow language. See UpdateContactAttributes.

Important: You cannot use the operation to update attributes for contacts that occurred prior to the release of the API, September 12, 2018. You can update attributes only for contacts that started after the release of the API. If you attempt to update attributes for a contact that occurred prior to the release of the API, a 400 error is returned. This applies also to queued callbacks that were initiated prior to the release of the API but are still active in your instance.

", + "UpdateContactFlowContent": "

Updates the specified contact flow.

You can also create and update contact flows using the Amazon Connect Flow language.

", "UpdateContactFlowName": "

The name of the contact flow.

", "UpdateRoutingProfileConcurrency": "

Updates the channels that agents can handle in the Contact Control Panel (CCP) for a routing profile.

", "UpdateRoutingProfileDefaultOutboundQueue": "

Updates the default outbound queue of a routing profile.

", @@ -200,7 +200,7 @@ "refs": { "ContactFlow$Content": "

The content of the contact flow.

", "CreateContactFlowRequest$Content": "

The content of the contact flow.

", - "UpdateContactFlowContentRequest$Content": "

The content of the contact flow.

" + "UpdateContactFlowContentRequest$Content": "

The JSON string that represents contact flow’s content. For an example, see Example contact flow in Amazon Connect Flow language in the Amazon Connect Administrator Guide.

" } }, "ContactFlowDescription": { @@ -239,7 +239,7 @@ } }, "ContactFlowSummary": { - "base": "

Contains summary information about a contact flow.

", + "base": "

Contains summary information about a contact flow.

You can also create and update contact flows using the Amazon Connect Flow language.

", "refs": { "ContactFlowSummaryList$member": null } diff --git a/models/apis/ec2/2016-11-15/docs-2.json b/models/apis/ec2/2016-11-15/docs-2.json index c2ff8c22a33..57f1c7f612d 100755 --- a/models/apis/ec2/2016-11-15/docs-2.json +++ b/models/apis/ec2/2016-11-15/docs-2.json @@ -365,7 +365,7 @@ "ModifyVpcPeeringConnectionOptions": "

Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:

If the peered VPCs are in the same AWS account, you can enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peered VPCs are in different AWS accounts or different Regions. For peered VPCs in different AWS accounts, each AWS account owner must initiate a separate request to modify the peering connection options. For inter-region peering connections, you must use the Region for the requester VPC to modify the requester VPC peering options and the Region for the accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections command.

", "ModifyVpcTenancy": "

Modifies the instance tenancy attribute of the specified VPC. You can change the instance tenancy attribute of a VPC to default only. You cannot change the instance tenancy attribute to dedicated.

After you modify the tenancy of the VPC, any new instances that you launch into the VPC have a tenancy of default, unless you specify otherwise during launch. The tenancy of any existing instances in the VPC is not affected.

For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide.

", "ModifyVpnConnection": "

Modifies the customer gateway or the target gateway of an AWS Site-to-Site VPN connection. To modify the target gateway, the following migration options are available:

Before you perform the migration to the new gateway, you must configure the new gateway. Use CreateVpnGateway to create a virtual private gateway, or CreateTransitGateway to create a transit gateway.

This step is required when you migrate from a virtual private gateway with static routes to a transit gateway.

You must delete the static routes before you migrate to the new gateway.

Keep a copy of the static route before you delete it. You will need to add back these routes to the transit gateway after the VPN connection migration is complete.

After you migrate to the new gateway, you might need to modify your VPC route table. Use CreateRoute and DeleteRoute to make the changes described in VPN Gateway Target Modification Required VPC Route Table Updates in the AWS Site-to-Site VPN User Guide.

When the new gateway is a transit gateway, modify the transit gateway route table to allow traffic between the VPC and the AWS Site-to-Site VPN connection. Use CreateTransitGatewayRoute to add the routes.

If you deleted VPN static routes, you must add the static routes to the transit gateway route table.

After you perform this operation, the AWS VPN endpoint's IP addresses on the AWS side and the tunnel options remain intact. Your AWS Site-to-Site VPN connection will be temporarily unavailable for a brief period while we provision the new endpoints.

", - "ModifyVpnConnectionOptions": "

Modifies the connection options for your Site-to-Site VPN VPN connection.

When you modify the VPN connection options, the VPN endpoint IP addresses on the AWS side do not change, and the tunnel options do not change. Your VPN connection will be temporarily unavailable for a brief period while the VPN connection is updated.

", + "ModifyVpnConnectionOptions": "

Modifies the connection options for your Site-to-Site VPN connection.

When you modify the VPN connection options, the VPN endpoint IP addresses on the AWS side do not change, and the tunnel options do not change. Your VPN connection will be temporarily unavailable for a brief period while the VPN connection is updated.

", "ModifyVpnTunnelCertificate": "

Modifies the VPN tunnel endpoint certificate.

", "ModifyVpnTunnelOptions": "

Modifies the options for a VPN tunnel in an AWS Site-to-Site VPN connection. You can modify multiple options for a tunnel in a single request, but you can only modify one tunnel at a time. For more information, see Site-to-Site VPN Tunnel Options for Your Site-to-Site VPN Connection in the AWS Site-to-Site VPN User Guide.

", "MonitorInstances": "

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitoring your instances and volumes in the Amazon Elastic Compute Cloud User Guide.

To disable detailed monitoring, see .

", @@ -12585,7 +12585,7 @@ "CreateClientVpnEndpointRequest$ClientToken": "

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

", "CreateClientVpnEndpointResult$ClientVpnEndpointId": "

The ID of the Client VPN endpoint.

", "CreateClientVpnEndpointResult$DnsName": "

The DNS name to be used by clients when establishing their VPN session.

", - "CreateClientVpnRouteRequest$DestinationCidrBlock": "

The IPv4 address range, in CIDR notation, of the route destination. For example:

Route address ranges cannot overlap with the CIDR range specified for client allocation.

", + "CreateClientVpnRouteRequest$DestinationCidrBlock": "

The IPv4 address range, in CIDR notation, of the route destination. For example:

", "CreateClientVpnRouteRequest$Description": "

A brief description of the route.

", "CreateClientVpnRouteRequest$ClientToken": "

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

", "CreateCustomerGatewayRequest$PublicIp": "

The Internet-routable IP address for the customer gateway's outside interface. The address must be static.

", @@ -13947,7 +13947,7 @@ "AssociateClientVpnTargetNetworkRequest$SubnetId": "

The ID of the subnet to associate with the Client VPN endpoint.

", "AssociateRouteTableRequest$SubnetId": "

The ID of the subnet.

", "AssociateSubnetCidrBlockRequest$SubnetId": "

The ID of your subnet.

", - "CreateClientVpnRouteRequest$TargetVpcSubnetId": "

The ID of the subnet through which you want to route traffic. The specified subnet must be an existing target network of the Client VPN endpoint.

", + "CreateClientVpnRouteRequest$TargetVpcSubnetId": "

The ID of the subnet through which you want to route traffic. The specified subnet must be an existing target network of the Client VPN endpoint.

Alternatively, if you're adding a route for the local network, specify local.

", "CreateNatGatewayRequest$SubnetId": "

The subnet in which to create the NAT gateway.

", "CreateNetworkInterfaceRequest$SubnetId": "

The ID of the subnet to associate with the network interface.

", "DeleteClientVpnRouteRequest$TargetVpcSubnetId": "

The ID of the target subnet used by the route.

", @@ -15855,7 +15855,7 @@ "CreateVpnConnectionRouteRequest$VpnConnectionId": "

The ID of the VPN connection.

", "DeleteVpnConnectionRequest$VpnConnectionId": "

The ID of the VPN connection.

", "DeleteVpnConnectionRouteRequest$VpnConnectionId": "

The ID of the VPN connection.

", - "ModifyVpnConnectionOptionsRequest$VpnConnectionId": "

The ID of the Site-to-Site VPN VPN connection.

", + "ModifyVpnConnectionOptionsRequest$VpnConnectionId": "

The ID of the Site-to-Site VPN connection.

", "ModifyVpnConnectionRequest$VpnConnectionId": "

The ID of the VPN connection.

", "ModifyVpnTunnelCertificateRequest$VpnConnectionId": "

The ID of the AWS Site-to-Site VPN connection.

", "ModifyVpnTunnelOptionsRequest$VpnConnectionId": "

The ID of the AWS Site-to-Site VPN connection.

", diff --git a/models/apis/schemas/2019-12-02/api-2.json b/models/apis/schemas/2019-12-02/api-2.json index 94104a7e182..8a7ee2fb52b 100644 --- a/models/apis/schemas/2019-12-02/api-2.json +++ b/models/apis/schemas/2019-12-02/api-2.json @@ -973,6 +973,43 @@ "shape": "ServiceUnavailableException" } ] + }, + "ExportSchema": { + "name": "ExportSchema", + "http": { + "method": "GET", + "requestUri": "/v1/registries/name/{registryName}/schemas/name/{schemaName}/export", + "responseCode": 200 + }, + "input": { + "shape": "ExportSchemaRequest" + }, + "output": { + "shape": "ExportSchemaResponse" + }, + "errors": [ + { + "shape": "BadRequestException" + }, + { + "shape": "UnauthorizedException" + }, + { + "shape": "InternalServerErrorException" + }, + { + "shape": "ForbiddenException" + }, + { + "shape": "NotFoundException" + }, + { + "shape": "ServiceUnavailableException" + }, + { + "shape": "TooManyRequestsException" + } + ] } }, "shapes": { @@ -2310,6 +2347,9 @@ }, "SchemaVersion": { "shape": "__string" + }, + "Type": { + "shape": "__string" } } }, @@ -2338,6 +2378,9 @@ }, "SchemaVersion": { "shape": "__string" + }, + "Type": { + "shape": "__string" } } }, @@ -2757,6 +2800,76 @@ } } }, + "ExportSchemaOutput": { + "type": "structure", + "members": { + "Content": { + "shape": "__string" + }, + "SchemaArn": { + "shape": "__string" + }, + "SchemaName": { + "shape": "__string" + }, + "SchemaVersion": { + "shape": "__string" + }, + "Type": { + "shape": "__string" + } + } + }, + "ExportSchemaRequest": { + "type": "structure", + "members": { + "RegistryName": { + "shape": "__string", + "location": "uri", + "locationName": "registryName" + }, + "SchemaName": { + "shape": "__string", + "location": "uri", + "locationName": "schemaName" + }, + "SchemaVersion": { + "shape": "__string", + "location": "querystring", + "locationName": "schemaVersion" + }, + "Type": { + "shape": "__string", + "location": "querystring", + "locationName": "type" + } + }, + "required": [ + "RegistryName", + "SchemaName", + "Type" + ] + }, + "ExportSchemaResponse": { + "type": "structure", + "members": { + "Content": { + "shape": "__string" + }, + "SchemaArn": { + "shape": "__string" + }, + "SchemaName": { + "shape": "__string" + }, + "SchemaVersion": { + "shape": "__string" + }, + "Type": { + "shape": "__string" + } + } + }, "__boolean": { "type": "boolean" }, diff --git a/models/apis/schemas/2019-12-02/docs-2.json b/models/apis/schemas/2019-12-02/docs-2.json index d01f40a2682..ed40ce3b97a 100644 --- a/models/apis/schemas/2019-12-02/docs-2.json +++ b/models/apis/schemas/2019-12-02/docs-2.json @@ -31,7 +31,8 @@ "UntagResource": "

Removes tags from a resource.

", "UpdateDiscoverer": "

Updates the discoverer

", "UpdateRegistry": "

Updates a registry.

", - "UpdateSchema": "

Updates the schema definition

Inactive schemas will be deleted after two years.

" + "UpdateSchema": "

Updates the schema definition

Inactive schemas will be deleted after two years.

", + "ExportSchema": "

Exports a schema to a different specification.

" }, "shapes": { "BadRequestException": { @@ -94,6 +95,10 @@ "base": null, "refs": {} }, + "ExportSchemaOutput": { + "base": null, + "refs": {} + }, "ForbiddenException": { "base": null, "refs": {} @@ -352,6 +357,11 @@ "DiscovererSummary$SourceArn": "

The ARN of the event bus.

", "ErrorOutput$Code": "

The error code.

", "ErrorOutput$Message": "

The message string of the error output.

", + "ExportSchemaOutput$Content": "

The content of the schema.

", + "ExportSchemaOutput$SchemaArn": "

The ARN of the schema to export.

", + "ExportSchemaOutput$SchemaName": "

The name of the schema to export.

", + "ExportSchemaOutput$SchemaVersion": "

The version of the schema to export.

", + "ExportSchemaOutput$Type": "

The type of schema to export.

", "GetDiscoveredSchemaOutput$Content": "

The source of the schema definition.

", "GetResourcePolicyOutput$Policy": "

The resource-based policy.

", "GetResourcePolicyOutput$RevisionId": "

The revision ID.

", diff --git a/models/apis/ssm/2014-11-06/docs-2.json b/models/apis/ssm/2014-11-06/docs-2.json index d21ec41634b..2a815cd6a90 100644 --- a/models/apis/ssm/2014-11-06/docs-2.json +++ b/models/apis/ssm/2014-11-06/docs-2.json @@ -1199,8 +1199,8 @@ "ComplianceStatus": { "base": null, "refs": { - "ComplianceItem$Status": "

The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT.

", - "ComplianceItemEntry$Status": "

The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).

", + "ComplianceItem$Status": "

The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, or an empty string (for Windows patches that aren't applicable).

", + "ComplianceItemEntry$Status": "

The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT.

", "ResourceComplianceSummaryItem$Status": "

The compliance status for the resource.

" } }, @@ -5641,7 +5641,7 @@ "PingStatus": { "base": null, "refs": { - "InstanceInformation$PingStatus": "

Connection status of SSM Agent.

" + "InstanceInformation$PingStatus": "

Connection status of SSM Agent.

The status Inactive has been deprecated and is no longer in use.

" } }, "PlatformType": { @@ -6834,7 +6834,7 @@ } }, "TargetNotConnected": { - "base": "

The specified target instance for the session is not fully configured for use with Session Manager. For more information, see Getting started with Session Manager in the AWS Systems Manager User Guide.

", + "base": "

The specified target instance for the session is not fully configured for use with Session Manager. For more information, see Getting started with Session Manager in the AWS Systems Manager User Guide. This error is also returned if you attempt to start a session on an instance that is located in a different account or Region

", "refs": { } }, diff --git a/models/apis/timestream-query/2018-11-01/api-2.json b/models/apis/timestream-query/2018-11-01/api-2.json new file mode 100644 index 00000000000..5a9079d9304 --- /dev/null +++ b/models/apis/timestream-query/2018-11-01/api-2.json @@ -0,0 +1,299 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2018-11-01", + "endpointPrefix":"query.timestream", + "jsonVersion":"1.0", + "protocol":"json", + "serviceAbbreviation":"Timestream Query", + "serviceFullName":"Amazon Timestream Query", + "serviceId":"Timestream Query", + "signatureVersion":"v4", + "signingName":"timestream", + "targetPrefix":"Timestream_20181101", + "uid":"timestream-query-2018-11-01" + }, + "operations":{ + "CancelQuery":{ + "name":"CancelQuery", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CancelQueryRequest"}, + "output":{"shape":"CancelQueryResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true}, + "idempotent":true + }, + "DescribeEndpoints":{ + "name":"DescribeEndpoints", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeEndpointsRequest"}, + "output":{"shape":"DescribeEndpointsResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"} + ], + "endpointoperation":true + }, + "Query":{ + "name":"Query", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"QueryRequest"}, + "output":{"shape":"QueryResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"ConflictException"}, + {"shape":"InternalServerException"}, + {"shape":"QueryExecutionException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true}, + "idempotent":true + } + }, + "shapes":{ + "AccessDeniedException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ServiceErrorMessage"} + }, + "exception":true, + "synthetic":true + }, + "CancelQueryRequest":{ + "type":"structure", + "required":["QueryId"], + "members":{ + "QueryId":{"shape":"QueryId"} + } + }, + "CancelQueryResponse":{ + "type":"structure", + "members":{ + "CancellationMessage":{"shape":"String"} + } + }, + "ClientRequestToken":{ + "type":"string", + "max":128, + "min":32, + "sensitive":true + }, + "ColumnInfo":{ + "type":"structure", + "required":["Type"], + "members":{ + "Name":{"shape":"String"}, + "Type":{"shape":"Type"} + } + }, + "ColumnInfoList":{ + "type":"list", + "member":{"shape":"ColumnInfo"} + }, + "ConflictException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "Datum":{ + "type":"structure", + "members":{ + "ScalarValue":{"shape":"ScalarValue"}, + "TimeSeriesValue":{"shape":"TimeSeriesDataPointList"}, + "ArrayValue":{"shape":"DatumList"}, + "RowValue":{"shape":"Row"}, + "NullValue":{"shape":"NullableBoolean"} + } + }, + "DatumList":{ + "type":"list", + "member":{"shape":"Datum"} + }, + "DescribeEndpointsRequest":{ + "type":"structure", + "members":{ + } + }, + "DescribeEndpointsResponse":{ + "type":"structure", + "required":["Endpoints"], + "members":{ + "Endpoints":{"shape":"Endpoints"} + } + }, + "Endpoint":{ + "type":"structure", + "required":[ + "Address", + "CachePeriodInMinutes" + ], + "members":{ + "Address":{"shape":"String"}, + "CachePeriodInMinutes":{"shape":"Long"} + } + }, + "Endpoints":{ + "type":"list", + "member":{"shape":"Endpoint"} + }, + "ErrorMessage":{"type":"string"}, + "InternalServerException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "InvalidEndpointException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "Long":{"type":"long"}, + "MaxQueryResults":{ + "type":"integer", + "box":true, + "max":1000, + "min":1 + }, + "NullableBoolean":{ + "type":"boolean", + "box":true + }, + "QueryExecutionException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "QueryId":{ + "type":"string", + "max":64, + "min":1, + "pattern":"[a-zA-Z0-9]+" + }, + "QueryRequest":{ + "type":"structure", + "required":["QueryString"], + "members":{ + "QueryString":{"shape":"QueryString"}, + "ClientToken":{ + "shape":"ClientRequestToken", + "idempotencyToken":true + }, + "NextToken":{"shape":"String"}, + "MaxRows":{"shape":"MaxQueryResults"} + } + }, + "QueryResponse":{ + "type":"structure", + "required":[ + "QueryId", + "Rows", + "ColumnInfo" + ], + "members":{ + "QueryId":{"shape":"QueryId"}, + "NextToken":{"shape":"String"}, + "Rows":{"shape":"RowList"}, + "ColumnInfo":{"shape":"ColumnInfoList"} + } + }, + "QueryString":{ + "type":"string", + "sensitive":true + }, + "Row":{ + "type":"structure", + "required":["Data"], + "members":{ + "Data":{"shape":"DatumList"} + } + }, + "RowList":{ + "type":"list", + "member":{"shape":"Row"} + }, + "ScalarType":{ + "type":"string", + "enum":[ + "VARCHAR", + "BOOLEAN", + "BIGINT", + "DOUBLE", + "TIMESTAMP", + "DATE", + "TIME", + "INTERVAL_DAY_TO_SECOND", + "INTERVAL_YEAR_TO_MONTH", + "UNKNOWN", + "INTEGER" + ] + }, + "ScalarValue":{"type":"string"}, + "ServiceErrorMessage":{"type":"string"}, + "String":{"type":"string"}, + "ThrottlingException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "TimeSeriesDataPoint":{ + "type":"structure", + "required":[ + "Time", + "Value" + ], + "members":{ + "Time":{"shape":"Timestamp"}, + "Value":{"shape":"Datum"} + } + }, + "TimeSeriesDataPointList":{ + "type":"list", + "member":{"shape":"TimeSeriesDataPoint"} + }, + "Timestamp":{"type":"string"}, + "Type":{ + "type":"structure", + "members":{ + "ScalarType":{"shape":"ScalarType"}, + "ArrayColumnInfo":{"shape":"ColumnInfo"}, + "TimeSeriesMeasureValueColumnInfo":{"shape":"ColumnInfo"}, + "RowColumnInfo":{"shape":"ColumnInfoList"} + } + }, + "ValidationException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + } + } +} diff --git a/models/apis/timestream-query/2018-11-01/docs-2.json b/models/apis/timestream-query/2018-11-01/docs-2.json new file mode 100644 index 00000000000..4035a9fe91f --- /dev/null +++ b/models/apis/timestream-query/2018-11-01/docs-2.json @@ -0,0 +1,230 @@ +{ + "version": "2.0", + "service": "

", + "operations": { + "CancelQuery": "

Cancels a query that has been issued. Cancellation is guaranteed only if the query has not completed execution before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent cancellation requests will return a CancellationMessage, indicating that the query has already been canceled.

", + "DescribeEndpoints": "

DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.

Because Timestream’s SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, it is not recommended that you use this API unless:

For detailed information on how to use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs.

", + "Query": "

Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.

" + }, + "shapes": { + "AccessDeniedException": { + "base": "

You are not authorized to perform this action.

", + "refs": { + } + }, + "CancelQueryRequest": { + "base": null, + "refs": { + } + }, + "CancelQueryResponse": { + "base": null, + "refs": { + } + }, + "ClientRequestToken": { + "base": null, + "refs": { + "QueryRequest$ClientToken": "

Unique, case-sensitive string of up to 64 ASCII characters that you specify when you make a Query request. Providing a ClientToken makes the call to Query idempotent, meaning that multiple identical calls have the same effect as one single call.

Your query request will fail in the following cases:

After 4 hours, any request with the same client token is treated as a new request.

" + } + }, + "ColumnInfo": { + "base": "

Contains the meta data for query results such as the column names, data types, and other attributes.

", + "refs": { + "ColumnInfoList$member": null, + "Type$ArrayColumnInfo": "

Indicates if the column is an array.

", + "Type$TimeSeriesMeasureValueColumnInfo": "

Indicates if the column is a timeseries data type.

" + } + }, + "ColumnInfoList": { + "base": null, + "refs": { + "QueryResponse$ColumnInfo": "

The column data types of the returned result set.

", + "Type$RowColumnInfo": "

Indicates if the column is a row.

" + } + }, + "ConflictException": { + "base": "

Unable to poll results for a cancelled query.

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

Datum represents a single data point in a query result.

", + "refs": { + "DatumList$member": null, + "TimeSeriesDataPoint$Value": "

The measure value for the data point.

" + } + }, + "DatumList": { + "base": null, + "refs": { + "Datum$ArrayValue": "

Indicates if the data point is an array.

", + "Row$Data": "

List of data points in a single row of the result set.

" + } + }, + "DescribeEndpointsRequest": { + "base": null, + "refs": { + } + }, + "DescribeEndpointsResponse": { + "base": null, + "refs": { + } + }, + "Endpoint": { + "base": "

Represents an available endpoint against which to make API calls agaisnt, as well as the TTL for that endpoint.

", + "refs": { + "Endpoints$member": null + } + }, + "Endpoints": { + "base": null, + "refs": { + "DescribeEndpointsResponse$Endpoints": "

An Endpoints object is returned when a DescribeEndpoints request is made.

" + } + }, + "ErrorMessage": { + "base": null, + "refs": { + "ConflictException$Message": null, + "InternalServerException$Message": null, + "InvalidEndpointException$Message": null, + "QueryExecutionException$Message": null, + "ThrottlingException$Message": null, + "ValidationException$Message": null + } + }, + "InternalServerException": { + "base": "

Timestream was unable to fully process this request because of an internal server error.

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

The requested endpoint was invalid.

", + "refs": { + } + }, + "Long": { + "base": null, + "refs": { + "Endpoint$CachePeriodInMinutes": "

The TTL for the endpoint, in minutes.

" + } + }, + "MaxQueryResults": { + "base": null, + "refs": { + "QueryRequest$MaxRows": "

The total number of rows to return in the output. If the total number of rows available is more than the value specified, a NextToken is provided in the command's output. To resume pagination, provide the NextToken value in the starting-token argument of a subsequent command.

" + } + }, + "NullableBoolean": { + "base": null, + "refs": { + "Datum$NullValue": "

Indicates if the data point is null.

" + } + }, + "QueryExecutionException": { + "base": "

Timestream was unable to run the query successfully.

", + "refs": { + } + }, + "QueryId": { + "base": null, + "refs": { + "CancelQueryRequest$QueryId": "

The id of the query that needs to be cancelled. QueryID is returned as part of QueryResult.

", + "QueryResponse$QueryId": "

A unique ID for the given query.

" + } + }, + "QueryRequest": { + "base": null, + "refs": { + } + }, + "QueryResponse": { + "base": null, + "refs": { + } + }, + "QueryString": { + "base": null, + "refs": { + "QueryRequest$QueryString": "

The query to be executed by Timestream.

" + } + }, + "Row": { + "base": "

Represents a single row in the query results.

", + "refs": { + "Datum$RowValue": "

Indicates if the data point is a row.

", + "RowList$member": null + } + }, + "RowList": { + "base": null, + "refs": { + "QueryResponse$Rows": "

The result set rows returned by the query.

" + } + }, + "ScalarType": { + "base": null, + "refs": { + "Type$ScalarType": "

Indicates if the column is of type string, integer, boolean, double, timestamp, date, time.

" + } + }, + "ScalarValue": { + "base": null, + "refs": { + "Datum$ScalarValue": "

Indicates if the data point is a scalar value such as integer, string, double, or boolean.

" + } + }, + "ServiceErrorMessage": { + "base": null, + "refs": { + "AccessDeniedException$Message": null + } + }, + "String": { + "base": null, + "refs": { + "CancelQueryResponse$CancellationMessage": "

A CancellationMessage is returned when a CancelQuery request for the query specified by QueryId has already been issued.

", + "ColumnInfo$Name": "

The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

", + "Endpoint$Address": "

An endpoint address.

", + "QueryRequest$NextToken": "

A pagination token passed to get a set of results.

", + "QueryResponse$NextToken": "

A pagination token that can be used again on a Query call to get the next set of results.

" + } + }, + "ThrottlingException": { + "base": "

The request was denied due to request throttling.

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

The timeseries datatype represents the values of a measure over time. A time series is an array of rows of timestamps and measure values, with rows sorted in ascending order of time. A TimeSeriesDataPoint is a single data point in the timeseries. It represents a tuple of (time, measure value) in a timeseries.

", + "refs": { + "TimeSeriesDataPointList$member": null + } + }, + "TimeSeriesDataPointList": { + "base": null, + "refs": { + "Datum$TimeSeriesValue": "

Indicates if the data point is of timeseries data type.

" + } + }, + "Timestamp": { + "base": null, + "refs": { + "TimeSeriesDataPoint$Time": "

The timestamp when the measure value was collected.

" + } + }, + "Type": { + "base": "

Contains the data type of a column in a query result set. The data type can be scalar or complex. The supported scalar data types are integers, boolean, string, double, timestamp, date, time, and intervals. The supported complex data types are arrays, rows, and timeseries.

", + "refs": { + "ColumnInfo$Type": "

The data type of the result set column. The data type can be a scalar or complex. Scalar data types are integers, strings, doubles, booleans, and others. Complex data types are types such as arrays, rows, and others.

" + } + }, + "ValidationException": { + "base": "

Invalid or malformed request.

", + "refs": { + } + } + } +} diff --git a/models/apis/timestream-query/2018-11-01/examples-1.json b/models/apis/timestream-query/2018-11-01/examples-1.json new file mode 100644 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/timestream-query/2018-11-01/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/timestream-query/2018-11-01/paginators-1.json b/models/apis/timestream-query/2018-11-01/paginators-1.json new file mode 100644 index 00000000000..1eb99abdb14 --- /dev/null +++ b/models/apis/timestream-query/2018-11-01/paginators-1.json @@ -0,0 +1,14 @@ +{ + "pagination": { + "Query": { + "input_token": "NextToken", + "limit_key": "MaxRows", + "non_aggregate_keys": [ + "ColumnInfo", + "QueryId" + ], + "output_token": "NextToken", + "result_key": "Rows" + } + } +} \ No newline at end of file diff --git a/models/apis/timestream-write/2018-11-01/api-2.json b/models/apis/timestream-write/2018-11-01/api-2.json new file mode 100644 index 00000000000..063fd9c08a3 --- /dev/null +++ b/models/apis/timestream-write/2018-11-01/api-2.json @@ -0,0 +1,775 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2018-11-01", + "endpointPrefix":"ingest.timestream", + "jsonVersion":"1.0", + "protocol":"json", + "serviceAbbreviation":"Timestream Write", + "serviceFullName":"Amazon Timestream Write", + "serviceId":"Timestream Write", + "signatureVersion":"v4", + "signingName":"timestream", + "targetPrefix":"Timestream_20181101", + "uid":"timestream-write-2018-11-01" + }, + "operations":{ + "CreateDatabase":{ + "name":"CreateDatabase", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateDatabaseRequest"}, + "output":{"shape":"CreateDatabaseResponse"}, + "errors":[ + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"}, + {"shape":"InvalidEndpointException"}, + {"shape":"InternalServerException"} + ], + "endpointdiscovery":{"required":true} + }, + "CreateTable":{ + "name":"CreateTable", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CreateTableRequest"}, + "output":{"shape":"CreateTableResponse"}, + "errors":[ + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "DeleteDatabase":{ + "name":"DeleteDatabase", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteDatabaseRequest"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "DeleteTable":{ + "name":"DeleteTable", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteTableRequest"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "DescribeDatabase":{ + "name":"DescribeDatabase", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeDatabaseRequest"}, + "output":{"shape":"DescribeDatabaseResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "DescribeEndpoints":{ + "name":"DescribeEndpoints", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeEndpointsRequest"}, + "output":{"shape":"DescribeEndpointsResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"} + ], + "endpointoperation":true + }, + "DescribeTable":{ + "name":"DescribeTable", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeTableRequest"}, + "output":{"shape":"DescribeTableResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "ListDatabases":{ + "name":"ListDatabases", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListDatabasesRequest"}, + "output":{"shape":"ListDatabasesResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "ListTables":{ + "name":"ListTables", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTablesRequest"}, + "output":{"shape":"ListTablesResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ValidationException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ValidationException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "UpdateDatabase":{ + "name":"UpdateDatabase", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UpdateDatabaseRequest"}, + "output":{"shape":"UpdateDatabaseResponse"}, + "errors":[ + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "UpdateTable":{ + "name":"UpdateTable", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UpdateTableRequest"}, + "output":{"shape":"UpdateTableResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + }, + "WriteRecords":{ + "name":"WriteRecords", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"WriteRecordsRequest"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"RejectedRecordsException"}, + {"shape":"InvalidEndpointException"} + ], + "endpointdiscovery":{"required":true} + } + }, + "shapes":{ + "AccessDeniedException":{ + "type":"structure", + "required":["Message"], + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "AmazonResourceName":{ + "type":"string", + "max":1011, + "min":1 + }, + "ConflictException":{ + "type":"structure", + "required":["Message"], + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "CreateDatabaseRequest":{ + "type":"structure", + "required":["DatabaseName"], + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "KmsKeyId":{"shape":"StringValue2048"}, + "Tags":{"shape":"TagList"} + } + }, + "CreateDatabaseResponse":{ + "type":"structure", + "members":{ + "Database":{"shape":"Database"} + } + }, + "CreateTableRequest":{ + "type":"structure", + "required":[ + "DatabaseName", + "TableName" + ], + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "TableName":{"shape":"ResourceName"}, + "RetentionProperties":{"shape":"RetentionProperties"}, + "Tags":{"shape":"TagList"} + } + }, + "CreateTableResponse":{ + "type":"structure", + "members":{ + "Table":{"shape":"Table"} + } + }, + "Database":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "DatabaseName":{"shape":"ResourceName"}, + "TableCount":{"shape":"Long"}, + "KmsKeyId":{"shape":"StringValue2048"}, + "CreationTime":{"shape":"Date"}, + "LastUpdatedTime":{"shape":"Date"} + } + }, + "DatabaseList":{ + "type":"list", + "member":{"shape":"Database"} + }, + "Date":{"type":"timestamp"}, + "DeleteDatabaseRequest":{ + "type":"structure", + "required":["DatabaseName"], + "members":{ + "DatabaseName":{"shape":"ResourceName"} + } + }, + "DeleteTableRequest":{ + "type":"structure", + "required":[ + "DatabaseName", + "TableName" + ], + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "TableName":{"shape":"ResourceName"} + } + }, + "DescribeDatabaseRequest":{ + "type":"structure", + "required":["DatabaseName"], + "members":{ + "DatabaseName":{"shape":"ResourceName"} + } + }, + "DescribeDatabaseResponse":{ + "type":"structure", + "members":{ + "Database":{"shape":"Database"} + } + }, + "DescribeEndpointsRequest":{ + "type":"structure", + "members":{ + } + }, + "DescribeEndpointsResponse":{ + "type":"structure", + "required":["Endpoints"], + "members":{ + "Endpoints":{"shape":"Endpoints"} + } + }, + "DescribeTableRequest":{ + "type":"structure", + "required":[ + "DatabaseName", + "TableName" + ], + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "TableName":{"shape":"ResourceName"} + } + }, + "DescribeTableResponse":{ + "type":"structure", + "members":{ + "Table":{"shape":"Table"} + } + }, + "Dimension":{ + "type":"structure", + "required":[ + "Name", + "Value" + ], + "members":{ + "Name":{"shape":"StringValue256"}, + "Value":{"shape":"StringValue2048"}, + "DimensionValueType":{"shape":"DimensionValueType"} + } + }, + "DimensionValueType":{ + "type":"string", + "enum":["VARCHAR"] + }, + "Dimensions":{ + "type":"list", + "member":{"shape":"Dimension"}, + "max":128 + }, + "Endpoint":{ + "type":"structure", + "required":[ + "Address", + "CachePeriodInMinutes" + ], + "members":{ + "Address":{"shape":"String"}, + "CachePeriodInMinutes":{"shape":"Long"} + } + }, + "Endpoints":{ + "type":"list", + "member":{"shape":"Endpoint"} + }, + "ErrorMessage":{"type":"string"}, + "InternalServerException":{ + "type":"structure", + "required":["Message"], + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true, + "fault":true + }, + "InvalidEndpointException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "ListDatabasesRequest":{ + "type":"structure", + "members":{ + "NextToken":{"shape":"String"}, + "MaxResults":{"shape":"PaginationLimit"} + } + }, + "ListDatabasesResponse":{ + "type":"structure", + "members":{ + "Databases":{"shape":"DatabaseList"}, + "NextToken":{"shape":"String"} + } + }, + "ListTablesRequest":{ + "type":"structure", + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "NextToken":{"shape":"String"}, + "MaxResults":{"shape":"PaginationLimit"} + } + }, + "ListTablesResponse":{ + "type":"structure", + "members":{ + "Tables":{"shape":"TableList"}, + "NextToken":{"shape":"String"} + } + }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceARN"], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"} + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "Tags":{"shape":"TagList"} + } + }, + "Long":{"type":"long"}, + "MagneticStoreRetentionPeriodInDays":{ + "type":"long", + "max":73000, + "min":1 + }, + "MeasureValueType":{ + "type":"string", + "enum":[ + "DOUBLE", + "BIGINT", + "VARCHAR", + "BOOLEAN" + ] + }, + "MemoryStoreRetentionPeriodInHours":{ + "type":"long", + "max":8766, + "min":1 + }, + "PaginationLimit":{ + "type":"integer", + "box":true, + "max":20, + "min":1 + }, + "Record":{ + "type":"structure", + "members":{ + "Dimensions":{"shape":"Dimensions"}, + "MeasureName":{"shape":"StringValue256"}, + "MeasureValue":{"shape":"StringValue2048"}, + "MeasureValueType":{"shape":"MeasureValueType"}, + "Time":{"shape":"StringValue256"}, + "TimeUnit":{"shape":"TimeUnit"} + } + }, + "RecordIndex":{"type":"integer"}, + "Records":{ + "type":"list", + "member":{"shape":"Record"}, + "max":100, + "min":1 + }, + "RejectedRecord":{ + "type":"structure", + "members":{ + "RecordIndex":{"shape":"RecordIndex"}, + "Reason":{"shape":"ErrorMessage"} + } + }, + "RejectedRecords":{ + "type":"list", + "member":{"shape":"RejectedRecord"} + }, + "RejectedRecordsException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"}, + "RejectedRecords":{"shape":"RejectedRecords"} + }, + "exception":true + }, + "ResourceName":{ + "type":"string", + "max":64, + "min":3, + "pattern":"[a-zA-Z0-9_.-]+" + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "RetentionProperties":{ + "type":"structure", + "required":[ + "MemoryStoreRetentionPeriodInHours", + "MagneticStoreRetentionPeriodInDays" + ], + "members":{ + "MemoryStoreRetentionPeriodInHours":{"shape":"MemoryStoreRetentionPeriodInHours"}, + "MagneticStoreRetentionPeriodInDays":{"shape":"MagneticStoreRetentionPeriodInDays"} + } + }, + "ServiceQuotaExceededException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "String":{"type":"string"}, + "StringValue2048":{ + "type":"string", + "max":2048, + "min":1 + }, + "StringValue256":{ + "type":"string", + "max":256, + "min":1 + }, + "Table":{ + "type":"structure", + "members":{ + "Arn":{"shape":"String"}, + "TableName":{"shape":"ResourceName"}, + "DatabaseName":{"shape":"ResourceName"}, + "TableStatus":{"shape":"TableStatus"}, + "RetentionProperties":{"shape":"RetentionProperties"}, + "CreationTime":{"shape":"Date"}, + "LastUpdatedTime":{"shape":"Date"} + } + }, + "TableList":{ + "type":"list", + "member":{"shape":"Table"} + }, + "TableStatus":{ + "type":"string", + "enum":[ + "ACTIVE", + "DELETING" + ] + }, + "Tag":{ + "type":"structure", + "required":[ + "Key", + "Value" + ], + "members":{ + "Key":{"shape":"TagKey"}, + "Value":{"shape":"TagValue"} + } + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1 + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "max":200, + "min":0 + }, + "TagList":{ + "type":"list", + "member":{"shape":"Tag"}, + "max":200, + "min":0 + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceARN", + "Tags" + ], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"}, + "Tags":{"shape":"TagList"} + } + }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagValue":{ + "type":"string", + "max":256, + "min":0 + }, + "ThrottlingException":{ + "type":"structure", + "required":["Message"], + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "TimeUnit":{ + "type":"string", + "enum":[ + "MILLISECONDS", + "SECONDS", + "MICROSECONDS", + "NANOSECONDS" + ] + }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceARN", + "TagKeys" + ], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"}, + "TagKeys":{"shape":"TagKeyList"} + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "UpdateDatabaseRequest":{ + "type":"structure", + "required":[ + "DatabaseName", + "KmsKeyId" + ], + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "KmsKeyId":{"shape":"StringValue2048"} + } + }, + "UpdateDatabaseResponse":{ + "type":"structure", + "members":{ + "Database":{"shape":"Database"} + } + }, + "UpdateTableRequest":{ + "type":"structure", + "required":[ + "DatabaseName", + "TableName", + "RetentionProperties" + ], + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "TableName":{"shape":"ResourceName"}, + "RetentionProperties":{"shape":"RetentionProperties"} + } + }, + "UpdateTableResponse":{ + "type":"structure", + "members":{ + "Table":{"shape":"Table"} + } + }, + "ValidationException":{ + "type":"structure", + "required":["Message"], + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, + "WriteRecordsRequest":{ + "type":"structure", + "required":[ + "DatabaseName", + "TableName", + "Records" + ], + "members":{ + "DatabaseName":{"shape":"ResourceName"}, + "TableName":{"shape":"ResourceName"}, + "CommonAttributes":{"shape":"Record"}, + "Records":{"shape":"Records"} + } + } + } +} diff --git a/models/apis/timestream-write/2018-11-01/docs-2.json b/models/apis/timestream-write/2018-11-01/docs-2.json new file mode 100644 index 00000000000..d602defe911 --- /dev/null +++ b/models/apis/timestream-write/2018-11-01/docs-2.json @@ -0,0 +1,465 @@ +{ + "version": "2.0", + "service": "

Amazon Timestream is a fast, scalable, fully managed time series database service that makes it easy to store and analyze trillions of time series data points per day. With Timestream, you can easily store and analyze IoT sensor data to derive insights from your IoT applications. You can analyze industrial telemetry to streamline equipment management and maintenance. You can also store and analyze log data and metrics to improve the performance and availability of your applications. Timestream is built from the ground up to effectively ingest, process, and store time series data. It organizes data to optimize query processing. It automatically scales based on the volume of data ingested and on the query volume to ensure you receive optimal performance while inserting and querying data. As your data grows over time, Timestream’s adaptive query processing engine spans across storage tiers to provide fast analysis while reducing costs.

", + "operations": { + "CreateDatabase": "

Creates a new Timestream database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info. Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.

", + "CreateTable": "

The CreateTable operation adds a new table to an existing database in your account. In an AWS account, table names must be at least unique within each Region if they are in the same database. You may have identical table names in the same Region if the tables are in seperate databases. While creating the table, you must specify the table name, database name, and the retention properties. Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.

", + "DeleteDatabase": "

Deletes a given Timestream database. This is an irreversible operation. After a database is deleted, the time series data from its tables cannot be recovered.

All tables in the database must be deleted first, or a ValidationException error will be thrown.

", + "DeleteTable": "

Deletes a given Timestream table. This is an irreversible operation. After a Timestream database table is deleted, the time series data stored in the table cannot be recovered.

", + "DescribeDatabase": "

Returns information about the database, including the database name, time that the database was created, and the total number of tables found within the database. Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.

", + "DescribeEndpoints": "

DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.

Because Timestream’s SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, it is not recommended that you use this API unless:

For detailed information on how to use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs.

", + "DescribeTable": "

Returns information about the table, including the table name, database name, retention duration of the memory store and the magnetic store. Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.

", + "ListDatabases": "

Returns a list of your Timestream databases. Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.

", + "ListTables": "

A list of tables, along with the name, status and retention properties of each table.

", + "ListTagsForResource": "

List all tags on a Timestream resource.

", + "TagResource": "

Associate a set of tags with a Timestream resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.

", + "UntagResource": "

Removes the association of tags from a Timestream resource.

", + "UpdateDatabase": "

Modifies the KMS key for an existing database. While updating the database, you must specify the database name and the identifier of the new KMS key to be used (KmsKeyId). If there are any concurrent UpdateDatabase requests, first writer wins.

", + "UpdateTable": "

Modifies the retention duration of the memory store and magnetic store for your Timestream table. Note that the change in retention duration takes effect immediately. For example, if the retention period of the memory store was initially set to 2 hours and then changed to 24 hours, the memory store will be capable of holding 24 hours of data, but will be populated with 24 hours of data 22 hours after this change was made. Timestream does not retrieve data from the magnetic store to populate the memory store.

Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.

", + "WriteRecords": "

The WriteRecords operation enables you to write your time series data into Timestream. You can specify a single data point or a batch of data points to be inserted into the system. Timestream offers you with a flexible schema that auto detects the column names and data types for your Timestream tables based on the dimension names and data types of the data points you specify when invoking writes into the database. Timestream support eventual consistency read semantics. This means that when you query data immediately after writing a batch of data into Timestream, the query results might not reflect the results of a recently completed write operation. The results may also include some stale data. If you repeat the query request after a short time, the results should return the latest data. Service quotas apply. For more information, see Access Management in the Timestream Developer Guide.

" + }, + "shapes": { + "AccessDeniedException": { + "base": "

You are not authorized to perform this action.

", + "refs": { + } + }, + "AmazonResourceName": { + "base": null, + "refs": { + "ListTagsForResourceRequest$ResourceARN": "

The Timestream resource with tags to be listed. This value is an Amazon Resource Name (ARN).

", + "TagResourceRequest$ResourceARN": "

Identifies the Timestream resource to which tags should be added. This value is an Amazon Resource Name (ARN).

", + "UntagResourceRequest$ResourceARN": "

The Timestream resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).

" + } + }, + "ConflictException": { + "base": "

Timestream was unable to process this request because it contains resource that already exists.

", + "refs": { + } + }, + "CreateDatabaseRequest": { + "base": null, + "refs": { + } + }, + "CreateDatabaseResponse": { + "base": null, + "refs": { + } + }, + "CreateTableRequest": { + "base": null, + "refs": { + } + }, + "CreateTableResponse": { + "base": null, + "refs": { + } + }, + "Database": { + "base": "

A top level container for a table. Databases and tables are the fundamental management concepts in Amazon Timestream. All tables in a database are encrypted with the same KMS key.

", + "refs": { + "CreateDatabaseResponse$Database": "

The newly created Timestream database.

", + "DatabaseList$member": null, + "DescribeDatabaseResponse$Database": "

The name of the Timestream table.

", + "UpdateDatabaseResponse$Database": null + } + }, + "DatabaseList": { + "base": null, + "refs": { + "ListDatabasesResponse$Databases": "

A list of database names.

" + } + }, + "Date": { + "base": null, + "refs": { + "Database$CreationTime": "

The time when the database was created, calculated from the Unix epoch time.

", + "Database$LastUpdatedTime": "

The last time that this database was updated.

", + "Table$CreationTime": "

The time when the Timestream table was created.

", + "Table$LastUpdatedTime": "

The time when the Timestream table was last updated.

" + } + }, + "DeleteDatabaseRequest": { + "base": null, + "refs": { + } + }, + "DeleteTableRequest": { + "base": null, + "refs": { + } + }, + "DescribeDatabaseRequest": { + "base": null, + "refs": { + } + }, + "DescribeDatabaseResponse": { + "base": null, + "refs": { + } + }, + "DescribeEndpointsRequest": { + "base": null, + "refs": { + } + }, + "DescribeEndpointsResponse": { + "base": null, + "refs": { + } + }, + "DescribeTableRequest": { + "base": null, + "refs": { + } + }, + "DescribeTableResponse": { + "base": null, + "refs": { + } + }, + "Dimension": { + "base": "

Dimension represents the meta data attributes of the time series. For example, the name and availability zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions.

", + "refs": { + "Dimensions$member": null + } + }, + "DimensionValueType": { + "base": null, + "refs": { + "Dimension$DimensionValueType": "

The data type of the dimension for the time series data point.

" + } + }, + "Dimensions": { + "base": null, + "refs": { + "Record$Dimensions": "

Contains the list of dimensions for time series data points.

" + } + }, + "Endpoint": { + "base": "

Represents an available endpoint against which to make API calls agaisnt, as well as the TTL for that endpoint.

", + "refs": { + "Endpoints$member": null + } + }, + "Endpoints": { + "base": null, + "refs": { + "DescribeEndpointsResponse$Endpoints": "

An Endpoints object is returned when a DescribeEndpoints request is made.

" + } + }, + "ErrorMessage": { + "base": null, + "refs": { + "AccessDeniedException$Message": null, + "ConflictException$Message": null, + "InternalServerException$Message": null, + "InvalidEndpointException$Message": null, + "RejectedRecord$Reason": "

The reason why a record was not successfully inserted into Timestream. Possible causes of failure include:

For more information, see Access Management in the Timestream Developer Guide.

", + "RejectedRecordsException$Message": null, + "ResourceNotFoundException$Message": null, + "ServiceQuotaExceededException$Message": null, + "ThrottlingException$Message": null, + "ValidationException$Message": null + } + }, + "InternalServerException": { + "base": "

Timestream was unable to fully process this request because of an internal server error.

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

The requested endpoint was invalid.

", + "refs": { + } + }, + "ListDatabasesRequest": { + "base": null, + "refs": { + } + }, + "ListDatabasesResponse": { + "base": null, + "refs": { + } + }, + "ListTablesRequest": { + "base": null, + "refs": { + } + }, + "ListTablesResponse": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, + "Long": { + "base": null, + "refs": { + "Database$TableCount": "

The total number of tables found within a Timestream database.

", + "Endpoint$CachePeriodInMinutes": "

The TTL for the endpoint, in minutes.

" + } + }, + "MagneticStoreRetentionPeriodInDays": { + "base": null, + "refs": { + "RetentionProperties$MagneticStoreRetentionPeriodInDays": "

The duration for which data must be stored in the magnetic store.

" + } + }, + "MeasureValueType": { + "base": null, + "refs": { + "Record$MeasureValueType": "

Contains the data type of the measure value for the time series data point.

" + } + }, + "MemoryStoreRetentionPeriodInHours": { + "base": null, + "refs": { + "RetentionProperties$MemoryStoreRetentionPeriodInHours": "

The duration for which data must be stored in the memory store.

" + } + }, + "PaginationLimit": { + "base": null, + "refs": { + "ListDatabasesRequest$MaxResults": "

The total number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

", + "ListTablesRequest$MaxResults": "

The total number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

" + } + }, + "Record": { + "base": "

Record represents a time series data point being written into Timestream. Each record contains an array of dimensions. Dimensions represent the meta data attributes of a time series data point such as the instance name or availability zone of an EC2 instance. A record also contains the measure name which is the name of the measure being collected for example the CPU utilization of an EC2 instance. A record also contains the measure value and the value type which is the data type of the measure value. In addition, the record contains the timestamp when the measure was collected that the timestamp unit which represents the granularity of the timestamp.

", + "refs": { + "Records$member": null, + "WriteRecordsRequest$CommonAttributes": "

A record containing the common measure and dimension attributes shared across all the records in the request. The measure and dimension attributes specified in here will be merged with the measure and dimension attributes in the records object when the data is written into Timestream.

" + } + }, + "RecordIndex": { + "base": null, + "refs": { + "RejectedRecord$RecordIndex": "

The index of the record in the input request for WriteRecords. Indexes begin with 0.

" + } + }, + "Records": { + "base": null, + "refs": { + "WriteRecordsRequest$Records": "

An array of records containing the unique dimension and measure attributes for each time series data point.

" + } + }, + "RejectedRecord": { + "base": "

Records that were not successfully inserted into Timestream due to data validation issues that must be resolved prior to reinserting time series data into the system.

", + "refs": { + "RejectedRecords$member": null + } + }, + "RejectedRecords": { + "base": null, + "refs": { + "RejectedRecordsException$RejectedRecords": null + } + }, + "RejectedRecordsException": { + "base": "

WriteRecords would throw this exception in the following cases:

For more information, see Access Management in the Timestream Developer Guide.

", + "refs": { + } + }, + "ResourceName": { + "base": null, + "refs": { + "CreateDatabaseRequest$DatabaseName": "

The name of the Timestream database.

", + "CreateTableRequest$DatabaseName": "

The name of the Timestream database.

", + "CreateTableRequest$TableName": "

The name of the Timestream table.

", + "Database$DatabaseName": "

The name of the Timestream database.

", + "DeleteDatabaseRequest$DatabaseName": "

The name of the Timestream database to be deleted.

", + "DeleteTableRequest$DatabaseName": "

The name of the database where the Timestream database is to be deleted.

", + "DeleteTableRequest$TableName": "

The name of the Timestream table to be deleted.

", + "DescribeDatabaseRequest$DatabaseName": "

The name of the Timestream database.

", + "DescribeTableRequest$DatabaseName": "

The name of the Timestream database.

", + "DescribeTableRequest$TableName": "

The name of the Timestream table.

", + "ListTablesRequest$DatabaseName": "

The name of the Timestream database.

", + "Table$TableName": "

The name of the Timestream table.

", + "Table$DatabaseName": "

The name of the Timestream database that contains this table.

", + "UpdateDatabaseRequest$DatabaseName": "

The name of the database.

", + "UpdateTableRequest$DatabaseName": "

The name of the Timestream database.

", + "UpdateTableRequest$TableName": "

The name of the Timesream table.

", + "WriteRecordsRequest$DatabaseName": "

The name of the Timestream database.

", + "WriteRecordsRequest$TableName": "

The name of the Timesream table.

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

The operation tried to access a nonexistent resource. The resource might not be specified correctly, or its status might not be ACTIVE.

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

Retention properties contain the duration for which your time series data must be stored in the magnetic store and the memory store.

", + "refs": { + "CreateTableRequest$RetentionProperties": "

The duration for which your time series data must be stored in the memory store and the magnetic store.

", + "Table$RetentionProperties": "

The retention duration for the memory store and magnetic store.

", + "UpdateTableRequest$RetentionProperties": "

The retention duration of the memory store and the magnetic store.

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

Instance quota of resource exceeded for this account.

", + "refs": { + } + }, + "String": { + "base": null, + "refs": { + "Database$Arn": "

The Amazon Resource Name that uniquely identifies this database.

", + "Endpoint$Address": "

An endpoint address.

", + "ListDatabasesRequest$NextToken": "

The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

", + "ListDatabasesResponse$NextToken": "

The pagination token. This parameter is returned when the response is truncated.

", + "ListTablesRequest$NextToken": "

The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

", + "ListTablesResponse$NextToken": "

A token to specify where to start paginating. This is the NextToken from a previously truncated response.

", + "Table$Arn": "

The Amazon Resource Name that uniquely identifies this table.

" + } + }, + "StringValue2048": { + "base": null, + "refs": { + "CreateDatabaseRequest$KmsKeyId": "

The KMS key for the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. Refer to AWS managed KMS keys for more info.

", + "Database$KmsKeyId": "

The identifier of the KMS key used to encrypt the data stored in the database.

", + "Dimension$Value": "

The value of the dimension.

", + "Record$MeasureValue": "

Contains the measure value for the time series data point.

", + "UpdateDatabaseRequest$KmsKeyId": "

The identifier of the new KMS key (KmsKeyId) to be used to encrypt the data stored in the database. If the KmsKeyId currently registered with the database is the same as the KmsKeyId in the request, there will not be any update.

You can specify the KmsKeyId using any of the following:

" + } + }, + "StringValue256": { + "base": null, + "refs": { + "Dimension$Name": "

Dimension represents the meta data attributes of the time series. For example, the name and availability zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions. Dimension names can only contain alphanumeric characters and underscores. Dimension names cannot end with an underscore.

", + "Record$MeasureName": "

Measure represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures.

", + "Record$Time": "

Contains the time at which the measure value for the data point was collected.

" + } + }, + "Table": { + "base": "

Table represents a database table in Timestream. Tables contain one or more related time series. You can modify the retention duration of the memory store and the magnetic store for a table.

", + "refs": { + "CreateTableResponse$Table": "

The newly created Timestream table.

", + "DescribeTableResponse$Table": "

The Timestream table.

", + "TableList$member": null, + "UpdateTableResponse$Table": "

The updated Timestream table.

" + } + }, + "TableList": { + "base": null, + "refs": { + "ListTablesResponse$Tables": "

A list of tables.

" + } + }, + "TableStatus": { + "base": null, + "refs": { + "Table$TableStatus": "

The current state of the table:

" + } + }, + "Tag": { + "base": "

A tag is a label that you assign to a Timestream database and/or table. Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize databases and/or tables, for example, by purpose, owner, or environment.

", + "refs": { + "TagList$member": null + } + }, + "TagKey": { + "base": null, + "refs": { + "Tag$Key": "

The key of the tag. Tag keys are case sensitive.

", + "TagKeyList$member": null + } + }, + "TagKeyList": { + "base": null, + "refs": { + "UntagResourceRequest$TagKeys": "

A list of tags keys. Existing tags of the resource whose keys are members of this list will be removed from the Timestream resource.

" + } + }, + "TagList": { + "base": null, + "refs": { + "CreateDatabaseRequest$Tags": "

A list of key-value pairs to label the table.

", + "CreateTableRequest$Tags": "

A list of key-value pairs to label the table.

", + "ListTagsForResourceResponse$Tags": "

The tags currently associated with the Timestream resource.

", + "TagResourceRequest$Tags": "

The tags to be assigned to the Timestream resource.

" + } + }, + "TagResourceRequest": { + "base": null, + "refs": { + } + }, + "TagResourceResponse": { + "base": null, + "refs": { + } + }, + "TagValue": { + "base": null, + "refs": { + "Tag$Value": "

The value of the tag. Tag values are case-sensitive and can be null.

" + } + }, + "ThrottlingException": { + "base": "

Too many requests were made by a user exceeding service quotas. The request was throttled.

", + "refs": { + } + }, + "TimeUnit": { + "base": null, + "refs": { + "Record$TimeUnit": "

The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds or other supported values.

" + } + }, + "UntagResourceRequest": { + "base": null, + "refs": { + } + }, + "UntagResourceResponse": { + "base": null, + "refs": { + } + }, + "UpdateDatabaseRequest": { + "base": null, + "refs": { + } + }, + "UpdateDatabaseResponse": { + "base": null, + "refs": { + } + }, + "UpdateTableRequest": { + "base": null, + "refs": { + } + }, + "UpdateTableResponse": { + "base": null, + "refs": { + } + }, + "ValidationException": { + "base": "

Invalid or malformed request.

", + "refs": { + } + }, + "WriteRecordsRequest": { + "base": null, + "refs": { + } + } + } +} diff --git a/models/apis/timestream-write/2018-11-01/examples-1.json b/models/apis/timestream-write/2018-11-01/examples-1.json new file mode 100644 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/timestream-write/2018-11-01/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/timestream-write/2018-11-01/paginators-1.json b/models/apis/timestream-write/2018-11-01/paginators-1.json new file mode 100644 index 00000000000..45728c71e59 --- /dev/null +++ b/models/apis/timestream-write/2018-11-01/paginators-1.json @@ -0,0 +1,14 @@ +{ + "pagination": { + "ListDatabases": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults" + }, + "ListTables": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults" + } + } +} diff --git a/models/endpoints/endpoints.json b/models/endpoints/endpoints.json index 7a85c0b759b..db097094f45 100644 --- a/models/endpoints/endpoints.json +++ b/models/endpoints/endpoints.json @@ -2977,6 +2977,9 @@ }, "identitystore" : { "endpoints" : { + "ap-northeast-1" : { }, + "ap-northeast-2" : { }, + "ap-south-1" : { }, "ap-southeast-1" : { }, "ap-southeast-2" : { }, "ca-central-1" : { }, diff --git a/service/connect/api.go b/service/connect/api.go index 5711271ef3a..1c63dd143ba 100644 --- a/service/connect/api.go +++ b/service/connect/api.go @@ -151,6 +151,9 @@ func (c *Connect) CreateContactFlowRequest(input *CreateContactFlowInput) (req * // // Creates a contact flow for the specified Amazon Connect instance. // +// You can also create and update contact flows using the Amazon Connect Flow +// language (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.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. @@ -545,6 +548,9 @@ func (c *Connect) DescribeContactFlowRequest(input *DescribeContactFlowInput) (r // // Describes the specified contact flow. // +// You can also create and update contact flows using the Amazon Connect Flow +// language (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.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. @@ -1588,6 +1594,9 @@ func (c *Connect) ListContactFlowsRequest(input *ListContactFlowsInput) (req *re // Provides information about the contact flows for the specified Amazon Connect // instance. // +// You can also create and update contact flows using the Amazon Connect Flow +// language (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html). +// // For more information about contact flows, see Contact Flows (https://docs.aws.amazon.com/connect/latest/adminguide/concepts-contact-flows.html) // in the Amazon Connect Administrator Guide. // @@ -3888,7 +3897,7 @@ func (c *Connect) TagResourceRequest(input *TagResourceInput) (req *request.Requ // // Adds the specified tags to the specified resource. // -// The supported resource type is users. +// The supported resource types are users, routing profiles, and contact flows. // // For sample policies that use tags, see Amazon Connect Identity-Based Policy // Examples (https://docs.aws.amazon.com/connect/latest/adminguide/security_iam_id-based-policy-examples.html) @@ -4090,6 +4099,9 @@ func (c *Connect) UpdateContactAttributesRequest(input *UpdateContactAttributesI // Contact attributes are available in Amazon Connect for 24 months, and are // then deleted. // +// This operation is also available in the Amazon Connect Flow language. See +// UpdateContactAttributes (https://docs.aws.amazon.com/connect/latest/adminguide/contact-actions-updatecontactattributes.html). +// // Important: You cannot use the operation to update attributes for contacts // that occurred prior to the release of the API, September 12, 2018. You can // update attributes only for contacts that started after the release of the @@ -4187,6 +4199,9 @@ func (c *Connect) UpdateContactFlowContentRequest(input *UpdateContactFlowConten // // Updates the specified contact flow. // +// You can also create and update contact flows using the Amazon Connect Flow +// language (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.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. @@ -5466,6 +5481,9 @@ func (s *ContactFlowNotPublishedException) RequestID() string { } // Contains summary information about a contact flow. +// +// You can also create and update contact flows using the Amazon Connect Flow +// language (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html). type ContactFlowSummary struct { _ struct{} `type:"structure"` @@ -11427,7 +11445,9 @@ type UpdateContactFlowContentInput struct { // ContactFlowId is a required field ContactFlowId *string `location:"uri" locationName:"ContactFlowId" type:"string" required:"true"` - // The content of the contact flow. + // The JSON string that represents contact flow’s content. For an example, + // see Example contact flow in Amazon Connect Flow language (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language-example.html) + // in the Amazon Connect Administrator Guide. // // Content is a required field Content *string `type:"string" required:"true"` diff --git a/service/connect/doc.go b/service/connect/doc.go index 4bf4568e777..3182c820b10 100644 --- a/service/connect/doc.go +++ b/service/connect/doc.go @@ -19,6 +19,8 @@ // To connect programmatically to an AWS service, you use an endpoint. For a // list of Amazon Connect endpoints, see Amazon Connect Endpoints (https://docs.aws.amazon.com/general/latest/gr/connect_region.html). // +// Working with contact flows? Check out the Amazon Connect Flow language (https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html). +// // See https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08 for more information on this service. // // See connect package documentation for more information. diff --git a/service/ec2/api.go b/service/ec2/api.go index 42acd7ae615..3df5a27fe47 100644 --- a/service/ec2/api.go +++ b/service/ec2/api.go @@ -34225,7 +34225,7 @@ func (c *EC2) ModifyVpnConnectionOptionsRequest(input *ModifyVpnConnectionOption // ModifyVpnConnectionOptions API operation for Amazon Elastic Compute Cloud. // -// Modifies the connection options for your Site-to-Site VPN VPN connection. +// Modifies the connection options for your Site-to-Site VPN connection. // // When you modify the VPN connection options, the VPN endpoint IP addresses // on the AWS side do not change, and the tunnel options do not change. Your @@ -46872,8 +46872,7 @@ type CreateClientVpnRouteInput struct { // * To add a route for an on-premises network, enter the AWS Site-to-Site // VPN connection's IPv4 CIDR range // - // Route address ranges cannot overlap with the CIDR range specified for client - // allocation. + // * To add a route for the local network, enter the client CIDR range // // DestinationCidrBlock is a required field DestinationCidrBlock *string `type:"string" required:"true"` @@ -46887,6 +46886,8 @@ type CreateClientVpnRouteInput struct { // The ID of the subnet through which you want to route traffic. The specified // subnet must be an existing target network of the Client VPN endpoint. // + // Alternatively, if you're adding a route for the local network, specify local. + // // TargetVpcSubnetId is a required field TargetVpcSubnetId *string `type:"string" required:"true"` } @@ -93636,7 +93637,7 @@ type ModifyVpnConnectionOptionsInput struct { // Default: ::/0 RemoteIpv6NetworkCidr *string `type:"string"` - // The ID of the Site-to-Site VPN VPN connection. + // The ID of the Site-to-Site VPN connection. // // VpnConnectionId is a required field VpnConnectionId *string `type:"string" required:"true"` diff --git a/service/schemas/api.go b/service/schemas/api.go index 502b34a4385..d1b896bf362 100644 --- a/service/schemas/api.go +++ b/service/schemas/api.go @@ -1072,6 +1072,96 @@ func (c *Schemas) DescribeSchemaWithContext(ctx aws.Context, input *DescribeSche return out, req.Send() } +const opExportSchema = "ExportSchema" + +// ExportSchemaRequest generates a "aws/request.Request" representing the +// client's request for the ExportSchema 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 ExportSchema for more information on using the ExportSchema +// 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 ExportSchemaRequest method. +// req, resp := client.ExportSchemaRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/schemas-2019-12-02/ExportSchema +func (c *Schemas) ExportSchemaRequest(input *ExportSchemaInput) (req *request.Request, output *ExportSchemaOutput) { + op := &request.Operation{ + Name: opExportSchema, + HTTPMethod: "GET", + HTTPPath: "/v1/registries/name/{registryName}/schemas/name/{schemaName}/export", + } + + if input == nil { + input = &ExportSchemaInput{} + } + + output = &ExportSchemaOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportSchema API operation for Schemas. +// +// Exports a schema to a different specification. +// +// 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 Schemas's +// API operation ExportSchema for usage and error information. +// +// Returned Error Types: +// * BadRequestException +// +// * UnauthorizedException +// +// * InternalServerErrorException +// +// * ForbiddenException +// +// * NotFoundException +// +// * ServiceUnavailableException +// +// * TooManyRequestsException +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/schemas-2019-12-02/ExportSchema +func (c *Schemas) ExportSchema(input *ExportSchemaInput) (*ExportSchemaOutput, error) { + req, out := c.ExportSchemaRequest(input) + return out, req.Send() +} + +// ExportSchemaWithContext is the same as ExportSchema with the addition of +// the ability to pass a context and additional request options. +// +// See ExportSchema 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 *Schemas) ExportSchemaWithContext(ctx aws.Context, input *ExportSchemaInput, opts ...request.Option) (*ExportSchemaOutput, error) { + req, out := c.ExportSchemaRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetCodeBindingSource = "GetCodeBindingSource" // GetCodeBindingSourceRequest generates a "aws/request.Request" representing the @@ -4255,6 +4345,134 @@ func (s *DiscovererSummary) SetTags(v map[string]*string) *DiscovererSummary { return s } +type ExportSchemaInput struct { + _ struct{} `type:"structure"` + + // RegistryName is a required field + RegistryName *string `location:"uri" locationName:"registryName" type:"string" required:"true"` + + // SchemaName is a required field + SchemaName *string `location:"uri" locationName:"schemaName" type:"string" required:"true"` + + SchemaVersion *string `location:"querystring" locationName:"schemaVersion" type:"string"` + + // Type is a required field + Type *string `location:"querystring" locationName:"type" type:"string" required:"true"` +} + +// String returns the string representation +func (s ExportSchemaInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportSchemaInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportSchemaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportSchemaInput"} + if s.RegistryName == nil { + invalidParams.Add(request.NewErrParamRequired("RegistryName")) + } + if s.RegistryName != nil && len(*s.RegistryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RegistryName", 1)) + } + if s.SchemaName == nil { + invalidParams.Add(request.NewErrParamRequired("SchemaName")) + } + if s.SchemaName != nil && len(*s.SchemaName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SchemaName", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRegistryName sets the RegistryName field's value. +func (s *ExportSchemaInput) SetRegistryName(v string) *ExportSchemaInput { + s.RegistryName = &v + return s +} + +// SetSchemaName sets the SchemaName field's value. +func (s *ExportSchemaInput) SetSchemaName(v string) *ExportSchemaInput { + s.SchemaName = &v + return s +} + +// SetSchemaVersion sets the SchemaVersion field's value. +func (s *ExportSchemaInput) SetSchemaVersion(v string) *ExportSchemaInput { + s.SchemaVersion = &v + return s +} + +// SetType sets the Type field's value. +func (s *ExportSchemaInput) SetType(v string) *ExportSchemaInput { + s.Type = &v + return s +} + +type ExportSchemaOutput struct { + _ struct{} `type:"structure"` + + Content *string `type:"string"` + + SchemaArn *string `type:"string"` + + SchemaName *string `type:"string"` + + SchemaVersion *string `type:"string"` + + Type *string `type:"string"` +} + +// String returns the string representation +func (s ExportSchemaOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportSchemaOutput) GoString() string { + return s.String() +} + +// SetContent sets the Content field's value. +func (s *ExportSchemaOutput) SetContent(v string) *ExportSchemaOutput { + s.Content = &v + return s +} + +// SetSchemaArn sets the SchemaArn field's value. +func (s *ExportSchemaOutput) SetSchemaArn(v string) *ExportSchemaOutput { + s.SchemaArn = &v + return s +} + +// SetSchemaName sets the SchemaName field's value. +func (s *ExportSchemaOutput) SetSchemaName(v string) *ExportSchemaOutput { + s.SchemaName = &v + return s +} + +// SetSchemaVersion sets the SchemaVersion field's value. +func (s *ExportSchemaOutput) SetSchemaVersion(v string) *ExportSchemaOutput { + s.SchemaVersion = &v + return s +} + +// SetType sets the Type field's value. +func (s *ExportSchemaOutput) SetType(v string) *ExportSchemaOutput { + s.Type = &v + return s +} + type ForbiddenException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` @@ -5488,6 +5706,8 @@ type SchemaVersionSummary struct { // The version number of the schema. SchemaVersion *string `type:"string"` + + Type *string `type:"string"` } // String returns the string representation @@ -5518,6 +5738,12 @@ func (s *SchemaVersionSummary) SetSchemaVersion(v string) *SchemaVersionSummary return s } +// SetType sets the Type field's value. +func (s *SchemaVersionSummary) SetType(v string) *SchemaVersionSummary { + s.Type = &v + return s +} + type SearchSchemaSummary struct { _ struct{} `type:"structure"` @@ -5576,6 +5802,8 @@ type SearchSchemaVersionSummary struct { // The version number of the schema SchemaVersion *string `type:"string"` + + Type *string `type:"string"` } // String returns the string representation @@ -5600,6 +5828,12 @@ func (s *SearchSchemaVersionSummary) SetSchemaVersion(v string) *SearchSchemaVer return s } +// SetType sets the Type field's value. +func (s *SearchSchemaVersionSummary) SetType(v string) *SearchSchemaVersionSummary { + s.Type = &v + return s +} + type SearchSchemasInput struct { _ struct{} `type:"structure"` diff --git a/service/schemas/schemasiface/interface.go b/service/schemas/schemasiface/interface.go index ada114ed75a..c1eae139d01 100644 --- a/service/schemas/schemasiface/interface.go +++ b/service/schemas/schemasiface/interface.go @@ -108,6 +108,10 @@ type SchemasAPI interface { DescribeSchemaWithContext(aws.Context, *schemas.DescribeSchemaInput, ...request.Option) (*schemas.DescribeSchemaOutput, error) DescribeSchemaRequest(*schemas.DescribeSchemaInput) (*request.Request, *schemas.DescribeSchemaOutput) + ExportSchema(*schemas.ExportSchemaInput) (*schemas.ExportSchemaOutput, error) + ExportSchemaWithContext(aws.Context, *schemas.ExportSchemaInput, ...request.Option) (*schemas.ExportSchemaOutput, error) + ExportSchemaRequest(*schemas.ExportSchemaInput) (*request.Request, *schemas.ExportSchemaOutput) + GetCodeBindingSource(*schemas.GetCodeBindingSourceInput) (*schemas.GetCodeBindingSourceOutput, error) GetCodeBindingSourceWithContext(aws.Context, *schemas.GetCodeBindingSourceInput, ...request.Option) (*schemas.GetCodeBindingSourceOutput, error) GetCodeBindingSourceRequest(*schemas.GetCodeBindingSourceInput) (*request.Request, *schemas.GetCodeBindingSourceOutput) diff --git a/service/ssm/api.go b/service/ssm/api.go index 09f5f40ada5..ccbd4bc6d12 100644 --- a/service/ssm/api.go +++ b/service/ssm/api.go @@ -12633,7 +12633,9 @@ func (c *SSM) StartSessionRequest(input *StartSessionInput) (req *request.Reques // The specified target instance for the session is not fully configured for // use with Session Manager. For more information, see Getting started with // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) -// in the AWS Systems Manager User Guide. +// in the AWS Systems Manager User Guide. This error is also returned if you +// attempt to start a session on an instance that is located in a different +// account or Region // // * InternalServerError // An error occurred on the server side. @@ -17769,7 +17771,8 @@ type ComplianceItem struct { // Critical, High, Medium, Low, Informational, Unspecified. Severity *string `type:"string" enum:"ComplianceSeverity"` - // The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT. + // The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, + // or an empty string (for Windows patches that aren't applicable). Status *string `type:"string" enum:"ComplianceStatus"` // A title for the compliance item. For example, if the compliance item is a @@ -17859,8 +17862,7 @@ type ComplianceItemEntry struct { // Severity is a required field Severity *string `type:"string" required:"true" enum:"ComplianceSeverity"` - // The status of the compliance item. An item is either COMPLIANT, NON_COMPLIANT, - // or an empty string (for Windows patches that aren't applicable). + // The status of the compliance item. An item is either COMPLIANT or NON_COMPLIANT. // // Status is a required field Status *string `type:"string" required:"true" enum:"ComplianceStatus"` @@ -29603,6 +29605,8 @@ type InstanceInformation struct { Name *string `type:"string"` // Connection status of SSM Agent. + // + // The status Inactive has been deprecated and is no longer in use. PingStatus *string `type:"string" enum:"PingStatus"` // The name of the operating system platform running on your instance. @@ -44356,7 +44360,9 @@ func (s *TargetLocation) SetTargetLocationMaxErrors(v string) *TargetLocation { // The specified target instance for the session is not fully configured for // use with Session Manager. For more information, see Getting started with // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) -// in the AWS Systems Manager User Guide. +// in the AWS Systems Manager User Guide. This error is also returned if you +// attempt to start a session on an instance that is located in a different +// account or Region type TargetNotConnected struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` diff --git a/service/ssm/errors.go b/service/ssm/errors.go index 0e4b87e508d..938a767ccfa 100644 --- a/service/ssm/errors.go +++ b/service/ssm/errors.go @@ -701,7 +701,9 @@ const ( // The specified target instance for the session is not fully configured for // use with Session Manager. For more information, see Getting started with // Session Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html) - // in the AWS Systems Manager User Guide. + // in the AWS Systems Manager User Guide. This error is also returned if you + // attempt to start a session on an instance that is located in a different + // account or Region ErrCodeTargetNotConnected = "TargetNotConnected" // ErrCodeTooManyTagsError for service response error code diff --git a/service/timestreamquery/api.go b/service/timestreamquery/api.go new file mode 100644 index 00000000000..d4ea305aa8c --- /dev/null +++ b/service/timestreamquery/api.go @@ -0,0 +1,1443 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package timestreamquery + +import ( + "fmt" + "net/url" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/crr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" +) + +const opCancelQuery = "CancelQuery" + +// CancelQueryRequest generates a "aws/request.Request" representing the +// client's request for the CancelQuery 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 CancelQuery for more information on using the CancelQuery +// 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 CancelQueryRequest method. +// req, resp := client.CancelQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/CancelQuery +func (c *TimestreamQuery) CancelQueryRequest(input *CancelQueryInput) (req *request.Request, output *CancelQueryOutput) { + op := &request.Operation{ + Name: opCancelQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelQueryInput{} + } + + output = &CancelQueryOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// CancelQuery API operation for Amazon Timestream Query. +// +// Cancels a query that has been issued. Cancellation is guaranteed only if +// the query has not completed execution before the cancellation request was +// issued. Because cancellation is an idempotent operation, subsequent cancellation +// requests will return a CancellationMessage, indicating that the query has +// already been canceled. +// +// 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 Amazon Timestream Query's +// API operation CancelQuery for usage and error information. +// +// Returned Error Types: +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * ValidationException +// Invalid or malformed request. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/CancelQuery +func (c *TimestreamQuery) CancelQuery(input *CancelQueryInput) (*CancelQueryOutput, error) { + req, out := c.CancelQueryRequest(input) + return out, req.Send() +} + +// CancelQueryWithContext is the same as CancelQuery with the addition of +// the ability to pass a context and additional request options. +// +// See CancelQuery 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 *TimestreamQuery) CancelQueryWithContext(ctx aws.Context, input *CancelQueryInput, opts ...request.Option) (*CancelQueryOutput, error) { + req, out := c.CancelQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEndpoints = "DescribeEndpoints" + +// DescribeEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEndpoints 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 DescribeEndpoints for more information on using the DescribeEndpoints +// 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 DescribeEndpointsRequest method. +// req, resp := client.DescribeEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DescribeEndpoints +func (c *TimestreamQuery) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEndpointsInput{} + } + + output = &DescribeEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEndpoints API operation for Amazon Timestream Query. +// +// DescribeEndpoints returns a list of available endpoints to make Timestream +// API calls against. This API is available through both Write and Query. +// +// Because Timestream’s SDKs are designed to transparently work with the service’s +// architecture, including the management and mapping of the service endpoints, +// it is not recommended that you use this API unless: +// +// * Your application uses a programming language that does not yet have +// SDK support +// +// * You require better control over the client-side implementation +// +// For detailed information on how to use DescribeEndpoints, see The Endpoint +// Discovery Pattern and REST APIs (https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.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 Amazon Timestream Query's +// API operation DescribeEndpoints for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ValidationException +// Invalid or malformed request. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DescribeEndpoints +func (c *TimestreamQuery) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + return out, req.Send() +} + +// DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEndpoints 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 *TimestreamQuery) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type discovererDescribeEndpoints struct { + Client *TimestreamQuery + Required bool + EndpointCache *crr.EndpointCache + Params map[string]*string + Key string + req *request.Request +} + +func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) { + input := &DescribeEndpointsInput{} + + resp, err := d.Client.DescribeEndpoints(input) + if err != nil { + return crr.Endpoint{}, err + } + + endpoint := crr.Endpoint{ + Key: d.Key, + } + + for _, e := range resp.Endpoints { + if e.Address == nil { + continue + } + + address := *e.Address + + var scheme string + if idx := strings.Index(address, "://"); idx != -1 { + scheme = address[:idx] + } + + if len(scheme) == 0 { + address = fmt.Sprintf("%s://%s", d.req.HTTPRequest.URL.Scheme, address) + } + + cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes) + u, err := url.Parse(address) + if err != nil { + continue + } + + addr := crr.WeightedAddress{ + URL: u, + Expired: time.Now().Add(time.Duration(cachedInMinutes) * time.Minute), + } + + endpoint.Add(addr) + } + + d.EndpointCache.Add(endpoint) + + return endpoint, nil +} + +func (d *discovererDescribeEndpoints) Handler(r *request.Request) { + endpointKey := crr.BuildEndpointKey(d.Params) + d.Key = endpointKey + d.req = r + + endpoint, err := d.EndpointCache.Get(d, endpointKey, d.Required) + if err != nil { + r.Error = err + return + } + + if endpoint.URL != nil && len(endpoint.URL.String()) > 0 { + r.HTTPRequest.URL = endpoint.URL + } +} + +const opQuery = "Query" + +// QueryRequest generates a "aws/request.Request" representing the +// client's request for the Query 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 Query for more information on using the Query +// 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 QueryRequest method. +// req, resp := client.QueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/Query +func (c *TimestreamQuery) QueryRequest(input *QueryInput) (req *request.Request, output *QueryOutput) { + op := &request.Operation{ + Name: opQuery, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRows", + TruncationToken: "", + }, + } + + if input == nil { + input = &QueryInput{} + } + + output = &QueryOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// Query API operation for Amazon Timestream Query. +// +// Query is a synchronous operation that enables you to execute a query. Query +// will timeout after 60 seconds. You must update the default timeout in the +// SDK to support a timeout of 60 seconds. The result set will be truncated +// to 1MB. Service quotas apply. For more information, see Quotas in the Timestream +// Developer Guide. +// +// 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 Amazon Timestream Query's +// API operation Query for usage and error information. +// +// Returned Error Types: +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * ConflictException +// Unable to poll results for a cancelled query. +// +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * QueryExecutionException +// Timestream was unable to run the query successfully. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// * ValidationException +// Invalid or malformed request. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/Query +func (c *TimestreamQuery) Query(input *QueryInput) (*QueryOutput, error) { + req, out := c.QueryRequest(input) + return out, req.Send() +} + +// QueryWithContext is the same as Query with the addition of +// the ability to pass a context and additional request options. +// +// See Query 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 *TimestreamQuery) QueryWithContext(ctx aws.Context, input *QueryInput, opts ...request.Option) (*QueryOutput, error) { + req, out := c.QueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// QueryPages iterates over the pages of a Query operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See Query 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 Query operation. +// pageNum := 0 +// err := client.QueryPages(params, +// func(page *timestreamquery.QueryOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *TimestreamQuery) QueryPages(input *QueryInput, fn func(*QueryOutput, bool) bool) error { + return c.QueryPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// QueryPagesWithContext same as QueryPages 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 *TimestreamQuery) QueryPagesWithContext(ctx aws.Context, input *QueryInput, fn func(*QueryOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *QueryInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.QueryRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*QueryOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +// You are not authorized to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) 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 *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +type CancelQueryInput struct { + _ struct{} `type:"structure"` + + // The id of the query that needs to be cancelled. QueryID is returned as part + // of QueryResult. + // + // QueryId is a required field + QueryId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelQueryInput"} + if s.QueryId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryId")) + } + if s.QueryId != nil && len(*s.QueryId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueryId sets the QueryId field's value. +func (s *CancelQueryInput) SetQueryId(v string) *CancelQueryInput { + s.QueryId = &v + return s +} + +type CancelQueryOutput struct { + _ struct{} `type:"structure"` + + // A CancellationMessage is returned when a CancelQuery request for the query + // specified by QueryId has already been issued. + CancellationMessage *string `type:"string"` +} + +// String returns the string representation +func (s CancelQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelQueryOutput) GoString() string { + return s.String() +} + +// SetCancellationMessage sets the CancellationMessage field's value. +func (s *CancelQueryOutput) SetCancellationMessage(v string) *CancelQueryOutput { + s.CancellationMessage = &v + return s +} + +// Contains the meta data for query results such as the column names, data types, +// and other attributes. +type ColumnInfo struct { + _ struct{} `type:"structure"` + + // The name of the result set column. The name of the result set is available + // for columns of all data types except for arrays. + Name *string `type:"string"` + + // The data type of the result set column. The data type can be a scalar or + // complex. Scalar data types are integers, strings, doubles, booleans, and + // others. Complex data types are types such as arrays, rows, and others. + // + // Type is a required field + Type *Type `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ColumnInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ColumnInfo) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *ColumnInfo) SetName(v string) *ColumnInfo { + s.Name = &v + return s +} + +// SetType sets the Type field's value. +func (s *ColumnInfo) SetType(v *Type) *ColumnInfo { + s.Type = v + return s +} + +// Unable to poll results for a cancelled query. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConflictException) 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 +} + +// Datum represents a single data point in a query result. +type Datum struct { + _ struct{} `type:"structure"` + + // Indicates if the data point is an array. + ArrayValue []*Datum `type:"list"` + + // Indicates if the data point is null. + NullValue *bool `type:"boolean"` + + // Indicates if the data point is a row. + RowValue *Row `type:"structure"` + + // Indicates if the data point is a scalar value such as integer, string, double, + // or boolean. + ScalarValue *string `type:"string"` + + // Indicates if the data point is of timeseries data type. + TimeSeriesValue []*TimeSeriesDataPoint `type:"list"` +} + +// String returns the string representation +func (s Datum) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Datum) GoString() string { + return s.String() +} + +// SetArrayValue sets the ArrayValue field's value. +func (s *Datum) SetArrayValue(v []*Datum) *Datum { + s.ArrayValue = v + return s +} + +// SetNullValue sets the NullValue field's value. +func (s *Datum) SetNullValue(v bool) *Datum { + s.NullValue = &v + return s +} + +// SetRowValue sets the RowValue field's value. +func (s *Datum) SetRowValue(v *Row) *Datum { + s.RowValue = v + return s +} + +// SetScalarValue sets the ScalarValue field's value. +func (s *Datum) SetScalarValue(v string) *Datum { + s.ScalarValue = &v + return s +} + +// SetTimeSeriesValue sets the TimeSeriesValue field's value. +func (s *Datum) SetTimeSeriesValue(v []*TimeSeriesDataPoint) *Datum { + s.TimeSeriesValue = v + return s +} + +type DescribeEndpointsInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsInput) GoString() string { + return s.String() +} + +type DescribeEndpointsOutput struct { + _ struct{} `type:"structure"` + + // An Endpoints object is returned when a DescribeEndpoints request is made. + // + // Endpoints is a required field + Endpoints []*Endpoint `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpoints sets the Endpoints field's value. +func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { + s.Endpoints = v + return s +} + +// Represents an available endpoint against which to make API calls agaisnt, +// as well as the TTL for that endpoint. +type Endpoint struct { + _ struct{} `type:"structure"` + + // An endpoint address. + // + // Address is a required field + Address *string `type:"string" required:"true"` + + // The TTL for the endpoint, in minutes. + // + // CachePeriodInMinutes is a required field + CachePeriodInMinutes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s Endpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Endpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *Endpoint) SetAddress(v string) *Endpoint { + s.Address = &v + return s +} + +// SetCachePeriodInMinutes sets the CachePeriodInMinutes field's value. +func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint { + s.CachePeriodInMinutes = &v + return s +} + +// Timestream was unable to fully process this request because of an internal +// server error. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InternalServerException) GoString() string { + return s.String() +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// 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 +} + +// The requested endpoint was invalid. +type InvalidEndpointException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s InvalidEndpointException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InvalidEndpointException) GoString() string { + return s.String() +} + +func newErrorInvalidEndpointException(v protocol.ResponseMetadata) error { + return &InvalidEndpointException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidEndpointException) Code() string { + return "InvalidEndpointException" +} + +// Message returns the exception's message. +func (s *InvalidEndpointException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidEndpointException) OrigErr() error { + return nil +} + +func (s *InvalidEndpointException) 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 *InvalidEndpointException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidEndpointException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Timestream was unable to run the query successfully. +type QueryExecutionException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s QueryExecutionException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryExecutionException) GoString() string { + return s.String() +} + +func newErrorQueryExecutionException(v protocol.ResponseMetadata) error { + return &QueryExecutionException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *QueryExecutionException) Code() string { + return "QueryExecutionException" +} + +// Message returns the exception's message. +func (s *QueryExecutionException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *QueryExecutionException) OrigErr() error { + return nil +} + +func (s *QueryExecutionException) 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 *QueryExecutionException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *QueryExecutionException) RequestID() string { + return s.RespMetadata.RequestID +} + +type QueryInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive string of up to 64 ASCII characters that you specify + // when you make a Query request. Providing a ClientToken makes the call to + // Query idempotent, meaning that multiple identical calls have the same effect + // as one single call. + // + // Your query request will fail in the following cases: + // + // * If you submit a request with the same client token outside the 5-minute + // idepotency window. + // + // * If you submit a request with the same client token but a change in other + // parameters within the 5-minute idempotency window. + // + // After 4 hours, any request with the same client token is treated as a new + // request. + ClientToken *string `min:"32" type:"string" idempotencyToken:"true" sensitive:"true"` + + // The total number of rows to return in the output. If the total number of + // rows available is more than the value specified, a NextToken is provided + // in the command's output. To resume pagination, provide the NextToken value + // in the starting-token argument of a subsequent command. + MaxRows *int64 `min:"1" type:"integer"` + + // A pagination token passed to get a set of results. + NextToken *string `type:"string"` + + // The query to be executed by Timestream. + // + // QueryString is a required field + QueryString *string `type:"string" required:"true" sensitive:"true"` +} + +// String returns the string representation +func (s QueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *QueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueryInput"} + if s.ClientToken != nil && len(*s.ClientToken) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 32)) + } + if s.MaxRows != nil && *s.MaxRows < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxRows", 1)) + } + if s.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *QueryInput) SetClientToken(v string) *QueryInput { + s.ClientToken = &v + return s +} + +// SetMaxRows sets the MaxRows field's value. +func (s *QueryInput) SetMaxRows(v int64) *QueryInput { + s.MaxRows = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *QueryInput) SetNextToken(v string) *QueryInput { + s.NextToken = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *QueryInput) SetQueryString(v string) *QueryInput { + s.QueryString = &v + return s +} + +type QueryOutput struct { + _ struct{} `type:"structure"` + + // The column data types of the returned result set. + // + // ColumnInfo is a required field + ColumnInfo []*ColumnInfo `type:"list" required:"true"` + + // A pagination token that can be used again on a Query call to get the next + // set of results. + NextToken *string `type:"string"` + + // A unique ID for the given query. + // + // QueryId is a required field + QueryId *string `min:"1" type:"string" required:"true"` + + // The result set rows returned by the query. + // + // Rows is a required field + Rows []*Row `type:"list" required:"true"` +} + +// String returns the string representation +func (s QueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryOutput) GoString() string { + return s.String() +} + +// SetColumnInfo sets the ColumnInfo field's value. +func (s *QueryOutput) SetColumnInfo(v []*ColumnInfo) *QueryOutput { + s.ColumnInfo = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *QueryOutput) SetNextToken(v string) *QueryOutput { + s.NextToken = &v + return s +} + +// SetQueryId sets the QueryId field's value. +func (s *QueryOutput) SetQueryId(v string) *QueryOutput { + s.QueryId = &v + return s +} + +// SetRows sets the Rows field's value. +func (s *QueryOutput) SetRows(v []*Row) *QueryOutput { + s.Rows = v + return s +} + +// Represents a single row in the query results. +type Row struct { + _ struct{} `type:"structure"` + + // List of data points in a single row of the result set. + // + // Data is a required field + Data []*Datum `type:"list" required:"true"` +} + +// String returns the string representation +func (s Row) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Row) GoString() string { + return s.String() +} + +// SetData sets the Data field's value. +func (s *Row) SetData(v []*Datum) *Row { + s.Data = v + return s +} + +// The request was denied due to request throttling. +type ThrottlingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ThrottlingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThrottlingException) GoString() string { + return s.String() +} + +func newErrorThrottlingException(v protocol.ResponseMetadata) error { + return &ThrottlingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ThrottlingException) Code() string { + return "ThrottlingException" +} + +// Message returns the exception's message. +func (s *ThrottlingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ThrottlingException) OrigErr() error { + return nil +} + +func (s *ThrottlingException) 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 *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The timeseries datatype represents the values of a measure over time. A time +// series is an array of rows of timestamps and measure values, with rows sorted +// in ascending order of time. A TimeSeriesDataPoint is a single data point +// in the timeseries. It represents a tuple of (time, measure value) in a timeseries. +type TimeSeriesDataPoint struct { + _ struct{} `type:"structure"` + + // The timestamp when the measure value was collected. + // + // Time is a required field + Time *string `type:"string" required:"true"` + + // The measure value for the data point. + // + // Value is a required field + Value *Datum `type:"structure" required:"true"` +} + +// String returns the string representation +func (s TimeSeriesDataPoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimeSeriesDataPoint) GoString() string { + return s.String() +} + +// SetTime sets the Time field's value. +func (s *TimeSeriesDataPoint) SetTime(v string) *TimeSeriesDataPoint { + s.Time = &v + return s +} + +// SetValue sets the Value field's value. +func (s *TimeSeriesDataPoint) SetValue(v *Datum) *TimeSeriesDataPoint { + s.Value = v + return s +} + +// Contains the data type of a column in a query result set. The data type can +// be scalar or complex. The supported scalar data types are integers, boolean, +// string, double, timestamp, date, time, and intervals. The supported complex +// data types are arrays, rows, and timeseries. +type Type struct { + _ struct{} `type:"structure"` + + // Indicates if the column is an array. + ArrayColumnInfo *ColumnInfo `type:"structure"` + + // Indicates if the column is a row. + RowColumnInfo []*ColumnInfo `type:"list"` + + // Indicates if the column is of type string, integer, boolean, double, timestamp, + // date, time. + ScalarType *string `type:"string" enum:"ScalarType"` + + // Indicates if the column is a timeseries data type. + TimeSeriesMeasureValueColumnInfo *ColumnInfo `type:"structure"` +} + +// String returns the string representation +func (s Type) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Type) GoString() string { + return s.String() +} + +// SetArrayColumnInfo sets the ArrayColumnInfo field's value. +func (s *Type) SetArrayColumnInfo(v *ColumnInfo) *Type { + s.ArrayColumnInfo = v + return s +} + +// SetRowColumnInfo sets the RowColumnInfo field's value. +func (s *Type) SetRowColumnInfo(v []*ColumnInfo) *Type { + s.RowColumnInfo = v + return s +} + +// SetScalarType sets the ScalarType field's value. +func (s *Type) SetScalarType(v string) *Type { + s.ScalarType = &v + return s +} + +// SetTimeSeriesMeasureValueColumnInfo sets the TimeSeriesMeasureValueColumnInfo field's value. +func (s *Type) SetTimeSeriesMeasureValueColumnInfo(v *ColumnInfo) *Type { + s.TimeSeriesMeasureValueColumnInfo = v + return s +} + +// Invalid or malformed request. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationException) GoString() string { + return s.String() +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) 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 *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} + +const ( + // ScalarTypeVarchar is a ScalarType enum value + ScalarTypeVarchar = "VARCHAR" + + // ScalarTypeBoolean is a ScalarType enum value + ScalarTypeBoolean = "BOOLEAN" + + // ScalarTypeBigint is a ScalarType enum value + ScalarTypeBigint = "BIGINT" + + // ScalarTypeDouble is a ScalarType enum value + ScalarTypeDouble = "DOUBLE" + + // ScalarTypeTimestamp is a ScalarType enum value + ScalarTypeTimestamp = "TIMESTAMP" + + // ScalarTypeDate is a ScalarType enum value + ScalarTypeDate = "DATE" + + // ScalarTypeTime is a ScalarType enum value + ScalarTypeTime = "TIME" + + // ScalarTypeIntervalDayToSecond is a ScalarType enum value + ScalarTypeIntervalDayToSecond = "INTERVAL_DAY_TO_SECOND" + + // ScalarTypeIntervalYearToMonth is a ScalarType enum value + ScalarTypeIntervalYearToMonth = "INTERVAL_YEAR_TO_MONTH" + + // ScalarTypeUnknown is a ScalarType enum value + ScalarTypeUnknown = "UNKNOWN" + + // ScalarTypeInteger is a ScalarType enum value + ScalarTypeInteger = "INTEGER" +) + +// ScalarType_Values returns all elements of the ScalarType enum +func ScalarType_Values() []string { + return []string{ + ScalarTypeVarchar, + ScalarTypeBoolean, + ScalarTypeBigint, + ScalarTypeDouble, + ScalarTypeTimestamp, + ScalarTypeDate, + ScalarTypeTime, + ScalarTypeIntervalDayToSecond, + ScalarTypeIntervalYearToMonth, + ScalarTypeUnknown, + ScalarTypeInteger, + } +} diff --git a/service/timestreamquery/doc.go b/service/timestreamquery/doc.go new file mode 100644 index 00000000000..37cb9548c64 --- /dev/null +++ b/service/timestreamquery/doc.go @@ -0,0 +1,26 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package timestreamquery provides the client and types for making API +// requests to Amazon Timestream Query. +// +// See https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01 for more information on this service. +// +// See timestreamquery package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/timestreamquery/ +// +// Using the Client +// +// To contact Amazon Timestream Query with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Timestream Query client TimestreamQuery for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/timestreamquery/#New +package timestreamquery diff --git a/service/timestreamquery/errors.go b/service/timestreamquery/errors.go new file mode 100644 index 00000000000..f197eeb0f0c --- /dev/null +++ b/service/timestreamquery/errors.go @@ -0,0 +1,63 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package timestreamquery + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You are not authorized to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // Unable to poll results for a cancelled query. + ErrCodeConflictException = "ConflictException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // Timestream was unable to fully process this request because of an internal + // server error. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeInvalidEndpointException for service response error code + // "InvalidEndpointException". + // + // The requested endpoint was invalid. + ErrCodeInvalidEndpointException = "InvalidEndpointException" + + // ErrCodeQueryExecutionException for service response error code + // "QueryExecutionException". + // + // Timestream was unable to run the query successfully. + ErrCodeQueryExecutionException = "QueryExecutionException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The request was denied due to request throttling. + ErrCodeThrottlingException = "ThrottlingException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // Invalid or malformed request. + ErrCodeValidationException = "ValidationException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, + "ConflictException": newErrorConflictException, + "InternalServerException": newErrorInternalServerException, + "InvalidEndpointException": newErrorInvalidEndpointException, + "QueryExecutionException": newErrorQueryExecutionException, + "ThrottlingException": newErrorThrottlingException, + "ValidationException": newErrorValidationException, +} diff --git a/service/timestreamquery/service.go b/service/timestreamquery/service.go new file mode 100644 index 00000000000..23001278166 --- /dev/null +++ b/service/timestreamquery/service.go @@ -0,0 +1,109 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package timestreamquery + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/crr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// TimestreamQuery provides the API operation methods for making requests to +// Amazon Timestream Query. See this package's package overview docs +// for details on the service. +// +// TimestreamQuery methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type TimestreamQuery struct { + *client.Client + endpointCache *crr.EndpointCache +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Timestream Query" // Name of service. + EndpointsID = "query.timestream" // ID to lookup a service endpoint with. + ServiceID = "Timestream Query" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the TimestreamQuery client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// mySession := session.Must(session.NewSession()) +// +// // Create a TimestreamQuery client from just a session. +// svc := timestreamquery.New(mySession) +// +// // Create a TimestreamQuery client with additional configuration +// svc := timestreamquery.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *TimestreamQuery { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "timestream" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *TimestreamQuery { + svc := &TimestreamQuery{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2018-11-01", + JSONVersion: "1.0", + TargetPrefix: "Timestream_20181101", + }, + handlers, + ), + } + svc.endpointCache = crr.NewEndpointCache(10) + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a TimestreamQuery operation and runs any +// custom request initialization. +func (c *TimestreamQuery) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/service/timestreamquery/timestreamqueryiface/interface.go b/service/timestreamquery/timestreamqueryiface/interface.go new file mode 100644 index 00000000000..c01f51adb3f --- /dev/null +++ b/service/timestreamquery/timestreamqueryiface/interface.go @@ -0,0 +1,79 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package timestreamqueryiface provides an interface to enable mocking the Amazon Timestream Query service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package timestreamqueryiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/timestreamquery" +) + +// TimestreamQueryAPI provides an interface to enable mocking the +// timestreamquery.TimestreamQuery service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // Amazon Timestream Query. +// func myFunc(svc timestreamqueryiface.TimestreamQueryAPI) bool { +// // Make svc.CancelQuery request +// } +// +// func main() { +// sess := session.New() +// svc := timestreamquery.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockTimestreamQueryClient struct { +// timestreamqueryiface.TimestreamQueryAPI +// } +// func (m *mockTimestreamQueryClient) CancelQuery(input *timestreamquery.CancelQueryInput) (*timestreamquery.CancelQueryOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockTimestreamQueryClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type TimestreamQueryAPI interface { + CancelQuery(*timestreamquery.CancelQueryInput) (*timestreamquery.CancelQueryOutput, error) + CancelQueryWithContext(aws.Context, *timestreamquery.CancelQueryInput, ...request.Option) (*timestreamquery.CancelQueryOutput, error) + CancelQueryRequest(*timestreamquery.CancelQueryInput) (*request.Request, *timestreamquery.CancelQueryOutput) + + DescribeEndpoints(*timestreamquery.DescribeEndpointsInput) (*timestreamquery.DescribeEndpointsOutput, error) + DescribeEndpointsWithContext(aws.Context, *timestreamquery.DescribeEndpointsInput, ...request.Option) (*timestreamquery.DescribeEndpointsOutput, error) + DescribeEndpointsRequest(*timestreamquery.DescribeEndpointsInput) (*request.Request, *timestreamquery.DescribeEndpointsOutput) + + Query(*timestreamquery.QueryInput) (*timestreamquery.QueryOutput, error) + QueryWithContext(aws.Context, *timestreamquery.QueryInput, ...request.Option) (*timestreamquery.QueryOutput, error) + QueryRequest(*timestreamquery.QueryInput) (*request.Request, *timestreamquery.QueryOutput) + + QueryPages(*timestreamquery.QueryInput, func(*timestreamquery.QueryOutput, bool) bool) error + QueryPagesWithContext(aws.Context, *timestreamquery.QueryInput, func(*timestreamquery.QueryOutput, bool) bool, ...request.Option) error +} + +var _ TimestreamQueryAPI = (*timestreamquery.TimestreamQuery)(nil) diff --git a/service/timestreamwrite/api.go b/service/timestreamwrite/api.go new file mode 100644 index 00000000000..311cf39c0bc --- /dev/null +++ b/service/timestreamwrite/api.go @@ -0,0 +1,4408 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package timestreamwrite + +import ( + "fmt" + "net/url" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/crr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCreateDatabase = "CreateDatabase" + +// CreateDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the CreateDatabase 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 CreateDatabase for more information on using the CreateDatabase +// 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 CreateDatabaseRequest method. +// req, resp := client.CreateDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateDatabase +func (c *TimestreamWrite) CreateDatabaseRequest(input *CreateDatabaseInput) (req *request.Request, output *CreateDatabaseOutput) { + op := &request.Operation{ + Name: opCreateDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDatabaseInput{} + } + + output = &CreateDatabaseOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// CreateDatabase API operation for Amazon Timestream Write. +// +// Creates a new Timestream database. If the KMS key is not specified, the database +// will be encrypted with a Timestream managed KMS key located in your account. +// Refer to AWS managed KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) +// for more info. Service quotas apply. For more information, see Access Management +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// 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 Amazon Timestream Write's +// API operation CreateDatabase for usage and error information. +// +// Returned Error Types: +// * ConflictException +// Timestream was unable to process this request because it contains resource +// that already exists. +// +// * ValidationException +// Invalid or malformed request. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * ServiceQuotaExceededException +// Instance quota of resource exceeded for this account. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateDatabase +func (c *TimestreamWrite) CreateDatabase(input *CreateDatabaseInput) (*CreateDatabaseOutput, error) { + req, out := c.CreateDatabaseRequest(input) + return out, req.Send() +} + +// CreateDatabaseWithContext is the same as CreateDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDatabase 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 *TimestreamWrite) CreateDatabaseWithContext(ctx aws.Context, input *CreateDatabaseInput, opts ...request.Option) (*CreateDatabaseOutput, error) { + req, out := c.CreateDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTable = "CreateTable" + +// CreateTableRequest generates a "aws/request.Request" representing the +// client's request for the CreateTable 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 CreateTable for more information on using the CreateTable +// 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 CreateTableRequest method. +// req, resp := client.CreateTableRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateTable +func (c *TimestreamWrite) CreateTableRequest(input *CreateTableInput) (req *request.Request, output *CreateTableOutput) { + op := &request.Operation{ + Name: opCreateTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTableInput{} + } + + output = &CreateTableOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// CreateTable API operation for Amazon Timestream Write. +// +// The CreateTable operation adds a new table to an existing database in your +// account. In an AWS account, table names must be at least unique within each +// Region if they are in the same database. You may have identical table names +// in the same Region if the tables are in seperate databases. While creating +// the table, you must specify the table name, database name, and the retention +// properties. Service quotas apply. For more information, see Access Management +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// 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 Amazon Timestream Write's +// API operation CreateTable for usage and error information. +// +// Returned Error Types: +// * ConflictException +// Timestream was unable to process this request because it contains resource +// that already exists. +// +// * ValidationException +// Invalid or malformed request. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * ServiceQuotaExceededException +// Instance quota of resource exceeded for this account. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateTable +func (c *TimestreamWrite) CreateTable(input *CreateTableInput) (*CreateTableOutput, error) { + req, out := c.CreateTableRequest(input) + return out, req.Send() +} + +// CreateTableWithContext is the same as CreateTable with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTable 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 *TimestreamWrite) CreateTableWithContext(ctx aws.Context, input *CreateTableInput, opts ...request.Option) (*CreateTableOutput, error) { + req, out := c.CreateTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDatabase = "DeleteDatabase" + +// DeleteDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDatabase 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 DeleteDatabase for more information on using the DeleteDatabase +// 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 DeleteDatabaseRequest method. +// req, resp := client.DeleteDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteDatabase +func (c *TimestreamWrite) DeleteDatabaseRequest(input *DeleteDatabaseInput) (req *request.Request, output *DeleteDatabaseOutput) { + op := &request.Operation{ + Name: opDeleteDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDatabaseInput{} + } + + output = &DeleteDatabaseOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// DeleteDatabase API operation for Amazon Timestream Write. +// +// Deletes a given Timestream database. This is an irreversible operation. After +// a database is deleted, the time series data from its tables cannot be recovered. +// +// All tables in the database must be deleted first, or a ValidationException +// error will be thrown. +// +// 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 Amazon Timestream Write's +// API operation DeleteDatabase for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * ValidationException +// Invalid or malformed request. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteDatabase +func (c *TimestreamWrite) DeleteDatabase(input *DeleteDatabaseInput) (*DeleteDatabaseOutput, error) { + req, out := c.DeleteDatabaseRequest(input) + return out, req.Send() +} + +// DeleteDatabaseWithContext is the same as DeleteDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDatabase 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 *TimestreamWrite) DeleteDatabaseWithContext(ctx aws.Context, input *DeleteDatabaseInput, opts ...request.Option) (*DeleteDatabaseOutput, error) { + req, out := c.DeleteDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTable = "DeleteTable" + +// DeleteTableRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTable 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 DeleteTable for more information on using the DeleteTable +// 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 DeleteTableRequest method. +// req, resp := client.DeleteTableRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteTable +func (c *TimestreamWrite) DeleteTableRequest(input *DeleteTableInput) (req *request.Request, output *DeleteTableOutput) { + op := &request.Operation{ + Name: opDeleteTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTableInput{} + } + + output = &DeleteTableOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// DeleteTable API operation for Amazon Timestream Write. +// +// Deletes a given Timestream table. This is an irreversible operation. After +// a Timestream database table is deleted, the time series data stored in the +// table cannot be recovered. +// +// 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 Amazon Timestream Write's +// API operation DeleteTable for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * ValidationException +// Invalid or malformed request. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteTable +func (c *TimestreamWrite) DeleteTable(input *DeleteTableInput) (*DeleteTableOutput, error) { + req, out := c.DeleteTableRequest(input) + return out, req.Send() +} + +// DeleteTableWithContext is the same as DeleteTable with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTable 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 *TimestreamWrite) DeleteTableWithContext(ctx aws.Context, input *DeleteTableInput, opts ...request.Option) (*DeleteTableOutput, error) { + req, out := c.DeleteTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDatabase = "DescribeDatabase" + +// DescribeDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDatabase 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 DescribeDatabase for more information on using the DescribeDatabase +// 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 DescribeDatabaseRequest method. +// req, resp := client.DescribeDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeDatabase +func (c *TimestreamWrite) DescribeDatabaseRequest(input *DescribeDatabaseInput) (req *request.Request, output *DescribeDatabaseOutput) { + op := &request.Operation{ + Name: opDescribeDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDatabaseInput{} + } + + output = &DescribeDatabaseOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// DescribeDatabase API operation for Amazon Timestream Write. +// +// Returns information about the database, including the database name, time +// that the database was created, and the total number of tables found within +// the database. Service quotas apply. For more information, see Access Management +// (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// 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 Amazon Timestream Write's +// API operation DescribeDatabase for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * ValidationException +// Invalid or malformed request. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeDatabase +func (c *TimestreamWrite) DescribeDatabase(input *DescribeDatabaseInput) (*DescribeDatabaseOutput, error) { + req, out := c.DescribeDatabaseRequest(input) + return out, req.Send() +} + +// DescribeDatabaseWithContext is the same as DescribeDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDatabase 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 *TimestreamWrite) DescribeDatabaseWithContext(ctx aws.Context, input *DescribeDatabaseInput, opts ...request.Option) (*DescribeDatabaseOutput, error) { + req, out := c.DescribeDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEndpoints = "DescribeEndpoints" + +// DescribeEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEndpoints 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 DescribeEndpoints for more information on using the DescribeEndpoints +// 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 DescribeEndpointsRequest method. +// req, resp := client.DescribeEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeEndpoints +func (c *TimestreamWrite) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEndpointsInput{} + } + + output = &DescribeEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEndpoints API operation for Amazon Timestream Write. +// +// DescribeEndpoints returns a list of available endpoints to make Timestream +// API calls against. This API is available through both Write and Query. +// +// Because Timestream’s SDKs are designed to transparently work with the service’s +// architecture, including the management and mapping of the service endpoints, +// it is not recommended that you use this API unless: +// +// * Your application uses a programming language that does not yet have +// SDK support +// +// * You require better control over the client-side implementation +// +// For detailed information on how to use DescribeEndpoints, see The Endpoint +// Discovery Pattern and REST APIs (https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.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 Amazon Timestream Write's +// API operation DescribeEndpoints for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ValidationException +// Invalid or malformed request. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeEndpoints +func (c *TimestreamWrite) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + return out, req.Send() +} + +// DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEndpoints 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 *TimestreamWrite) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type discovererDescribeEndpoints struct { + Client *TimestreamWrite + Required bool + EndpointCache *crr.EndpointCache + Params map[string]*string + Key string + req *request.Request +} + +func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) { + input := &DescribeEndpointsInput{} + + resp, err := d.Client.DescribeEndpoints(input) + if err != nil { + return crr.Endpoint{}, err + } + + endpoint := crr.Endpoint{ + Key: d.Key, + } + + for _, e := range resp.Endpoints { + if e.Address == nil { + continue + } + + address := *e.Address + + var scheme string + if idx := strings.Index(address, "://"); idx != -1 { + scheme = address[:idx] + } + + if len(scheme) == 0 { + address = fmt.Sprintf("%s://%s", d.req.HTTPRequest.URL.Scheme, address) + } + + cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes) + u, err := url.Parse(address) + if err != nil { + continue + } + + addr := crr.WeightedAddress{ + URL: u, + Expired: time.Now().Add(time.Duration(cachedInMinutes) * time.Minute), + } + + endpoint.Add(addr) + } + + d.EndpointCache.Add(endpoint) + + return endpoint, nil +} + +func (d *discovererDescribeEndpoints) Handler(r *request.Request) { + endpointKey := crr.BuildEndpointKey(d.Params) + d.Key = endpointKey + d.req = r + + endpoint, err := d.EndpointCache.Get(d, endpointKey, d.Required) + if err != nil { + r.Error = err + return + } + + if endpoint.URL != nil && len(endpoint.URL.String()) > 0 { + r.HTTPRequest.URL = endpoint.URL + } +} + +const opDescribeTable = "DescribeTable" + +// DescribeTableRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTable 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 DescribeTable for more information on using the DescribeTable +// 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 DescribeTableRequest method. +// req, resp := client.DescribeTableRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeTable +func (c *TimestreamWrite) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput) { + op := &request.Operation{ + Name: opDescribeTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTableInput{} + } + + output = &DescribeTableOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// DescribeTable API operation for Amazon Timestream Write. +// +// Returns information about the table, including the table name, database name, +// retention duration of the memory store and the magnetic store. Service quotas +// apply. For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// 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 Amazon Timestream Write's +// API operation DescribeTable for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * ValidationException +// Invalid or malformed request. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeTable +func (c *TimestreamWrite) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error) { + req, out := c.DescribeTableRequest(input) + return out, req.Send() +} + +// DescribeTableWithContext is the same as DescribeTable with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTable 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 *TimestreamWrite) DescribeTableWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.Option) (*DescribeTableOutput, error) { + req, out := c.DescribeTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDatabases = "ListDatabases" + +// ListDatabasesRequest generates a "aws/request.Request" representing the +// client's request for the ListDatabases 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 ListDatabases for more information on using the ListDatabases +// 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 ListDatabasesRequest method. +// req, resp := client.ListDatabasesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListDatabases +func (c *TimestreamWrite) ListDatabasesRequest(input *ListDatabasesInput) (req *request.Request, output *ListDatabasesOutput) { + op := &request.Operation{ + Name: opListDatabases, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDatabasesInput{} + } + + output = &ListDatabasesOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// ListDatabases API operation for Amazon Timestream Write. +// +// Returns a list of your Timestream databases. Service quotas apply. For more +// information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// 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 Amazon Timestream Write's +// API operation ListDatabases for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * ValidationException +// Invalid or malformed request. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListDatabases +func (c *TimestreamWrite) ListDatabases(input *ListDatabasesInput) (*ListDatabasesOutput, error) { + req, out := c.ListDatabasesRequest(input) + return out, req.Send() +} + +// ListDatabasesWithContext is the same as ListDatabases with the addition of +// the ability to pass a context and additional request options. +// +// See ListDatabases 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 *TimestreamWrite) ListDatabasesWithContext(ctx aws.Context, input *ListDatabasesInput, opts ...request.Option) (*ListDatabasesOutput, error) { + req, out := c.ListDatabasesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDatabasesPages iterates over the pages of a ListDatabases operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDatabases 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 ListDatabases operation. +// pageNum := 0 +// err := client.ListDatabasesPages(params, +// func(page *timestreamwrite.ListDatabasesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *TimestreamWrite) ListDatabasesPages(input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool) error { + return c.ListDatabasesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDatabasesPagesWithContext same as ListDatabasesPages 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 *TimestreamWrite) ListDatabasesPagesWithContext(ctx aws.Context, input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDatabasesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListDatabasesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListDatabasesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTables = "ListTables" + +// ListTablesRequest generates a "aws/request.Request" representing the +// client's request for the ListTables 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 ListTables for more information on using the ListTables +// 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 ListTablesRequest method. +// req, resp := client.ListTablesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListTables +func (c *TimestreamWrite) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput) { + op := &request.Operation{ + Name: opListTables, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTablesInput{} + } + + output = &ListTablesOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// ListTables API operation for Amazon Timestream Write. +// +// A list of tables, along with the name, status and retention properties of +// each table. +// +// 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 Amazon Timestream Write's +// API operation ListTables for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * ValidationException +// Invalid or malformed request. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListTables +func (c *TimestreamWrite) ListTables(input *ListTablesInput) (*ListTablesOutput, error) { + req, out := c.ListTablesRequest(input) + return out, req.Send() +} + +// ListTablesWithContext is the same as ListTables with the addition of +// the ability to pass a context and additional request options. +// +// See ListTables 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 *TimestreamWrite) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error) { + req, out := c.ListTablesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTablesPages iterates over the pages of a ListTables operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTables 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 ListTables operation. +// pageNum := 0 +// err := client.ListTablesPages(params, +// func(page *timestreamwrite.ListTablesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *TimestreamWrite) ListTablesPages(input *ListTablesInput, fn func(*ListTablesOutput, bool) bool) error { + return c.ListTablesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTablesPagesWithContext same as ListTablesPages 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 *TimestreamWrite) ListTablesPagesWithContext(ctx aws.Context, input *ListTablesInput, fn func(*ListTablesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTablesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTablesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListTablesOutput), !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 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 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/timestream-write-2018-11-01/ListTagsForResource +func (c *TimestreamWrite) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// ListTagsForResource API operation for Amazon Timestream Write. +// +// List all tags on a Timestream 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 Amazon Timestream Write's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * ValidationException +// Invalid or malformed request. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListTagsForResource +func (c *TimestreamWrite) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource 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. +// +// 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 *TimestreamWrite) 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 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/timestream-write-2018-11-01/TagResource +func (c *TimestreamWrite) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// TagResource API operation for Amazon Timestream Write. +// +// Associate a set of tags with a Timestream resource. You can then activate +// these user-defined tags so that they appear on the Billing and Cost Management +// console for cost allocation tracking. +// +// 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 Amazon Timestream Write's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * ServiceQuotaExceededException +// Instance quota of resource exceeded for this account. +// +// * ValidationException +// Invalid or malformed request. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/TagResource +func (c *TimestreamWrite) 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 *TimestreamWrite) 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/timestream-write-2018-11-01/UntagResource +func (c *TimestreamWrite) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// UntagResource API operation for Amazon Timestream Write. +// +// Removes the association of tags from a Timestream 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 Amazon Timestream Write's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// * ValidationException +// Invalid or malformed request. +// +// * ServiceQuotaExceededException +// Instance quota of resource exceeded for this account. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UntagResource +func (c *TimestreamWrite) 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 *TimestreamWrite) 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 opUpdateDatabase = "UpdateDatabase" + +// UpdateDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDatabase 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 UpdateDatabase for more information on using the UpdateDatabase +// 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 UpdateDatabaseRequest method. +// req, resp := client.UpdateDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateDatabase +func (c *TimestreamWrite) UpdateDatabaseRequest(input *UpdateDatabaseInput) (req *request.Request, output *UpdateDatabaseOutput) { + op := &request.Operation{ + Name: opUpdateDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDatabaseInput{} + } + + output = &UpdateDatabaseOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// UpdateDatabase API operation for Amazon Timestream Write. +// +// Modifies the KMS key for an existing database. While updating the database, +// you must specify the database name and the identifier of the new KMS key +// to be used (KmsKeyId). If there are any concurrent UpdateDatabase requests, +// first writer wins. +// +// 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 Amazon Timestream Write's +// API operation UpdateDatabase for usage and error information. +// +// Returned Error Types: +// * ValidationException +// Invalid or malformed request. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * ServiceQuotaExceededException +// Instance quota of resource exceeded for this account. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateDatabase +func (c *TimestreamWrite) UpdateDatabase(input *UpdateDatabaseInput) (*UpdateDatabaseOutput, error) { + req, out := c.UpdateDatabaseRequest(input) + return out, req.Send() +} + +// UpdateDatabaseWithContext is the same as UpdateDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDatabase 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 *TimestreamWrite) UpdateDatabaseWithContext(ctx aws.Context, input *UpdateDatabaseInput, opts ...request.Option) (*UpdateDatabaseOutput, error) { + req, out := c.UpdateDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTable = "UpdateTable" + +// UpdateTableRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTable 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 UpdateTable for more information on using the UpdateTable +// 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 UpdateTableRequest method. +// req, resp := client.UpdateTableRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateTable +func (c *TimestreamWrite) UpdateTableRequest(input *UpdateTableInput) (req *request.Request, output *UpdateTableOutput) { + op := &request.Operation{ + Name: opUpdateTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTableInput{} + } + + output = &UpdateTableOutput{} + req = c.newRequest(op, input, output) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// UpdateTable API operation for Amazon Timestream Write. +// +// Modifies the retention duration of the memory store and magnetic store for +// your Timestream table. Note that the change in retention duration takes effect +// immediately. For example, if the retention period of the memory store was +// initially set to 2 hours and then changed to 24 hours, the memory store will +// be capable of holding 24 hours of data, but will be populated with 24 hours +// of data 22 hours after this change was made. Timestream does not retrieve +// data from the magnetic store to populate the memory store. +// +// Service quotas apply. For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// 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 Amazon Timestream Write's +// API operation UpdateTable for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * ValidationException +// Invalid or malformed request. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateTable +func (c *TimestreamWrite) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error) { + req, out := c.UpdateTableRequest(input) + return out, req.Send() +} + +// UpdateTableWithContext is the same as UpdateTable with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTable 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 *TimestreamWrite) UpdateTableWithContext(ctx aws.Context, input *UpdateTableInput, opts ...request.Option) (*UpdateTableOutput, error) { + req, out := c.UpdateTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opWriteRecords = "WriteRecords" + +// WriteRecordsRequest generates a "aws/request.Request" representing the +// client's request for the WriteRecords 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 WriteRecords for more information on using the WriteRecords +// 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 WriteRecordsRequest method. +// req, resp := client.WriteRecordsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/WriteRecords +func (c *TimestreamWrite) WriteRecordsRequest(input *WriteRecordsInput) (req *request.Request, output *WriteRecordsOutput) { + op := &request.Operation{ + Name: opWriteRecords, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &WriteRecordsInput{} + } + + output = &WriteRecordsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + // if custom endpoint for the request is set to a non empty string, + // we skip the endpoint discovery workflow. + if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { + de := discovererDescribeEndpoints{ + Required: true, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// WriteRecords API operation for Amazon Timestream Write. +// +// The WriteRecords operation enables you to write your time series data into +// Timestream. You can specify a single data point or a batch of data points +// to be inserted into the system. Timestream offers you with a flexible schema +// that auto detects the column names and data types for your Timestream tables +// based on the dimension names and data types of the data points you specify +// when invoking writes into the database. Timestream support eventual consistency +// read semantics. This means that when you query data immediately after writing +// a batch of data into Timestream, the query results might not reflect the +// results of a recently completed write operation. The results may also include +// some stale data. If you repeat the query request after a short time, the +// results should return the latest data. Service quotas apply. For more information, +// see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// 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 Amazon Timestream Write's +// API operation WriteRecords for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// Timestream was unable to fully process this request because of an internal +// server error. +// +// * ThrottlingException +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +// +// * ValidationException +// Invalid or malformed request. +// +// * ResourceNotFoundException +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +// +// * AccessDeniedException +// You are not authorized to perform this action. +// +// * RejectedRecordsException +// WriteRecords would throw this exception in the following cases: +// +// * Records with duplicate data where there are multiple records with the +// same dimensions, timestamps, and measure names but different measure values. +// +// * Records with timestamps that lie outside the retention duration of the +// memory store +// +// * Records with dimensions or measures that exceed the Timestream defined +// limits. +// +// For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +// +// * InvalidEndpointException +// The requested endpoint was invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/WriteRecords +func (c *TimestreamWrite) WriteRecords(input *WriteRecordsInput) (*WriteRecordsOutput, error) { + req, out := c.WriteRecordsRequest(input) + return out, req.Send() +} + +// WriteRecordsWithContext is the same as WriteRecords with the addition of +// the ability to pass a context and additional request options. +// +// See WriteRecords 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 *TimestreamWrite) WriteRecordsWithContext(ctx aws.Context, input *WriteRecordsInput, opts ...request.Option) (*WriteRecordsOutput, error) { + req, out := c.WriteRecordsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// You are not authorized to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) 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 *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Timestream was unable to process this request because it contains resource +// that already exists. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConflictException) 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 +} + +type CreateDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream database. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` + + // The KMS key for the database. If the KMS key is not specified, the database + // will be encrypted with a Timestream managed KMS key located in your account. + // Refer to AWS managed KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) + // for more info. + KmsKeyId *string `min:"1" type:"string"` + + // A list of key-value pairs to label the table. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDatabaseInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *CreateDatabaseInput) SetDatabaseName(v string) *CreateDatabaseInput { + s.DatabaseName = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateDatabaseInput) SetKmsKeyId(v string) *CreateDatabaseInput { + s.KmsKeyId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDatabaseInput) SetTags(v []*Tag) *CreateDatabaseInput { + s.Tags = v + return s +} + +type CreateDatabaseOutput struct { + _ struct{} `type:"structure"` + + // The newly created Timestream database. + Database *Database `type:"structure"` +} + +// String returns the string representation +func (s CreateDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDatabaseOutput) GoString() string { + return s.String() +} + +// SetDatabase sets the Database field's value. +func (s *CreateDatabaseOutput) SetDatabase(v *Database) *CreateDatabaseOutput { + s.Database = v + return s +} + +type CreateTableInput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream database. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` + + // The duration for which your time series data must be stored in the memory + // store and the magnetic store. + RetentionProperties *RetentionProperties `type:"structure"` + + // The name of the Timestream table. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` + + // A list of key-value pairs to label the table. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTableInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTableInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.RetentionProperties != nil { + if err := s.RetentionProperties.Validate(); err != nil { + invalidParams.AddNested("RetentionProperties", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *CreateTableInput) SetDatabaseName(v string) *CreateTableInput { + s.DatabaseName = &v + return s +} + +// SetRetentionProperties sets the RetentionProperties field's value. +func (s *CreateTableInput) SetRetentionProperties(v *RetentionProperties) *CreateTableInput { + s.RetentionProperties = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *CreateTableInput) SetTableName(v string) *CreateTableInput { + s.TableName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateTableInput) SetTags(v []*Tag) *CreateTableInput { + s.Tags = v + return s +} + +type CreateTableOutput struct { + _ struct{} `type:"structure"` + + // The newly created Timestream table. + Table *Table `type:"structure"` +} + +// String returns the string representation +func (s CreateTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTableOutput) GoString() string { + return s.String() +} + +// SetTable sets the Table field's value. +func (s *CreateTableOutput) SetTable(v *Table) *CreateTableOutput { + s.Table = v + return s +} + +// A top level container for a table. Databases and tables are the fundamental +// management concepts in Amazon Timestream. All tables in a database are encrypted +// with the same KMS key. +type Database struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name that uniquely identifies this database. + Arn *string `type:"string"` + + // The time when the database was created, calculated from the Unix epoch time. + CreationTime *time.Time `type:"timestamp"` + + // The name of the Timestream database. + DatabaseName *string `min:"3" type:"string"` + + // The identifier of the KMS key used to encrypt the data stored in the database. + KmsKeyId *string `min:"1" type:"string"` + + // The last time that this database was updated. + LastUpdatedTime *time.Time `type:"timestamp"` + + // The total number of tables found within a Timestream database. + TableCount *int64 `type:"long"` +} + +// String returns the string representation +func (s Database) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Database) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Database) SetArn(v string) *Database { + s.Arn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *Database) SetCreationTime(v time.Time) *Database { + s.CreationTime = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *Database) SetDatabaseName(v string) *Database { + s.DatabaseName = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *Database) SetKmsKeyId(v string) *Database { + s.KmsKeyId = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *Database) SetLastUpdatedTime(v time.Time) *Database { + s.LastUpdatedTime = &v + return s +} + +// SetTableCount sets the TableCount field's value. +func (s *Database) SetTableCount(v int64) *Database { + s.TableCount = &v + return s +} + +type DeleteDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream database to be deleted. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDatabaseInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *DeleteDatabaseInput) SetDatabaseName(v string) *DeleteDatabaseInput { + s.DatabaseName = &v + return s +} + +type DeleteDatabaseOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDatabaseOutput) GoString() string { + return s.String() +} + +type DeleteTableInput struct { + _ struct{} `type:"structure"` + + // The name of the database where the Timestream database is to be deleted. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` + + // The name of the Timestream table to be deleted. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTableInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTableInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *DeleteTableInput) SetDatabaseName(v string) *DeleteTableInput { + s.DatabaseName = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *DeleteTableInput) SetTableName(v string) *DeleteTableInput { + s.TableName = &v + return s +} + +type DeleteTableOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTableOutput) GoString() string { + return s.String() +} + +type DescribeDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream database. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDatabaseInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *DescribeDatabaseInput) SetDatabaseName(v string) *DescribeDatabaseInput { + s.DatabaseName = &v + return s +} + +type DescribeDatabaseOutput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream table. + Database *Database `type:"structure"` +} + +// String returns the string representation +func (s DescribeDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDatabaseOutput) GoString() string { + return s.String() +} + +// SetDatabase sets the Database field's value. +func (s *DescribeDatabaseOutput) SetDatabase(v *Database) *DescribeDatabaseOutput { + s.Database = v + return s +} + +type DescribeEndpointsInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsInput) GoString() string { + return s.String() +} + +type DescribeEndpointsOutput struct { + _ struct{} `type:"structure"` + + // An Endpoints object is returned when a DescribeEndpoints request is made. + // + // Endpoints is a required field + Endpoints []*Endpoint `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpoints sets the Endpoints field's value. +func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { + s.Endpoints = v + return s +} + +type DescribeTableInput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream database. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` + + // The name of the Timestream table. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTableInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTableInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *DescribeTableInput) SetDatabaseName(v string) *DescribeTableInput { + s.DatabaseName = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *DescribeTableInput) SetTableName(v string) *DescribeTableInput { + s.TableName = &v + return s +} + +type DescribeTableOutput struct { + _ struct{} `type:"structure"` + + // The Timestream table. + Table *Table `type:"structure"` +} + +// String returns the string representation +func (s DescribeTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTableOutput) GoString() string { + return s.String() +} + +// SetTable sets the Table field's value. +func (s *DescribeTableOutput) SetTable(v *Table) *DescribeTableOutput { + s.Table = v + return s +} + +// Dimension represents the meta data attributes of the time series. For example, +// the name and availability zone of an EC2 instance or the name of the manufacturer +// of a wind turbine are dimensions. +type Dimension struct { + _ struct{} `type:"structure"` + + // The data type of the dimension for the time series data point. + DimensionValueType *string `type:"string" enum:"DimensionValueType"` + + // Dimension represents the meta data attributes of the time series. For example, + // the name and availability zone of an EC2 instance or the name of the manufacturer + // of a wind turbine are dimensions. Dimension names can only contain alphanumeric + // characters and underscores. Dimension names cannot end with an underscore. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The value of the dimension. + // + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Dimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Dimension) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Dimension) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Dimension"} + 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.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDimensionValueType sets the DimensionValueType field's value. +func (s *Dimension) SetDimensionValueType(v string) *Dimension { + s.DimensionValueType = &v + return s +} + +// SetName sets the Name field's value. +func (s *Dimension) SetName(v string) *Dimension { + s.Name = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Dimension) SetValue(v string) *Dimension { + s.Value = &v + return s +} + +// Represents an available endpoint against which to make API calls agaisnt, +// as well as the TTL for that endpoint. +type Endpoint struct { + _ struct{} `type:"structure"` + + // An endpoint address. + // + // Address is a required field + Address *string `type:"string" required:"true"` + + // The TTL for the endpoint, in minutes. + // + // CachePeriodInMinutes is a required field + CachePeriodInMinutes *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s Endpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Endpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *Endpoint) SetAddress(v string) *Endpoint { + s.Address = &v + return s +} + +// SetCachePeriodInMinutes sets the CachePeriodInMinutes field's value. +func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint { + s.CachePeriodInMinutes = &v + return s +} + +// Timestream was unable to fully process this request because of an internal +// server error. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InternalServerException) GoString() string { + return s.String() +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// 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 +} + +// The requested endpoint was invalid. +type InvalidEndpointException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s InvalidEndpointException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InvalidEndpointException) GoString() string { + return s.String() +} + +func newErrorInvalidEndpointException(v protocol.ResponseMetadata) error { + return &InvalidEndpointException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidEndpointException) Code() string { + return "InvalidEndpointException" +} + +// Message returns the exception's message. +func (s *InvalidEndpointException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidEndpointException) OrigErr() error { + return nil +} + +func (s *InvalidEndpointException) 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 *InvalidEndpointException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidEndpointException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListDatabasesInput struct { + _ struct{} `type:"structure"` + + // The total number of items to return in the output. If the total number of + // items available is more than the value specified, a NextToken is provided + // in the output. To resume pagination, provide the NextToken value as argument + // of a subsequent API invocation. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token. To resume pagination, provide the NextToken value as + // argument of a subsequent API invocation. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDatabasesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDatabasesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDatabasesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDatabasesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDatabasesInput) SetMaxResults(v int64) *ListDatabasesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDatabasesInput) SetNextToken(v string) *ListDatabasesInput { + s.NextToken = &v + return s +} + +type ListDatabasesOutput struct { + _ struct{} `type:"structure"` + + // A list of database names. + Databases []*Database `type:"list"` + + // The pagination token. This parameter is returned when the response is truncated. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListDatabasesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDatabasesOutput) GoString() string { + return s.String() +} + +// SetDatabases sets the Databases field's value. +func (s *ListDatabasesOutput) SetDatabases(v []*Database) *ListDatabasesOutput { + s.Databases = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDatabasesOutput) SetNextToken(v string) *ListDatabasesOutput { + s.NextToken = &v + return s +} + +type ListTablesInput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream database. + DatabaseName *string `min:"3" type:"string"` + + // The total number of items to return in the output. If the total number of + // items available is more than the value specified, a NextToken is provided + // in the output. To resume pagination, provide the NextToken value as argument + // of a subsequent API invocation. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token. To resume pagination, provide the NextToken value as + // argument of a subsequent API invocation. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListTablesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTablesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTablesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTablesInput"} + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *ListTablesInput) SetDatabaseName(v string) *ListTablesInput { + s.DatabaseName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTablesInput) SetMaxResults(v int64) *ListTablesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTablesInput) SetNextToken(v string) *ListTablesInput { + s.NextToken = &v + return s +} + +type ListTablesOutput struct { + _ struct{} `type:"structure"` + + // A token to specify where to start paginating. This is the NextToken from + // a previously truncated response. + NextToken *string `type:"string"` + + // A list of tables. + Tables []*Table `type:"list"` +} + +// String returns the string representation +func (s ListTablesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTablesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTablesOutput) SetNextToken(v string) *ListTablesOutput { + s.NextToken = &v + return s +} + +// SetTables sets the Tables field's value. +func (s *ListTablesOutput) SetTables(v []*Table) *ListTablesOutput { + s.Tables = v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Timestream resource with tags to be listed. This value is an Amazon Resource + // Name (ARN). + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + 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 +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The tags currently associated with the Timestream resource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// Record represents a time series data point being written into Timestream. +// Each record contains an array of dimensions. Dimensions represent the meta +// data attributes of a time series data point such as the instance name or +// availability zone of an EC2 instance. A record also contains the measure +// name which is the name of the measure being collected for example the CPU +// utilization of an EC2 instance. A record also contains the measure value +// and the value type which is the data type of the measure value. In addition, +// the record contains the timestamp when the measure was collected that the +// timestamp unit which represents the granularity of the timestamp. +type Record struct { + _ struct{} `type:"structure"` + + // Contains the list of dimensions for time series data points. + Dimensions []*Dimension `type:"list"` + + // Measure represents the data attribute of the time series. For example, the + // CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. + MeasureName *string `min:"1" type:"string"` + + // Contains the measure value for the time series data point. + MeasureValue *string `min:"1" type:"string"` + + // Contains the data type of the measure value for the time series data point. + MeasureValueType *string `type:"string" enum:"MeasureValueType"` + + // Contains the time at which the measure value for the data point was collected. + Time *string `min:"1" type:"string"` + + // The granularity of the timestamp unit. It indicates if the time value is + // in seconds, milliseconds, nanoseconds or other supported values. + TimeUnit *string `type:"string" enum:"TimeUnit"` +} + +// String returns the string representation +func (s Record) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Record) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Record) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Record"} + if s.MeasureName != nil && len(*s.MeasureName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeasureName", 1)) + } + if s.MeasureValue != nil && len(*s.MeasureValue) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MeasureValue", 1)) + } + if s.Time != nil && len(*s.Time) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Time", 1)) + } + if s.Dimensions != nil { + for i, v := range s.Dimensions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDimensions sets the Dimensions field's value. +func (s *Record) SetDimensions(v []*Dimension) *Record { + s.Dimensions = v + return s +} + +// SetMeasureName sets the MeasureName field's value. +func (s *Record) SetMeasureName(v string) *Record { + s.MeasureName = &v + return s +} + +// SetMeasureValue sets the MeasureValue field's value. +func (s *Record) SetMeasureValue(v string) *Record { + s.MeasureValue = &v + return s +} + +// SetMeasureValueType sets the MeasureValueType field's value. +func (s *Record) SetMeasureValueType(v string) *Record { + s.MeasureValueType = &v + return s +} + +// SetTime sets the Time field's value. +func (s *Record) SetTime(v string) *Record { + s.Time = &v + return s +} + +// SetTimeUnit sets the TimeUnit field's value. +func (s *Record) SetTimeUnit(v string) *Record { + s.TimeUnit = &v + return s +} + +// Records that were not successfully inserted into Timestream due to data validation +// issues that must be resolved prior to reinserting time series data into the +// system. +type RejectedRecord struct { + _ struct{} `type:"structure"` + + // The reason why a record was not successfully inserted into Timestream. Possible + // causes of failure include: + // + // * Records with duplicate data where there are multiple records with the + // same dimensions, timestamps, and measure names but different measure values. + // + // * Records with timestamps that lie outside the retention duration of the + // memory store + // + // * Records with dimensions or measures that exceed the Timestream defined + // limits. + // + // For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) + // in the Timestream Developer Guide. + Reason *string `type:"string"` + + // The index of the record in the input request for WriteRecords. Indexes begin + // with 0. + RecordIndex *int64 `type:"integer"` +} + +// String returns the string representation +func (s RejectedRecord) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectedRecord) GoString() string { + return s.String() +} + +// SetReason sets the Reason field's value. +func (s *RejectedRecord) SetReason(v string) *RejectedRecord { + s.Reason = &v + return s +} + +// SetRecordIndex sets the RecordIndex field's value. +func (s *RejectedRecord) SetRecordIndex(v int64) *RejectedRecord { + s.RecordIndex = &v + return s +} + +// WriteRecords would throw this exception in the following cases: +// +// * Records with duplicate data where there are multiple records with the +// same dimensions, timestamps, and measure names but different measure values. +// +// * Records with timestamps that lie outside the retention duration of the +// memory store +// +// * Records with dimensions or measures that exceed the Timestream defined +// limits. +// +// For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) +// in the Timestream Developer Guide. +type RejectedRecordsException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` + + RejectedRecords []*RejectedRecord `type:"list"` +} + +// String returns the string representation +func (s RejectedRecordsException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectedRecordsException) GoString() string { + return s.String() +} + +func newErrorRejectedRecordsException(v protocol.ResponseMetadata) error { + return &RejectedRecordsException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *RejectedRecordsException) Code() string { + return "RejectedRecordsException" +} + +// Message returns the exception's message. +func (s *RejectedRecordsException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *RejectedRecordsException) OrigErr() error { + return nil +} + +func (s *RejectedRecordsException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *RejectedRecordsException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *RejectedRecordsException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The operation tried to access a nonexistent resource. The resource might +// not be specified correctly, or its status might not be ACTIVE. +type ResourceNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ResourceNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceNotFoundException) GoString() string { + return s.String() +} + +func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { + return &ResourceNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ResourceNotFoundException) Code() string { + return "ResourceNotFoundException" +} + +// Message returns the exception's message. +func (s *ResourceNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ResourceNotFoundException) OrigErr() error { + return nil +} + +func (s *ResourceNotFoundException) 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 *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Retention properties contain the duration for which your time series data +// must be stored in the magnetic store and the memory store. +type RetentionProperties struct { + _ struct{} `type:"structure"` + + // The duration for which data must be stored in the magnetic store. + // + // MagneticStoreRetentionPeriodInDays is a required field + MagneticStoreRetentionPeriodInDays *int64 `min:"1" type:"long" required:"true"` + + // The duration for which data must be stored in the memory store. + // + // MemoryStoreRetentionPeriodInHours is a required field + MemoryStoreRetentionPeriodInHours *int64 `min:"1" type:"long" required:"true"` +} + +// String returns the string representation +func (s RetentionProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetentionProperties) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetentionProperties) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetentionProperties"} + if s.MagneticStoreRetentionPeriodInDays == nil { + invalidParams.Add(request.NewErrParamRequired("MagneticStoreRetentionPeriodInDays")) + } + if s.MagneticStoreRetentionPeriodInDays != nil && *s.MagneticStoreRetentionPeriodInDays < 1 { + invalidParams.Add(request.NewErrParamMinValue("MagneticStoreRetentionPeriodInDays", 1)) + } + if s.MemoryStoreRetentionPeriodInHours == nil { + invalidParams.Add(request.NewErrParamRequired("MemoryStoreRetentionPeriodInHours")) + } + if s.MemoryStoreRetentionPeriodInHours != nil && *s.MemoryStoreRetentionPeriodInHours < 1 { + invalidParams.Add(request.NewErrParamMinValue("MemoryStoreRetentionPeriodInHours", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMagneticStoreRetentionPeriodInDays sets the MagneticStoreRetentionPeriodInDays field's value. +func (s *RetentionProperties) SetMagneticStoreRetentionPeriodInDays(v int64) *RetentionProperties { + s.MagneticStoreRetentionPeriodInDays = &v + return s +} + +// SetMemoryStoreRetentionPeriodInHours sets the MemoryStoreRetentionPeriodInHours field's value. +func (s *RetentionProperties) SetMemoryStoreRetentionPeriodInHours(v int64) *RetentionProperties { + s.MemoryStoreRetentionPeriodInHours = &v + return s +} + +// Instance quota of resource exceeded for this account. +type ServiceQuotaExceededException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ServiceQuotaExceededException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +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 +} + +// Table represents a database table in Timestream. Tables contain one or more +// related time series. You can modify the retention duration of the memory +// store and the magnetic store for a table. +type Table struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name that uniquely identifies this table. + Arn *string `type:"string"` + + // The time when the Timestream table was created. + CreationTime *time.Time `type:"timestamp"` + + // The name of the Timestream database that contains this table. + DatabaseName *string `min:"3" type:"string"` + + // The time when the Timestream table was last updated. + LastUpdatedTime *time.Time `type:"timestamp"` + + // The retention duration for the memory store and magnetic store. + RetentionProperties *RetentionProperties `type:"structure"` + + // The name of the Timestream table. + TableName *string `min:"3" type:"string"` + + // The current state of the table: + // + // * DELETING - The table is being deleted. + // + // * ACTIVE - The table is ready for use. + TableStatus *string `type:"string" enum:"TableStatus"` +} + +// String returns the string representation +func (s Table) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Table) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Table) SetArn(v string) *Table { + s.Arn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *Table) SetCreationTime(v time.Time) *Table { + s.CreationTime = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *Table) SetDatabaseName(v string) *Table { + s.DatabaseName = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *Table) SetLastUpdatedTime(v time.Time) *Table { + s.LastUpdatedTime = &v + return s +} + +// SetRetentionProperties sets the RetentionProperties field's value. +func (s *Table) SetRetentionProperties(v *RetentionProperties) *Table { + s.RetentionProperties = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *Table) SetTableName(v string) *Table { + s.TableName = &v + return s +} + +// SetTableStatus sets the TableStatus field's value. +func (s *Table) SetTableStatus(v string) *Table { + s.TableStatus = &v + return s +} + +// A tag is a label that you assign to a Timestream database and/or table. Each +// tag consists of a key and an optional value, both of which you define. Tags +// enable you to categorize databases and/or tables, for example, by purpose, +// owner, or environment. +type Tag struct { + _ struct{} `type:"structure"` + + // The key of the tag. Tag keys are case sensitive. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The value of the tag. Tag values are case-sensitive and can be null. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // Identifies the Timestream resource to which tags should be added. This value + // is an Amazon Resource Name (ARN). + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // The tags to be assigned to the Timestream resource. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// Too many requests were made by a user exceeding service quotas. The request +// was throttled. +type ThrottlingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ThrottlingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThrottlingException) GoString() string { + return s.String() +} + +func newErrorThrottlingException(v protocol.ResponseMetadata) error { + return &ThrottlingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ThrottlingException) Code() string { + return "ThrottlingException" +} + +// Message returns the exception's message. +func (s *ThrottlingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ThrottlingException) OrigErr() error { + return nil +} + +func (s *ThrottlingException) 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 *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Timestream resource that the tags will be removed from. This value is + // an Amazon Resource Name (ARN). + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // A list of tags keys. Existing tags of the resource whose keys are members + // of this list will be removed from the Timestream resource. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +type UpdateDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of the database. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` + + // The identifier of the new KMS key (KmsKeyId) to be used to encrypt the data + // stored in the database. If the KmsKeyId currently registered with the database + // is the same as the KmsKeyId in the request, there will not be any update. + // + // You can specify the KmsKeyId using any of the following: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Alias name: alias/ExampleAlias + // + // * Alias ARN: arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias + // + // KmsKeyId is a required field + KmsKeyId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDatabaseInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.KmsKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) + } + if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *UpdateDatabaseInput) SetDatabaseName(v string) *UpdateDatabaseInput { + s.DatabaseName = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *UpdateDatabaseInput) SetKmsKeyId(v string) *UpdateDatabaseInput { + s.KmsKeyId = &v + return s +} + +type UpdateDatabaseOutput struct { + _ struct{} `type:"structure"` + + // A top level container for a table. Databases and tables are the fundamental + // management concepts in Amazon Timestream. All tables in a database are encrypted + // with the same KMS key. + Database *Database `type:"structure"` +} + +// String returns the string representation +func (s UpdateDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDatabaseOutput) GoString() string { + return s.String() +} + +// SetDatabase sets the Database field's value. +func (s *UpdateDatabaseOutput) SetDatabase(v *Database) *UpdateDatabaseOutput { + s.Database = v + return s +} + +type UpdateTableInput struct { + _ struct{} `type:"structure"` + + // The name of the Timestream database. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` + + // The retention duration of the memory store and the magnetic store. + // + // RetentionProperties is a required field + RetentionProperties *RetentionProperties `type:"structure" required:"true"` + + // The name of the Timesream table. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTableInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTableInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.RetentionProperties == nil { + invalidParams.Add(request.NewErrParamRequired("RetentionProperties")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.RetentionProperties != nil { + if err := s.RetentionProperties.Validate(); err != nil { + invalidParams.AddNested("RetentionProperties", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *UpdateTableInput) SetDatabaseName(v string) *UpdateTableInput { + s.DatabaseName = &v + return s +} + +// SetRetentionProperties sets the RetentionProperties field's value. +func (s *UpdateTableInput) SetRetentionProperties(v *RetentionProperties) *UpdateTableInput { + s.RetentionProperties = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *UpdateTableInput) SetTableName(v string) *UpdateTableInput { + s.TableName = &v + return s +} + +type UpdateTableOutput struct { + _ struct{} `type:"structure"` + + // The updated Timestream table. + Table *Table `type:"structure"` +} + +// String returns the string representation +func (s UpdateTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTableOutput) GoString() string { + return s.String() +} + +// SetTable sets the Table field's value. +func (s *UpdateTableOutput) SetTable(v *Table) *UpdateTableOutput { + s.Table = v + return s +} + +// Invalid or malformed request. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationException) GoString() string { + return s.String() +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) 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 *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} + +type WriteRecordsInput struct { + _ struct{} `type:"structure"` + + // A record containing the common measure and dimension attributes shared across + // all the records in the request. The measure and dimension attributes specified + // in here will be merged with the measure and dimension attributes in the records + // object when the data is written into Timestream. + CommonAttributes *Record `type:"structure"` + + // The name of the Timestream database. + // + // DatabaseName is a required field + DatabaseName *string `min:"3" type:"string" required:"true"` + + // An array of records containing the unique dimension and measure attributes + // for each time series data point. + // + // Records is a required field + Records []*Record `min:"1" type:"list" required:"true"` + + // The name of the Timesream table. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s WriteRecordsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteRecordsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WriteRecordsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WriteRecordsInput"} + if s.DatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("DatabaseName")) + } + if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) + } + if s.Records == nil { + invalidParams.Add(request.NewErrParamRequired("Records")) + } + if s.Records != nil && len(s.Records) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Records", 1)) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.CommonAttributes != nil { + if err := s.CommonAttributes.Validate(); err != nil { + invalidParams.AddNested("CommonAttributes", err.(request.ErrInvalidParams)) + } + } + if s.Records != nil { + for i, v := range s.Records { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCommonAttributes sets the CommonAttributes field's value. +func (s *WriteRecordsInput) SetCommonAttributes(v *Record) *WriteRecordsInput { + s.CommonAttributes = v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *WriteRecordsInput) SetDatabaseName(v string) *WriteRecordsInput { + s.DatabaseName = &v + return s +} + +// SetRecords sets the Records field's value. +func (s *WriteRecordsInput) SetRecords(v []*Record) *WriteRecordsInput { + s.Records = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *WriteRecordsInput) SetTableName(v string) *WriteRecordsInput { + s.TableName = &v + return s +} + +type WriteRecordsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s WriteRecordsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteRecordsOutput) GoString() string { + return s.String() +} + +const ( + // DimensionValueTypeVarchar is a DimensionValueType enum value + DimensionValueTypeVarchar = "VARCHAR" +) + +// DimensionValueType_Values returns all elements of the DimensionValueType enum +func DimensionValueType_Values() []string { + return []string{ + DimensionValueTypeVarchar, + } +} + +const ( + // MeasureValueTypeDouble is a MeasureValueType enum value + MeasureValueTypeDouble = "DOUBLE" + + // MeasureValueTypeBigint is a MeasureValueType enum value + MeasureValueTypeBigint = "BIGINT" + + // MeasureValueTypeVarchar is a MeasureValueType enum value + MeasureValueTypeVarchar = "VARCHAR" + + // MeasureValueTypeBoolean is a MeasureValueType enum value + MeasureValueTypeBoolean = "BOOLEAN" +) + +// MeasureValueType_Values returns all elements of the MeasureValueType enum +func MeasureValueType_Values() []string { + return []string{ + MeasureValueTypeDouble, + MeasureValueTypeBigint, + MeasureValueTypeVarchar, + MeasureValueTypeBoolean, + } +} + +const ( + // TableStatusActive is a TableStatus enum value + TableStatusActive = "ACTIVE" + + // TableStatusDeleting is a TableStatus enum value + TableStatusDeleting = "DELETING" +) + +// TableStatus_Values returns all elements of the TableStatus enum +func TableStatus_Values() []string { + return []string{ + TableStatusActive, + TableStatusDeleting, + } +} + +const ( + // TimeUnitMilliseconds is a TimeUnit enum value + TimeUnitMilliseconds = "MILLISECONDS" + + // TimeUnitSeconds is a TimeUnit enum value + TimeUnitSeconds = "SECONDS" + + // TimeUnitMicroseconds is a TimeUnit enum value + TimeUnitMicroseconds = "MICROSECONDS" + + // TimeUnitNanoseconds is a TimeUnit enum value + TimeUnitNanoseconds = "NANOSECONDS" +) + +// TimeUnit_Values returns all elements of the TimeUnit enum +func TimeUnit_Values() []string { + return []string{ + TimeUnitMilliseconds, + TimeUnitSeconds, + TimeUnitMicroseconds, + TimeUnitNanoseconds, + } +} diff --git a/service/timestreamwrite/doc.go b/service/timestreamwrite/doc.go new file mode 100644 index 00000000000..58960a6811d --- /dev/null +++ b/service/timestreamwrite/doc.go @@ -0,0 +1,40 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package timestreamwrite provides the client and types for making API +// requests to Amazon Timestream Write. +// +// Amazon Timestream is a fast, scalable, fully managed time series database +// service that makes it easy to store and analyze trillions of time series +// data points per day. With Timestream, you can easily store and analyze IoT +// sensor data to derive insights from your IoT applications. You can analyze +// industrial telemetry to streamline equipment management and maintenance. +// You can also store and analyze log data and metrics to improve the performance +// and availability of your applications. Timestream is built from the ground +// up to effectively ingest, process, and store time series data. It organizes +// data to optimize query processing. It automatically scales based on the volume +// of data ingested and on the query volume to ensure you receive optimal performance +// while inserting and querying data. As your data grows over time, Timestream’s +// adaptive query processing engine spans across storage tiers to provide fast +// analysis while reducing costs. +// +// See https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01 for more information on this service. +// +// See timestreamwrite package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/timestreamwrite/ +// +// Using the Client +// +// To contact Amazon Timestream Write with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Timestream Write client TimestreamWrite for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/timestreamwrite/#New +package timestreamwrite diff --git a/service/timestreamwrite/errors.go b/service/timestreamwrite/errors.go new file mode 100644 index 00000000000..03eb056260e --- /dev/null +++ b/service/timestreamwrite/errors.go @@ -0,0 +1,92 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package timestreamwrite + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You are not authorized to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // Timestream was unable to process this request because it contains resource + // that already exists. + ErrCodeConflictException = "ConflictException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // Timestream was unable to fully process this request because of an internal + // server error. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeInvalidEndpointException for service response error code + // "InvalidEndpointException". + // + // The requested endpoint was invalid. + ErrCodeInvalidEndpointException = "InvalidEndpointException" + + // ErrCodeRejectedRecordsException for service response error code + // "RejectedRecordsException". + // + // WriteRecords would throw this exception in the following cases: + // + // * Records with duplicate data where there are multiple records with the + // same dimensions, timestamps, and measure names but different measure values. + // + // * Records with timestamps that lie outside the retention duration of the + // memory store + // + // * Records with dimensions or measures that exceed the Timestream defined + // limits. + // + // For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) + // in the Timestream Developer Guide. + ErrCodeRejectedRecordsException = "RejectedRecordsException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The operation tried to access a nonexistent resource. The resource might + // not be specified correctly, or its status might not be ACTIVE. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServiceQuotaExceededException for service response error code + // "ServiceQuotaExceededException". + // + // Instance quota of resource exceeded for this account. + ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // Too many requests were made by a user exceeding service quotas. The request + // was throttled. + ErrCodeThrottlingException = "ThrottlingException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // Invalid or malformed request. + ErrCodeValidationException = "ValidationException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, + "ConflictException": newErrorConflictException, + "InternalServerException": newErrorInternalServerException, + "InvalidEndpointException": newErrorInvalidEndpointException, + "RejectedRecordsException": newErrorRejectedRecordsException, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, + "ThrottlingException": newErrorThrottlingException, + "ValidationException": newErrorValidationException, +} diff --git a/service/timestreamwrite/service.go b/service/timestreamwrite/service.go new file mode 100644 index 00000000000..263af2b6c50 --- /dev/null +++ b/service/timestreamwrite/service.go @@ -0,0 +1,109 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package timestreamwrite + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/crr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// TimestreamWrite provides the API operation methods for making requests to +// Amazon Timestream Write. See this package's package overview docs +// for details on the service. +// +// TimestreamWrite methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type TimestreamWrite struct { + *client.Client + endpointCache *crr.EndpointCache +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Timestream Write" // Name of service. + EndpointsID = "ingest.timestream" // ID to lookup a service endpoint with. + ServiceID = "Timestream Write" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the TimestreamWrite client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// mySession := session.Must(session.NewSession()) +// +// // Create a TimestreamWrite client from just a session. +// svc := timestreamwrite.New(mySession) +// +// // Create a TimestreamWrite client with additional configuration +// svc := timestreamwrite.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *TimestreamWrite { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "timestream" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *TimestreamWrite { + svc := &TimestreamWrite{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2018-11-01", + JSONVersion: "1.0", + TargetPrefix: "Timestream_20181101", + }, + handlers, + ), + } + svc.endpointCache = crr.NewEndpointCache(10) + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a TimestreamWrite operation and runs any +// custom request initialization. +func (c *TimestreamWrite) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/service/timestreamwrite/timestreamwriteiface/interface.go b/service/timestreamwrite/timestreamwriteiface/interface.go new file mode 100644 index 00000000000..db6a174ec05 --- /dev/null +++ b/service/timestreamwrite/timestreamwriteiface/interface.go @@ -0,0 +1,130 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package timestreamwriteiface provides an interface to enable mocking the Amazon Timestream Write service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package timestreamwriteiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/timestreamwrite" +) + +// TimestreamWriteAPI provides an interface to enable mocking the +// timestreamwrite.TimestreamWrite service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // Amazon Timestream Write. +// func myFunc(svc timestreamwriteiface.TimestreamWriteAPI) bool { +// // Make svc.CreateDatabase request +// } +// +// func main() { +// sess := session.New() +// svc := timestreamwrite.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockTimestreamWriteClient struct { +// timestreamwriteiface.TimestreamWriteAPI +// } +// func (m *mockTimestreamWriteClient) CreateDatabase(input *timestreamwrite.CreateDatabaseInput) (*timestreamwrite.CreateDatabaseOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockTimestreamWriteClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type TimestreamWriteAPI interface { + CreateDatabase(*timestreamwrite.CreateDatabaseInput) (*timestreamwrite.CreateDatabaseOutput, error) + CreateDatabaseWithContext(aws.Context, *timestreamwrite.CreateDatabaseInput, ...request.Option) (*timestreamwrite.CreateDatabaseOutput, error) + CreateDatabaseRequest(*timestreamwrite.CreateDatabaseInput) (*request.Request, *timestreamwrite.CreateDatabaseOutput) + + CreateTable(*timestreamwrite.CreateTableInput) (*timestreamwrite.CreateTableOutput, error) + CreateTableWithContext(aws.Context, *timestreamwrite.CreateTableInput, ...request.Option) (*timestreamwrite.CreateTableOutput, error) + CreateTableRequest(*timestreamwrite.CreateTableInput) (*request.Request, *timestreamwrite.CreateTableOutput) + + DeleteDatabase(*timestreamwrite.DeleteDatabaseInput) (*timestreamwrite.DeleteDatabaseOutput, error) + DeleteDatabaseWithContext(aws.Context, *timestreamwrite.DeleteDatabaseInput, ...request.Option) (*timestreamwrite.DeleteDatabaseOutput, error) + DeleteDatabaseRequest(*timestreamwrite.DeleteDatabaseInput) (*request.Request, *timestreamwrite.DeleteDatabaseOutput) + + DeleteTable(*timestreamwrite.DeleteTableInput) (*timestreamwrite.DeleteTableOutput, error) + DeleteTableWithContext(aws.Context, *timestreamwrite.DeleteTableInput, ...request.Option) (*timestreamwrite.DeleteTableOutput, error) + DeleteTableRequest(*timestreamwrite.DeleteTableInput) (*request.Request, *timestreamwrite.DeleteTableOutput) + + DescribeDatabase(*timestreamwrite.DescribeDatabaseInput) (*timestreamwrite.DescribeDatabaseOutput, error) + DescribeDatabaseWithContext(aws.Context, *timestreamwrite.DescribeDatabaseInput, ...request.Option) (*timestreamwrite.DescribeDatabaseOutput, error) + DescribeDatabaseRequest(*timestreamwrite.DescribeDatabaseInput) (*request.Request, *timestreamwrite.DescribeDatabaseOutput) + + DescribeEndpoints(*timestreamwrite.DescribeEndpointsInput) (*timestreamwrite.DescribeEndpointsOutput, error) + DescribeEndpointsWithContext(aws.Context, *timestreamwrite.DescribeEndpointsInput, ...request.Option) (*timestreamwrite.DescribeEndpointsOutput, error) + DescribeEndpointsRequest(*timestreamwrite.DescribeEndpointsInput) (*request.Request, *timestreamwrite.DescribeEndpointsOutput) + + DescribeTable(*timestreamwrite.DescribeTableInput) (*timestreamwrite.DescribeTableOutput, error) + DescribeTableWithContext(aws.Context, *timestreamwrite.DescribeTableInput, ...request.Option) (*timestreamwrite.DescribeTableOutput, error) + DescribeTableRequest(*timestreamwrite.DescribeTableInput) (*request.Request, *timestreamwrite.DescribeTableOutput) + + ListDatabases(*timestreamwrite.ListDatabasesInput) (*timestreamwrite.ListDatabasesOutput, error) + ListDatabasesWithContext(aws.Context, *timestreamwrite.ListDatabasesInput, ...request.Option) (*timestreamwrite.ListDatabasesOutput, error) + ListDatabasesRequest(*timestreamwrite.ListDatabasesInput) (*request.Request, *timestreamwrite.ListDatabasesOutput) + + ListDatabasesPages(*timestreamwrite.ListDatabasesInput, func(*timestreamwrite.ListDatabasesOutput, bool) bool) error + ListDatabasesPagesWithContext(aws.Context, *timestreamwrite.ListDatabasesInput, func(*timestreamwrite.ListDatabasesOutput, bool) bool, ...request.Option) error + + ListTables(*timestreamwrite.ListTablesInput) (*timestreamwrite.ListTablesOutput, error) + ListTablesWithContext(aws.Context, *timestreamwrite.ListTablesInput, ...request.Option) (*timestreamwrite.ListTablesOutput, error) + ListTablesRequest(*timestreamwrite.ListTablesInput) (*request.Request, *timestreamwrite.ListTablesOutput) + + ListTablesPages(*timestreamwrite.ListTablesInput, func(*timestreamwrite.ListTablesOutput, bool) bool) error + ListTablesPagesWithContext(aws.Context, *timestreamwrite.ListTablesInput, func(*timestreamwrite.ListTablesOutput, bool) bool, ...request.Option) error + + ListTagsForResource(*timestreamwrite.ListTagsForResourceInput) (*timestreamwrite.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *timestreamwrite.ListTagsForResourceInput, ...request.Option) (*timestreamwrite.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*timestreamwrite.ListTagsForResourceInput) (*request.Request, *timestreamwrite.ListTagsForResourceOutput) + + TagResource(*timestreamwrite.TagResourceInput) (*timestreamwrite.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *timestreamwrite.TagResourceInput, ...request.Option) (*timestreamwrite.TagResourceOutput, error) + TagResourceRequest(*timestreamwrite.TagResourceInput) (*request.Request, *timestreamwrite.TagResourceOutput) + + UntagResource(*timestreamwrite.UntagResourceInput) (*timestreamwrite.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *timestreamwrite.UntagResourceInput, ...request.Option) (*timestreamwrite.UntagResourceOutput, error) + UntagResourceRequest(*timestreamwrite.UntagResourceInput) (*request.Request, *timestreamwrite.UntagResourceOutput) + + UpdateDatabase(*timestreamwrite.UpdateDatabaseInput) (*timestreamwrite.UpdateDatabaseOutput, error) + UpdateDatabaseWithContext(aws.Context, *timestreamwrite.UpdateDatabaseInput, ...request.Option) (*timestreamwrite.UpdateDatabaseOutput, error) + UpdateDatabaseRequest(*timestreamwrite.UpdateDatabaseInput) (*request.Request, *timestreamwrite.UpdateDatabaseOutput) + + UpdateTable(*timestreamwrite.UpdateTableInput) (*timestreamwrite.UpdateTableOutput, error) + UpdateTableWithContext(aws.Context, *timestreamwrite.UpdateTableInput, ...request.Option) (*timestreamwrite.UpdateTableOutput, error) + UpdateTableRequest(*timestreamwrite.UpdateTableInput) (*request.Request, *timestreamwrite.UpdateTableOutput) + + WriteRecords(*timestreamwrite.WriteRecordsInput) (*timestreamwrite.WriteRecordsOutput, error) + WriteRecordsWithContext(aws.Context, *timestreamwrite.WriteRecordsInput, ...request.Option) (*timestreamwrite.WriteRecordsOutput, error) + WriteRecordsRequest(*timestreamwrite.WriteRecordsInput) (*request.Request, *timestreamwrite.WriteRecordsOutput) +} + +var _ TimestreamWriteAPI = (*timestreamwrite.TimestreamWrite)(nil)