diff --git a/CHANGELOG.md b/CHANGELOG.md index 51c2649664d..87468bdd00e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Release v1.31.13 (2020-06-08) +=== + +### Service Client Updates +* `service/servicediscovery`: Updates service API, documentation, and examples + * Added support for tagging Service and Namespace type resources in Cloud Map +* `service/shield`: Updates service API, documentation, and paginators + * This release adds the option for customers to identify a contact name and method that the DDoS Response Team can proactively engage when a Route 53 Health Check that is associated with a Shield protected resource fails. + Release v1.31.12 (2020-06-05) === diff --git a/aws/version.go b/aws/version.go index 28e186602a9..08ed0cd13ab 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.31.12" +const SDKVersion = "1.31.13" diff --git a/models/apis/servicediscovery/2017-03-14/api-2.json b/models/apis/servicediscovery/2017-03-14/api-2.json index 37a694c362d..46d988a0c24 100644 --- a/models/apis/servicediscovery/2017-03-14/api-2.json +++ b/models/apis/servicediscovery/2017-03-14/api-2.json @@ -25,7 +25,8 @@ {"shape":"InvalidInput"}, {"shape":"NamespaceAlreadyExists"}, {"shape":"ResourceLimitExceeded"}, - {"shape":"DuplicateRequest"} + {"shape":"DuplicateRequest"}, + {"shape":"TooManyTagsException"} ] }, "CreatePrivateDnsNamespace":{ @@ -40,7 +41,8 @@ {"shape":"InvalidInput"}, {"shape":"NamespaceAlreadyExists"}, {"shape":"ResourceLimitExceeded"}, - {"shape":"DuplicateRequest"} + {"shape":"DuplicateRequest"}, + {"shape":"TooManyTagsException"} ] }, "CreatePublicDnsNamespace":{ @@ -55,7 +57,8 @@ {"shape":"InvalidInput"}, {"shape":"NamespaceAlreadyExists"}, {"shape":"ResourceLimitExceeded"}, - {"shape":"DuplicateRequest"} + {"shape":"DuplicateRequest"}, + {"shape":"TooManyTagsException"} ] }, "CreateService":{ @@ -70,7 +73,8 @@ {"shape":"InvalidInput"}, {"shape":"ResourceLimitExceeded"}, {"shape":"NamespaceNotFound"}, - {"shape":"ServiceAlreadyExists"} + {"shape":"ServiceAlreadyExists"}, + {"shape":"TooManyTagsException"} ] }, "DeleteNamespace":{ @@ -129,7 +133,8 @@ "errors":[ {"shape":"ServiceNotFound"}, {"shape":"NamespaceNotFound"}, - {"shape":"InvalidInput"} + {"shape":"InvalidInput"}, + {"shape":"RequestLimitExceeded"} ], "endpoint":{"hostPrefix":"data-"} }, @@ -249,6 +254,19 @@ {"shape":"InvalidInput"} ] }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidInput"} + ] + }, "RegisterInstance":{ "name":"RegisterInstance", "http":{ @@ -265,6 +283,33 @@ {"shape":"ServiceNotFound"} ] }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"TooManyTagsException"}, + {"shape":"InvalidInput"} + ] + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InvalidInput"} + ] + }, "UpdateInstanceCustomHealthStatus":{ "name":"UpdateInstanceCustomHealthStatus", "http":{ @@ -295,17 +340,24 @@ } }, "shapes":{ + "AmazonResourceName":{ + "type":"string", + "max":1011, + "min":1 + }, "Arn":{ "type":"string", "max":255 }, "AttrKey":{ "type":"string", - "max":255 + "max":255, + "pattern":"^[a-zA-Z0-9!-~]+$" }, "AttrValue":{ "type":"string", - "max":1024 + "max":1024, + "pattern":"^([a-zA-Z0-9!-~][ \\ta-zA-Z0-9!-~]*){0,1}[a-zA-Z0-9!-~]{0,1}$" }, "Attributes":{ "type":"map", @@ -322,7 +374,8 @@ "shape":"ResourceId", "idempotencyToken":true }, - "Description":{"shape":"ResourceDescription"} + "Description":{"shape":"ResourceDescription"}, + "Tags":{"shape":"TagList"} } }, "CreateHttpNamespaceResponse":{ @@ -344,7 +397,8 @@ "idempotencyToken":true }, "Description":{"shape":"ResourceDescription"}, - "Vpc":{"shape":"ResourceId"} + "Vpc":{"shape":"ResourceId"}, + "Tags":{"shape":"TagList"} } }, "CreatePrivateDnsNamespaceResponse":{ @@ -362,7 +416,8 @@ "shape":"ResourceId", "idempotencyToken":true }, - "Description":{"shape":"ResourceDescription"} + "Description":{"shape":"ResourceDescription"}, + "Tags":{"shape":"TagList"} } }, "CreatePublicDnsNamespaceResponse":{ @@ -384,7 +439,8 @@ "Description":{"shape":"ResourceDescription"}, "DnsConfig":{"shape":"DnsConfig"}, "HealthCheckConfig":{"shape":"HealthCheckConfig"}, - "HealthCheckCustomConfig":{"shape":"HealthCheckCustomConfig"} + "HealthCheckCustomConfig":{"shape":"HealthCheckCustomConfig"}, + "Tags":{"shape":"TagList"} } }, "CreateServiceResponse":{ @@ -458,7 +514,7 @@ "members":{ "NamespaceName":{"shape":"NamespaceName"}, "ServiceName":{"shape":"ServiceName"}, - "MaxResults":{"shape":"MaxResults"}, + "MaxResults":{"shape":"DiscoverMaxResults"}, "QueryParameters":{"shape":"Attributes"}, "HealthStatus":{"shape":"HealthStatusFilter"} } @@ -469,6 +525,11 @@ "Instances":{"shape":"HttpInstanceSummaryList"} } }, + "DiscoverMaxResults":{ + "type":"integer", + "max":1000, + "min":1 + }, "DnsConfig":{ "type":"structure", "required":["DnsRecords"], @@ -778,6 +839,19 @@ "NextToken":{"shape":"NextToken"} } }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["ResourceARN"], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"} + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "Tags":{"shape":"TagList"} + } + }, "MaxResults":{ "type":"integer", "max":100, @@ -1004,6 +1078,13 @@ "OperationId":{"shape":"OperationId"} } }, + "RequestLimitExceeded":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, "ResourceCount":{"type":"integer"}, "ResourceDescription":{ "type":"string", @@ -1027,6 +1108,13 @@ }, "exception":true }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"} + }, + "exception":true + }, "ResourcePath":{ "type":"string", "max":255 @@ -1065,7 +1153,6 @@ }, "ServiceChange":{ "type":"structure", - "required":["DnsConfig"], "members":{ "Description":{"shape":"ResourceDescription"}, "DnsConfig":{"shape":"DnsConfigChange"}, @@ -1121,7 +1208,80 @@ "CreateDate":{"shape":"Timestamp"} } }, + "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 + }, "Timestamp":{"type":"timestamp"}, + "TooManyTagsException":{ + "type":"structure", + "members":{ + "Message":{"shape":"ErrorMessage"}, + "ResourceName":{"shape":"AmazonResourceName"} + }, + "exception":true + }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "ResourceARN", + "TagKeys" + ], + "members":{ + "ResourceARN":{"shape":"AmazonResourceName"}, + "TagKeys":{"shape":"TagKeyList"} + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, "UpdateInstanceCustomHealthStatusRequest":{ "type":"structure", "required":[ diff --git a/models/apis/servicediscovery/2017-03-14/docs-2.json b/models/apis/servicediscovery/2017-03-14/docs-2.json index 3845d09fa72..16460739fc3 100644 --- a/models/apis/servicediscovery/2017-03-14/docs-2.json +++ b/models/apis/servicediscovery/2017-03-14/docs-2.json @@ -19,11 +19,23 @@ "ListNamespaces": "

Lists summary information about the namespaces that were created by the current AWS account.

", "ListOperations": "

Lists operations that match the criteria that you specify.

", "ListServices": "

Lists summary information for all the services that are associated with one or more specified namespaces.

", + "ListTagsForResource": "

Lists tags for the specified resource.

", "RegisterInstance": "

Creates or updates one or more records and, optionally, creates a health check based on the settings in a specified service. When you submit a RegisterInstance request, the following occurs:

One RegisterInstance request must complete before you can submit another request and specify the same service ID and instance ID.

For more information, see CreateService.

When AWS Cloud Map receives a DNS query for the specified DNS name, it returns the applicable value:

For the current limit on the number of instances that you can register using the same namespace and using the same service, see AWS Cloud Map Limits in the AWS Cloud Map Developer Guide.

", + "TagResource": "

Adds one or more tags to the specified resource.

", + "UntagResource": "

Removes one or more tags from the specified resource.

", "UpdateInstanceCustomHealthStatus": "

Submits a request to change the health status of a custom health check to healthy or unhealthy.

You can use UpdateInstanceCustomHealthStatus to change the status only for custom health checks, which you define using HealthCheckCustomConfig when you create a service. You can't use it to change the status for Route 53 health checks, which you define using HealthCheckConfig.

For more information, see HealthCheckCustomConfig.

", "UpdateService": "

Submits a request to perform the following operations:

For public and private DNS namespaces, note the following:

When you update settings for a service, AWS Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.

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

The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.

", + "TagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.

", + "TooManyTagsException$ResourceName": "

The name of the resource.

", + "UntagResourceRequest$ResourceARN": "

The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.

" + } + }, "Arn": { "base": null, "refs": { @@ -52,7 +64,7 @@ "HttpInstanceSummary$Attributes": "

If you included any attributes when you registered the instance, the values of those attributes.

", "Instance$Attributes": "

A string map that contains the following information for the service that you specify in ServiceId:

Supported attribute keys include the following:

AWS_ALIAS_DNS_NAME

If you want AWS Cloud Map to create a Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that is associated with the load balancer. For information about how to get the DNS name, see \"DNSName\" in the topic AliasTarget.

Note the following:

AWS_INSTANCE_CNAME

If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries, for example, example.com.

This value is required if the service specified by ServiceId includes settings for an CNAME record.

AWS_INSTANCE_IPV4

If the service configuration includes an A record, the IPv4 address that you want Route 53 to return in response to DNS queries, for example, 192.0.2.44.

This value is required if the service specified by ServiceId includes settings for an A record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.

AWS_INSTANCE_IPV6

If the service configuration includes an AAAA record, the IPv6 address that you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.

This value is required if the service specified by ServiceId includes settings for an AAAA record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.

AWS_INSTANCE_PORT

If the service includes an SRV record, the value that you want Route 53 to return for the port.

If the service includes HealthCheckConfig, the port on the endpoint that you want Route 53 to send requests to.

This value is required if you specified settings for an SRV record or a Route 53 health check when you created the service.

", "InstanceSummary$Attributes": "

A string map that contains the following information:

Supported attribute keys include the following:

", - "RegisterInstanceRequest$Attributes": "

A string map that contains the following information for the service that you specify in ServiceId:

Supported attribute keys include the following:

AWS_ALIAS_DNS_NAME

If you want AWS Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that is associated with the load balancer. For information about how to get the DNS name, see \"DNSName\" in the topic AliasTarget in the Route 53 API Reference.

Note the following:

AWS_INIT_HEALTH_STATUS

If the service configuration includes HealthCheckCustomConfig, you can optionally use AWS_INIT_HEALTH_STATUS to specify the initial status of the custom health check, HEALTHY or UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, the initial status is HEALTHY.

AWS_INSTANCE_CNAME

If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries, for example, example.com.

This value is required if the service specified by ServiceId includes settings for an CNAME record.

AWS_INSTANCE_IPV4

If the service configuration includes an A record, the IPv4 address that you want Route 53 to return in response to DNS queries, for example, 192.0.2.44.

This value is required if the service specified by ServiceId includes settings for an A record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.

AWS_INSTANCE_IPV6

If the service configuration includes an AAAA record, the IPv6 address that you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.

This value is required if the service specified by ServiceId includes settings for an AAAA record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.

AWS_INSTANCE_PORT

If the service includes an SRV record, the value that you want Route 53 to return for the port.

If the service includes HealthCheckConfig, the port on the endpoint that you want Route 53 to send requests to.

This value is required if you specified settings for an SRV record or a Route 53 health check when you created the service.

Custom attributes

You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters.

" + "RegisterInstanceRequest$Attributes": "

A string map that contains the following information for the service that you specify in ServiceId:

Supported attribute keys include the following:

AWS_ALIAS_DNS_NAME

If you want AWS Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that is associated with the load balancer. For information about how to get the DNS name, see \"DNSName\" in the topic AliasTarget in the Route 53 API Reference.

Note the following:

  • The configuration for the service that is specified by ServiceId must include settings for an A record, an AAAA record, or both.

  • In the service that is specified by ServiceId, the value of RoutingPolicy must be WEIGHTED.

  • If the service that is specified by ServiceId includes HealthCheckConfig settings, AWS Cloud Map will create the Route 53 health check, but it won't associate the health check with the alias record.

  • Auto naming currently doesn't support creating alias records that route traffic to AWS resources other than ELB load balancers.

  • If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values for any of the AWS_INSTANCE attributes.

AWS_INIT_HEALTH_STATUS

If the service configuration includes HealthCheckCustomConfig, you can optionally use AWS_INIT_HEALTH_STATUS to specify the initial status of the custom health check, HEALTHY or UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, the initial status is HEALTHY.

AWS_INSTANCE_CNAME

If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries, for example, example.com.

This value is required if the service specified by ServiceId includes settings for an CNAME record.

AWS_INSTANCE_IPV4

If the service configuration includes an A record, the IPv4 address that you want Route 53 to return in response to DNS queries, for example, 192.0.2.44.

This value is required if the service specified by ServiceId includes settings for an A record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.

AWS_INSTANCE_IPV6

If the service configuration includes an AAAA record, the IPv6 address that you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.

This value is required if the service specified by ServiceId includes settings for an AAAA record. If the service includes settings for an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.

AWS_INSTANCE_PORT

If the service includes an SRV record, the value that you want Route 53 to return for the port.

If the service includes HealthCheckConfig, the port on the endpoint that you want Route 53 to send requests to.

This value is required if you specified settings for an SRV record or a Route 53 health check when you created the service.

Custom attributes

You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. Total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.

" } }, "Code": { @@ -152,6 +164,12 @@ "refs": { } }, + "DiscoverMaxResults": { + "base": null, + "refs": { + "DiscoverInstancesRequest$MaxResults": "

The maximum number of instances that you want AWS Cloud Map to return in the response to a DiscoverInstances request. If you don't specify a value for MaxResults, AWS Cloud Map returns up to 100 instances.

" + } + }, "DnsConfig": { "base": "

A complex type that contains information about the Amazon Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.

", "refs": { @@ -200,10 +218,13 @@ "NamespaceAlreadyExists$Message": null, "NamespaceNotFound$Message": null, "OperationNotFound$Message": null, + "RequestLimitExceeded$Message": null, "ResourceInUse$Message": null, "ResourceLimitExceeded$Message": null, + "ResourceNotFoundException$Message": null, "ServiceAlreadyExists$Message": null, - "ServiceNotFound$Message": null + "ServiceNotFound$Message": null, + "TooManyTagsException$Message": null } }, "FailureThreshold": { @@ -419,10 +440,19 @@ "refs": { } }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, "MaxResults": { "base": null, "refs": { - "DiscoverInstancesRequest$MaxResults": "

The maximum number of instances that you want AWS Cloud Map to return in the response to a DiscoverInstances request. If you don't specify a value for MaxResults, AWS Cloud Map returns up to 100 instances.

", "GetInstancesHealthStatusRequest$MaxResults": "

The maximum number of instances that you want AWS Cloud Map to return in the response to a GetInstancesHealthStatus request. If you don't specify a value for MaxResults, AWS Cloud Map returns up to 100 instances.

", "ListInstancesRequest$MaxResults": "

The maximum number of instances that you want AWS Cloud Map to return in the response to a ListInstances request. If you don't specify a value for MaxResults, AWS Cloud Map returns up to 100 instances.

", "ListNamespacesRequest$MaxResults": "

The maximum number of namespaces that you want AWS Cloud Map to return in the response to a ListNamespaces request. If you don't specify a value for MaxResults, AWS Cloud Map returns up to 100 namespaces.

", @@ -626,6 +656,11 @@ "refs": { } }, + "RequestLimitExceeded": { + "base": "

The operation can't be completed because you've reached the limit on the number of requests.

", + "refs": { + } + }, "ResourceCount": { "base": null, "refs": { @@ -708,6 +743,11 @@ "refs": { } }, + "ResourceNotFoundException": { + "base": "

The operation can't be completed because the resource was not found.

", + "refs": { + } + }, "ResourcePath": { "base": null, "refs": { @@ -783,6 +823,52 @@ "ServiceSummariesList$member": null } }, + "Tag": { + "base": "

A custom key-value pair associated with a resource.

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

The key identifier, or name, of the tag.

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

The tag keys to remove from the specified resource.

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

The tags to add to the namespace. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

", + "CreatePrivateDnsNamespaceRequest$Tags": "

The tags to add to the namespace. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

", + "CreatePublicDnsNamespaceRequest$Tags": "

The tags to add to the namespace. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

", + "CreateServiceRequest$Tags": "

The tags to add to the service. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

", + "ListTagsForResourceResponse$Tags": "

The tags that are assigned to the resource.

", + "TagResourceRequest$Tags": "

The tags to add to the specified resource. Specifying the tag key is required. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.

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

The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.

" + } + }, "Timestamp": { "base": null, "refs": { @@ -794,6 +880,21 @@ "ServiceSummary$CreateDate": "

The date and time that the service was created.

" } }, + "TooManyTagsException": { + "base": "

The list of tags on the resource is over the limit. The maximum number of tags that can be applied to a resource is 50.

", + "refs": { + } + }, + "UntagResourceRequest": { + "base": null, + "refs": { + } + }, + "UntagResourceResponse": { + "base": null, + "refs": { + } + }, "UpdateInstanceCustomHealthStatusRequest": { "base": null, "refs": { diff --git a/models/apis/servicediscovery/2017-03-14/examples-1.json b/models/apis/servicediscovery/2017-03-14/examples-1.json index 08a7ff97dcf..cc99fe4cb49 100644 --- a/models/apis/servicediscovery/2017-03-14/examples-1.json +++ b/models/apis/servicediscovery/2017-03-14/examples-1.json @@ -1,6 +1,27 @@ { "version": "1.0", "examples": { + "CreateHttpNamespace": [ + { + "input": { + "CreatorRequestId": "example-creator-request-id-0001", + "Description": "Example.com AWS Cloud Map HTTP Namespace", + "Name": "example-http.com" + }, + "output": { + "OperationId": "httpvoqozuhfet5kzxoxg-a-response-example" + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example creates an HTTP namespace.", + "id": "createhttpnamespace-example-1590114811304", + "title": "CreateHttpNamespace example" + } + ], "CreatePrivateDnsNamespace": [ { "input": { @@ -22,6 +43,27 @@ "title": "Example: Create private DNS namespace" } ], + "CreatePublicDnsNamespace": [ + { + "input": { + "CreatorRequestId": "example-creator-request-id-0003", + "Description": "Example.com AWS Cloud Map Public DNS Namespace", + "Name": "example-public-dns.com" + }, + "output": { + "OperationId": "dns2voqozuhfet5kzxoxg-a-response-example" + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example creates a public namespace based on DNS.", + "id": "createpublicdnsnamespace-example-1590114940910", + "title": "CreatePublicDnsNamespace example" + } + ], "CreateService": [ { "input": { @@ -160,6 +202,91 @@ "title": "Example: Discover registered instances" } ], + "GetInstance": [ + { + "input": { + "InstanceId": "i-abcd1234", + "ServiceId": "srv-e4anhexample0004" + }, + "output": { + "Instance": { + "Attributes": { + "AWS_INSTANCE_IPV4": "192.0.2.44", + "AWS_INSTANCE_PORT": "80", + "color": "green", + "region": "us-west-2", + "stage": "beta" + }, + "Id": "i-abcd1234" + } + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example gets information about a specified instance.", + "id": "getinstance-example-1590115065598", + "title": "GetInstance example" + } + ], + "GetInstancesHealthStatus": [ + { + "input": { + "ServiceId": "srv-e4anhexample0004" + }, + "output": { + "Status": { + "i-abcd1234": "HEALTHY", + "i-abcd1235": "UNHEALTHY" + } + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example gets the current health status of one or more instances that are associate with a specified service.", + "id": "getinstanceshealthstatus-example-1590115176146", + "title": "GetInstancesHealthStatus example" + } + ], + "GetNamespace": [ + { + "input": { + "Id": "ns-e4anhexample0004" + }, + "output": { + "Namespace": { + "Arn": "arn:aws:servicediscovery:us-west-2: 123456789120:namespace/ns-e1tpmexample0001", + "CreateDate": "20181118T211712Z", + "CreatorRequestId": "example-creator-request-id-0001", + "Description": "Example.com AWS Cloud Map HTTP Namespace", + "Id": "ns-e1tpmexample0001", + "Name": "example-http.com", + "Properties": { + "DnsProperties": { + }, + "HttpProperties": { + "HttpName": "example-http.com" + } + }, + "Type": "HTTP" + } + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example gets information about a specified namespace.", + "id": "getnamespace-example-1590115383708", + "title": "GetNamespace example" + } + ], "GetOperation": [ { "input": { @@ -188,6 +315,38 @@ "title": "Example: Get operation result" } ], + "GetService": [ + { + "input": { + "Id": "srv-e4anhexample0004" + }, + "output": { + "Service": { + "Arn": "arn:aws:servicediscovery:us-west-2:123456789120:service/srv-e4anhexample0004", + "CreateDate": "20181118T211707Z", + "CreatorRequestId": "example-creator-request-id-0004", + "Description": "Example.com AWS Cloud Map HTTP Service", + "HealthCheckConfig": { + "FailureThreshold": 3, + "ResourcePath": "/", + "Type": "HTTPS" + }, + "Id": "srv-e4anhexample0004", + "Name": "example-http-service", + "NamespaceId": "ns-e4anhexample0004" + } + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example gets the settings for a specified service.", + "id": "getservice-example-1590117234294", + "title": "GetService Example" + } + ], "ListInstances": [ { "input": { @@ -279,6 +438,47 @@ "title": "Example: List namespaces" } ], + "ListOperations": [ + { + "input": { + "Filters": [ + { + "Condition": "IN", + "Name": "STATUS", + "Values": [ + "PENDING", + "SUCCESS" + ] + } + ] + }, + "output": { + "Operations": [ + { + "Id": "76yy8ovhpdz0plmjzbsnqgnrqvpv2qdt-kexample", + "Status": "SUCCESS" + }, + { + "Id": "prysnyzpji3u2ciy45nke83x2zanl7yk-dexample", + "Status": "SUCCESS" + }, + { + "Id": "ko4ekftir7kzlbechsh7xvcdgcpk66gh-7example", + "Status": "PENDING" + } + ] + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example gets the operations that have a STATUS of either PENDING or SUCCESS.", + "id": "listoperations-example-1590117354396", + "title": "ListOperations Example" + } + ], "ListServices": [ { "input": { @@ -313,6 +513,34 @@ "title": "Example: List services" } ], + "ListTagsForResource": [ + { + "input": { + "ResourceARN": "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm" + }, + "output": { + "Tags": [ + { + "Key": "Project", + "Value": "Zeta" + }, + { + "Key": "Department", + "Value": "Engineering" + } + ] + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example lists the tags of a resource.", + "id": "listtagsforresource-example-1590093928416", + "title": "ListTagsForResource example" + } + ], "RegisterInstance": [ { "input": { @@ -337,6 +565,108 @@ "id": "example-register-instance-1587236116314", "title": "Example: Register Instance" } + ], + "TagResource": [ + { + "input": { + "ResourceARN": "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm", + "Tags": [ + { + "Key": "Department", + "Value": "Engineering" + }, + { + "Key": "Project", + "Value": "Zeta" + } + ] + }, + "output": { + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example adds \"Department\" and \"Project\" tags to a resource.", + "id": "tagresource-example-1590093532240", + "title": "TagResource example" + } + ], + "UntagResource": [ + { + "input": { + "ResourceARN": "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm", + "TagKeys": [ + "Project", + "Department" + ] + }, + "output": { + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example removes the \"Department\" and \"Project\" tags from a resource.", + "id": "untagresource-example-1590094024672", + "title": "UntagResource example" + } + ], + "UpdateInstanceCustomHealthStatus": [ + { + "input": { + "InstanceId": "i-abcd1234", + "ServiceId": "srv-e4anhexample0004", + "Status": "HEALTHY" + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example submits a request to change the health status of an instance associated with a service with a custom health check to HEALTHY.", + "id": "updateinstancecustomhealthstatus-example-1590118408574", + "title": "UpdateInstanceCustomHealthStatus Example" + } + ], + "UpdateService": [ + { + "input": { + "Id": "srv-e4anhexample0004", + "Service": { + "DnsConfig": { + "DnsRecords": [ + { + "TTL": 60, + "Type": "A" + } + ] + }, + "HealthCheckConfig": { + "FailureThreshold": 2, + "ResourcePath": "/", + "Type": "HTTP" + } + } + }, + "output": { + "OperationId": "m35hsdrkxwjffm3xef4bxyy6vc3ewakx-jdn3y5g5" + }, + "comments": { + "input": { + }, + "output": { + } + }, + "description": "This example submits a request to replace the DnsConfig and HealthCheckConfig settings of a specified service.", + "id": "updateservice-example-1590117830880", + "title": "UpdateService Example" + } ] } } diff --git a/models/apis/shield/2016-06-02/api-2.json b/models/apis/shield/2016-06-02/api-2.json index fc297d55cba..9ed90a03db7 100644 --- a/models/apis/shield/2016-06-02/api-2.json +++ b/models/apis/shield/2016-06-02/api-2.json @@ -65,6 +65,22 @@ {"shape":"OptimisticLockException"} ] }, + "AssociateProactiveEngagementDetails":{ + "name":"AssociateProactiveEngagementDetails", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"AssociateProactiveEngagementDetailsRequest"}, + "output":{"shape":"AssociateProactiveEngagementDetailsResponse"}, + "errors":[ + {"shape":"InternalErrorException"}, + {"shape":"InvalidOperationException"}, + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OptimisticLockException"} + ] + }, "CreateProtection":{ "name":"CreateProtection", "http":{ @@ -191,6 +207,22 @@ {"shape":"ResourceNotFoundException"} ] }, + "DisableProactiveEngagement":{ + "name":"DisableProactiveEngagement", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DisableProactiveEngagementRequest"}, + "output":{"shape":"DisableProactiveEngagementResponse"}, + "errors":[ + {"shape":"InternalErrorException"}, + {"shape":"InvalidOperationException"}, + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OptimisticLockException"} + ] + }, "DisassociateDRTLogBucket":{ "name":"DisassociateDRTLogBucket", "http":{ @@ -238,6 +270,22 @@ {"shape":"OptimisticLockException"} ] }, + "EnableProactiveEngagement":{ + "name":"EnableProactiveEngagement", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"EnableProactiveEngagementRequest"}, + "output":{"shape":"EnableProactiveEngagementResponse"}, + "errors":[ + {"shape":"InternalErrorException"}, + {"shape":"InvalidOperationException"}, + {"shape":"InvalidParameterException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"OptimisticLockException"} + ] + }, "GetSubscriptionState":{ "name":"GetSubscriptionState", "http":{ @@ -365,6 +413,18 @@ "members":{ } }, + "AssociateProactiveEngagementDetailsRequest":{ + "type":"structure", + "required":["EmergencyContactList"], + "members":{ + "EmergencyContactList":{"shape":"EmergencyContactList"} + } + }, + "AssociateProactiveEngagementDetailsResponse":{ + "type":"structure", + "members":{ + } + }, "AttackDetail":{ "type":"structure", "members":{ @@ -451,6 +511,12 @@ "DISABLED" ] }, + "ContactNotes":{ + "type":"string", + "max":1024, + "min":1, + "pattern":"^[\\w\\s\\.\\-,:/()+@]*$" + }, "Contributor":{ "type":"structure", "members":{ @@ -569,6 +635,16 @@ "Subscription":{"shape":"Subscription"} } }, + "DisableProactiveEngagementRequest":{ + "type":"structure", + "members":{ + } + }, + "DisableProactiveEngagementResponse":{ + "type":"structure", + "members":{ + } + }, "DisassociateDRTLogBucketRequest":{ "type":"structure", "required":["LogBucket"], @@ -622,7 +698,9 @@ "type":"structure", "required":["EmailAddress"], "members":{ - "EmailAddress":{"shape":"EmailAddress"} + "EmailAddress":{"shape":"EmailAddress"}, + "PhoneNumber":{"shape":"PhoneNumber"}, + "ContactNotes":{"shape":"ContactNotes"} } }, "EmergencyContactList":{ @@ -631,6 +709,16 @@ "max":10, "min":0 }, + "EnableProactiveEngagementRequest":{ + "type":"structure", + "members":{ + } + }, + "EnableProactiveEngagementResponse":{ + "type":"structure", + "members":{ + } + }, "GetSubscriptionStateRequest":{ "type":"structure", "members":{ @@ -794,6 +882,20 @@ }, "exception":true }, + "PhoneNumber":{ + "type":"string", + "max":40, + "min":1, + "pattern":"^.*$" + }, + "ProactiveEngagementStatus":{ + "type":"string", + "enum":[ + "ENABLED", + "DISABLED", + "PENDING" + ] + }, "Protection":{ "type":"structure", "members":{ @@ -877,7 +979,8 @@ "EndTime":{"shape":"Timestamp"}, "TimeCommitmentInSeconds":{"shape":"DurationInSeconds"}, "AutoRenew":{"shape":"AutoRenew"}, - "Limits":{"shape":"Limits"} + "Limits":{"shape":"Limits"}, + "ProactiveEngagementStatus":{"shape":"ProactiveEngagementStatus"} } }, "SubscriptionState":{ diff --git a/models/apis/shield/2016-06-02/docs-2.json b/models/apis/shield/2016-06-02/docs-2.json index d7018a2d48e..e7da4b1d009 100644 --- a/models/apis/shield/2016-06-02/docs-2.json +++ b/models/apis/shield/2016-06-02/docs-2.json @@ -2,25 +2,28 @@ "version": "2.0", "service": "AWS Shield Advanced

This is the AWS Shield Advanced API Reference. This guide is for developers who need detailed information about the AWS Shield Advanced API actions, data types, and errors. For detailed information about AWS WAF and AWS Shield Advanced features and an overview of how to use the AWS WAF and AWS Shield Advanced APIs, see the AWS WAF and AWS Shield Developer Guide.

", "operations": { - "AssociateDRTLogBucket": "

Authorizes the DDoS Response team (DRT) to access the specified Amazon S3 bucket containing your AWS WAF logs. You can associate up to 10 Amazon S3 buckets with your subscription.

To use the services of the DRT and make an AssociateDRTLogBucket request, you must be subscribed to the Business Support plan or the Enterprise Support plan.

", - "AssociateDRTRole": "

Authorizes the DDoS Response team (DRT), using the specified role, to access your AWS account to assist with DDoS attack mitigation during potential attacks. This enables the DRT to inspect your AWS WAF configuration and create or update AWS WAF rules and web ACLs.

You can associate only one RoleArn with your subscription. If you submit an AssociateDRTRole request for an account that already has an associated role, the new RoleArn will replace the existing RoleArn.

Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to the role you will specify in the request. For more information see Attaching and Detaching IAM Policies. The role must also trust the service principal drt.shield.amazonaws.com. For more information, see IAM JSON Policy Elements: Principal.

The DRT will have access only to your AWS WAF and Shield resources. By submitting this request, you authorize the DRT to inspect your AWS WAF and Shield configuration and create and update AWS WAF rules and web ACLs on your behalf. The DRT takes these actions only if explicitly authorized by you.

You must have the iam:PassRole permission to make an AssociateDRTRole request. For more information, see Granting a User Permissions to Pass a Role to an AWS Service.

To use the services of the DRT and make an AssociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan.

", + "AssociateDRTLogBucket": "

Authorizes the DDoS Response Team (DRT) to access the specified Amazon S3 bucket containing your AWS WAF logs. You can associate up to 10 Amazon S3 buckets with your subscription.

To use the services of the DRT and make an AssociateDRTLogBucket request, you must be subscribed to the Business Support plan or the Enterprise Support plan.

", + "AssociateDRTRole": "

Authorizes the DDoS Response Team (DRT), using the specified role, to access your AWS account to assist with DDoS attack mitigation during potential attacks. This enables the DRT to inspect your AWS WAF configuration and create or update AWS WAF rules and web ACLs.

You can associate only one RoleArn with your subscription. If you submit an AssociateDRTRole request for an account that already has an associated role, the new RoleArn will replace the existing RoleArn.

Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to the role you will specify in the request. For more information see Attaching and Detaching IAM Policies. The role must also trust the service principal drt.shield.amazonaws.com. For more information, see IAM JSON Policy Elements: Principal.

The DRT will have access only to your AWS WAF and Shield resources. By submitting this request, you authorize the DRT to inspect your AWS WAF and Shield configuration and create and update AWS WAF rules and web ACLs on your behalf. The DRT takes these actions only if explicitly authorized by you.

You must have the iam:PassRole permission to make an AssociateDRTRole request. For more information, see Granting a User Permissions to Pass a Role to an AWS Service.

To use the services of the DRT and make an AssociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan.

", "AssociateHealthCheck": "

Adds health-based detection to the Shield Advanced protection for a resource. Shield Advanced health-based detection uses the health of your AWS resource to improve responsiveness and accuracy in attack detection and mitigation.

You define the health check in Route 53 and then associate it with your Shield Advanced protection. For more information, see Shield Advanced Health-Based Detection in the AWS WAF and AWS Shield Developer Guide.

", + "AssociateProactiveEngagementDetails": "

Initializes proactive engagement and sets the list of contacts for the DDoS Response Team (DRT) to use. You must provide at least one phone number in the emergency contact list.

After you have initialized proactive engagement using this call, to disable or enable proactive engagement, use the calls DisableProactiveEngagement and EnableProactiveEngagement.

This call defines the list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you for escalations to the DRT and to initiate proactive customer support.

The contacts that you provide in the request replace any contacts that were already defined. If you already have contacts defined and want to use them, retrieve the list using DescribeEmergencyContactSettings and then provide it to this call.

", "CreateProtection": "

Enables AWS Shield Advanced for a specific AWS resource. The resource can be an Amazon CloudFront distribution, Elastic Load Balancing load balancer, AWS Global Accelerator accelerator, Elastic IP Address, or an Amazon Route 53 hosted zone.

You can add protection to only a single resource with each CreateProtection request. If you want to add protection to multiple resources at once, use the AWS WAF console. For more information see Getting Started with AWS Shield Advanced and Add AWS Shield Advanced Protection to more AWS Resources.

", "CreateSubscription": "

Activates AWS Shield Advanced for an account.

As part of this request you can specify EmergencySettings that automaticaly grant the DDoS response team (DRT) needed permissions to assist you during a suspected DDoS attack. For more information see Authorize the DDoS Response Team to Create Rules and Web ACLs on Your Behalf.

To use the services of the DRT, you must be subscribed to the Business Support plan or the Enterprise Support plan.

When you initally create a subscription, your subscription is set to be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request.

", "DeleteProtection": "

Deletes an AWS Shield Advanced Protection.

", "DeleteSubscription": "

Removes AWS Shield Advanced from an account. AWS Shield Advanced requires a 1-year subscription commitment. You cannot delete a subscription prior to the completion of that commitment.

", "DescribeAttack": "

Describes the details of a DDoS attack.

", - "DescribeDRTAccess": "

Returns the current role and list of Amazon S3 log buckets used by the DDoS Response team (DRT) to access your AWS account while assisting with attack mitigation.

", - "DescribeEmergencyContactSettings": "

Lists the email addresses that the DRT can use to contact you during a suspected attack.

", + "DescribeDRTAccess": "

Returns the current role and list of Amazon S3 log buckets used by the DDoS Response Team (DRT) to access your AWS account while assisting with attack mitigation.

", + "DescribeEmergencyContactSettings": "

A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.

", "DescribeProtection": "

Lists the details of a Protection object.

", "DescribeSubscription": "

Provides details about the AWS Shield Advanced subscription for an account.

", - "DisassociateDRTLogBucket": "

Removes the DDoS Response team's (DRT) access to the specified Amazon S3 bucket containing your AWS WAF logs.

To make a DisassociateDRTLogBucket request, you must be subscribed to the Business Support plan or the Enterprise Support plan. However, if you are not subscribed to one of these support plans, but had been previously and had granted the DRT access to your account, you can submit a DisassociateDRTLogBucket request to remove this access.

", - "DisassociateDRTRole": "

Removes the DDoS Response team's (DRT) access to your AWS account.

To make a DisassociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan. However, if you are not subscribed to one of these support plans, but had been previously and had granted the DRT access to your account, you can submit a DisassociateDRTRole request to remove this access.

", + "DisableProactiveEngagement": "

Removes authorization from the DDoS Response Team (DRT) to notify contacts about escalations to the DRT and to initiate proactive customer support.

", + "DisassociateDRTLogBucket": "

Removes the DDoS Response Team's (DRT) access to the specified Amazon S3 bucket containing your AWS WAF logs.

To make a DisassociateDRTLogBucket request, you must be subscribed to the Business Support plan or the Enterprise Support plan. However, if you are not subscribed to one of these support plans, but had been previously and had granted the DRT access to your account, you can submit a DisassociateDRTLogBucket request to remove this access.

", + "DisassociateDRTRole": "

Removes the DDoS Response Team's (DRT) access to your AWS account.

To make a DisassociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan. However, if you are not subscribed to one of these support plans, but had been previously and had granted the DRT access to your account, you can submit a DisassociateDRTRole request to remove this access.

", "DisassociateHealthCheck": "

Removes health-based detection from the Shield Advanced protection for a resource. Shield Advanced health-based detection uses the health of your AWS resource to improve responsiveness and accuracy in attack detection and mitigation.

You define the health check in Route 53 and then associate or disassociate it with your Shield Advanced protection. For more information, see Shield Advanced Health-Based Detection in the AWS WAF and AWS Shield Developer Guide.

", + "EnableProactiveEngagement": "

Authorizes the DDoS Response Team (DRT) to use email and phone to notify contacts about escalations to the DRT and to initiate proactive customer support.

", "GetSubscriptionState": "

Returns the SubscriptionState, either Active or Inactive.

", "ListAttacks": "

Returns all ongoing DDoS attacks or all DDoS attacks during a specified time period.

", "ListProtections": "

Lists all Protection objects for the account.

", - "UpdateEmergencyContactSettings": "

Updates the details of the list of email addresses that the DRT can use to contact you during a suspected attack.

", + "UpdateEmergencyContactSettings": "

Updates the details of the list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.

", "UpdateSubscription": "

Updates the details of an existing subscription. Only enter values for parameters you want to change. Empty parameters are not updated.

" }, "shapes": { @@ -30,7 +33,7 @@ } }, "AccessDeniedForDependencyException": { - "base": "

In order to grant the necessary access to the DDoS Response Team, the user submitting the request must have the iam:PassRole permission. This error indicates the user did not have the appropriate permissions. For more information, see Granting a User Permissions to Pass a Role to an AWS Service.

", + "base": "

In order to grant the necessary access to the DDoS Response Team (DRT), the user submitting the request must have the iam:PassRole permission. This error indicates the user did not have the appropriate permissions. For more information, see Granting a User Permissions to Pass a Role to an AWS Service.

", "refs": { } }, @@ -64,6 +67,16 @@ "refs": { } }, + "AssociateProactiveEngagementDetailsRequest": { + "base": null, + "refs": { + } + }, + "AssociateProactiveEngagementDetailsResponse": { + "base": null, + "refs": { + } + }, "AttackDetail": { "base": "

The details of a DDoS attack.

", "refs": { @@ -143,6 +156,12 @@ "UpdateSubscriptionRequest$AutoRenew": "

When you initally create a subscription, AutoRenew is set to ENABLED. If ENABLED, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request. If the UpdateSubscription request does not included a value for AutoRenew, the existing value for AutoRenew remains unchanged.

" } }, + "ContactNotes": { + "base": null, + "refs": { + "EmergencyContact$ContactNotes": "

Additional notes regarding the contact.

" + } + }, "Contributor": { "base": "

A contributor to the attack and their contribution.

", "refs": { @@ -239,6 +258,16 @@ "refs": { } }, + "DisableProactiveEngagementRequest": { + "base": null, + "refs": { + } + }, + "DisableProactiveEngagementResponse": { + "base": null, + "refs": { + } + }, "DisassociateDRTLogBucketRequest": { "base": null, "refs": { @@ -286,11 +315,11 @@ "EmailAddress": { "base": null, "refs": { - "EmergencyContact$EmailAddress": "

An email address that the DRT can use to contact you during a suspected attack.

" + "EmergencyContact$EmailAddress": "

The email address for the contact.

" } }, "EmergencyContact": { - "base": "

Contact information that the DRT can use to contact you during a suspected attack.

", + "base": "

Contact information that the DRT can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.

", "refs": { "EmergencyContactList$member": null } @@ -298,8 +327,19 @@ "EmergencyContactList": { "base": null, "refs": { - "DescribeEmergencyContactSettingsResponse$EmergencyContactList": "

A list of email addresses that the DRT can use to contact you during a suspected attack.

", - "UpdateEmergencyContactSettingsRequest$EmergencyContactList": "

A list of email addresses that the DRT can use to contact you during a suspected attack.

" + "AssociateProactiveEngagementDetailsRequest$EmergencyContactList": "

A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you for escalations to the DRT and to initiate proactive customer support.

To enable proactive engagement, the contact list must include at least one phone number.

The contacts that you provide here replace any contacts that were already defined. If you already have contacts defined and want to use them, retrieve the list using DescribeEmergencyContactSettings and then provide it here.

", + "DescribeEmergencyContactSettingsResponse$EmergencyContactList": "

A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.

", + "UpdateEmergencyContactSettingsRequest$EmergencyContactList": "

A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.

If you have proactive engagement enabled, the contact list must include at least one phone number.

" + } + }, + "EnableProactiveEngagementRequest": { + "base": null, + "refs": { + } + }, + "EnableProactiveEngagementResponse": { + "base": null, + "refs": { } }, "GetSubscriptionStateRequest": { @@ -463,8 +503,20 @@ } }, "OptimisticLockException": { - "base": "

Exception that indicates that the protection state has been modified by another client. You can retry the request.

", + "base": "

Exception that indicates that the resource state has been modified by another client. Retrieve the resource and then retry your request.

", + "refs": { + } + }, + "PhoneNumber": { + "base": null, + "refs": { + "EmergencyContact$PhoneNumber": "

The phone number for the contact.

" + } + }, + "ProactiveEngagementStatus": { + "base": null, "refs": { + "Subscription$ProactiveEngagementStatus": "

If ENABLED, the DDoS Response Team (DRT) will use email and phone to notify contacts about escalations to the DRT and to initiate proactive customer support.

If PENDING, you have requested proactive engagement and the request is pending. The status changes to ENABLED when your request is fully processed.

If DISABLED, the DRT will not proactively notify contacts about escalations or to initiate proactive customer support.

" } }, "Protection": { diff --git a/models/apis/shield/2016-06-02/paginators-1.json b/models/apis/shield/2016-06-02/paginators-1.json index 5677bd8e4a2..cffb14b6819 100644 --- a/models/apis/shield/2016-06-02/paginators-1.json +++ b/models/apis/shield/2016-06-02/paginators-1.json @@ -1,4 +1,16 @@ { "pagination": { + "ListAttacks": { + "input_token": "NextToken", + "limit_key": "MaxResults", + "output_token": "NextToken", + "result_key": "AttackSummaries" + }, + "ListProtections": { + "input_token": "NextToken", + "limit_key": "MaxResults", + "output_token": "NextToken", + "result_key": "Protections" + } } -} +} \ No newline at end of file diff --git a/service/servicediscovery/api.go b/service/servicediscovery/api.go index b6b6d9f17c8..6ce167c7689 100644 --- a/service/servicediscovery/api.go +++ b/service/servicediscovery/api.go @@ -88,6 +88,10 @@ func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespace // * DuplicateRequest // The operation is already in progress. // +// * TooManyTagsException +// The list of tags on the resource is over the limit. The maximum number of +// tags that can be applied to a resource is 50. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace func (c *ServiceDiscovery) CreateHttpNamespace(input *CreateHttpNamespaceInput) (*CreateHttpNamespaceOutput, error) { req, out := c.CreateHttpNamespaceRequest(input) @@ -185,6 +189,10 @@ func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivate // * DuplicateRequest // The operation is already in progress. // +// * TooManyTagsException +// The list of tags on the resource is over the limit. The maximum number of +// tags that can be applied to a resource is 50. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace func (c *ServiceDiscovery) CreatePrivateDnsNamespace(input *CreatePrivateDnsNamespaceInput) (*CreatePrivateDnsNamespaceOutput, error) { req, out := c.CreatePrivateDnsNamespaceRequest(input) @@ -282,6 +290,10 @@ func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDn // * DuplicateRequest // The operation is already in progress. // +// * TooManyTagsException +// The list of tags on the resource is over the limit. The maximum number of +// tags that can be applied to a resource is 50. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace func (c *ServiceDiscovery) CreatePublicDnsNamespace(input *CreatePublicDnsNamespaceInput) (*CreatePublicDnsNamespaceOutput, error) { req, out := c.CreatePublicDnsNamespaceRequest(input) @@ -387,6 +399,10 @@ func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req // The service can't be created because a service with the same name already // exists. // +// * TooManyTagsException +// The list of tags on the resource is over the limit. The maximum number of +// tags that can be applied to a resource is 50. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService func (c *ServiceDiscovery) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) { req, out := c.CreateServiceRequest(input) @@ -757,6 +773,10 @@ func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInpu // might be missing, a numeric value might be outside the allowed range, or // a string value might exceed length constraints. // +// * RequestLimitExceeded +// The operation can't be completed because you've reached the limit on the +// number of requests. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances func (c *ServiceDiscovery) DiscoverInstances(input *DiscoverInstancesInput) (*DiscoverInstancesOutput, error) { req, out := c.DiscoverInstancesRequest(input) @@ -1835,6 +1855,90 @@ func (c *ServiceDiscovery) ListServicesPagesWithContext(ctx aws.Context, input * 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/servicediscovery-2017-03-14/ListTagsForResource +func (c *ServiceDiscovery) 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) + return +} + +// ListTagsForResource API operation for AWS Cloud Map. +// +// Lists tags for the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Cloud Map's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The operation can't be completed because the resource was not found. +// +// * InvalidInput +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListTagsForResource +func (c *ServiceDiscovery) 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 *ServiceDiscovery) 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 opRegisterInstance = "RegisterInstance" // RegisterInstanceRequest generates a "aws/request.Request" representing the @@ -1962,6 +2066,180 @@ func (c *ServiceDiscovery) RegisterInstanceWithContext(ctx aws.Context, input *R 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/servicediscovery-2017-03-14/TagResource +func (c *ServiceDiscovery) 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) + return +} + +// TagResource API operation for AWS Cloud Map. +// +// Adds one or more tags to the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Cloud Map's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The operation can't be completed because the resource was not found. +// +// * TooManyTagsException +// The list of tags on the resource is over the limit. The maximum number of +// tags that can be applied to a resource is 50. +// +// * InvalidInput +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/TagResource +func (c *ServiceDiscovery) 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 *ServiceDiscovery) 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/servicediscovery-2017-03-14/UntagResource +func (c *ServiceDiscovery) 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) + return +} + +// UntagResource API operation for AWS Cloud Map. +// +// Removes one or more tags from the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Cloud Map's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The operation can't be completed because the resource was not found. +// +// * InvalidInput +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UntagResource +func (c *ServiceDiscovery) 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 *ServiceDiscovery) 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 opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus" // UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the @@ -2183,6 +2461,11 @@ type CreateHttpNamespaceInput struct { // // Name is a required field Name *string `type:"string" required:"true"` + + // The tags to add to the namespace. Each tag consists of a key and an optional + // value, both of which you define. Tag keys can have a maximum character length + // of 128 characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -2201,6 +2484,16 @@ func (s *CreateHttpNamespaceInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + 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 @@ -2226,6 +2519,12 @@ func (s *CreateHttpNamespaceInput) SetName(v string) *CreateHttpNamespaceInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateHttpNamespaceInput) SetTags(v []*Tag) *CreateHttpNamespaceInput { + s.Tags = v + return s +} + type CreateHttpNamespaceOutput struct { _ struct{} `type:"structure"` @@ -2268,6 +2567,11 @@ type CreatePrivateDnsNamespaceInput struct { // Name is a required field Name *string `type:"string" required:"true"` + // The tags to add to the namespace. Each tag consists of a key and an optional + // value, both of which you define. Tag keys can have a maximum character length + // of 128 characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `type:"list"` + // The ID of the Amazon VPC that you want to associate the namespace with. // // Vpc is a required field @@ -2293,6 +2597,16 @@ func (s *CreatePrivateDnsNamespaceInput) Validate() error { if s.Vpc == nil { invalidParams.Add(request.NewErrParamRequired("Vpc")) } + 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 @@ -2318,6 +2632,12 @@ func (s *CreatePrivateDnsNamespaceInput) SetName(v string) *CreatePrivateDnsName return s } +// SetTags sets the Tags field's value. +func (s *CreatePrivateDnsNamespaceInput) SetTags(v []*Tag) *CreatePrivateDnsNamespaceInput { + s.Tags = v + return s +} + // SetVpc sets the Vpc field's value. func (s *CreatePrivateDnsNamespaceInput) SetVpc(v string) *CreatePrivateDnsNamespaceInput { s.Vpc = &v @@ -2363,6 +2683,11 @@ type CreatePublicDnsNamespaceInput struct { // // Name is a required field Name *string `type:"string" required:"true"` + + // The tags to add to the namespace. Each tag consists of a key and an optional + // value, both of which you define. Tag keys can have a maximum character length + // of 128 characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -2381,6 +2706,16 @@ func (s *CreatePublicDnsNamespaceInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + 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 @@ -2406,6 +2741,12 @@ func (s *CreatePublicDnsNamespaceInput) SetName(v string) *CreatePublicDnsNamesp return s } +// SetTags sets the Tags field's value. +func (s *CreatePublicDnsNamespaceInput) SetTags(v []*Tag) *CreatePublicDnsNamespaceInput { + s.Tags = v + return s +} + type CreatePublicDnsNamespaceOutput struct { _ struct{} `type:"structure"` @@ -2488,6 +2829,11 @@ type CreateServiceInput struct { // The ID of the namespace that you want to use to create the service. NamespaceId *string `type:"string"` + + // The tags to add to the service. Each tag consists of a key and an optional + // value, both of which you define. Tag keys can have a maximum character length + // of 128 characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -2521,6 +2867,16 @@ func (s *CreateServiceInput) Validate() error { invalidParams.AddNested("HealthCheckCustomConfig", 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 @@ -2570,6 +2926,12 @@ func (s *CreateServiceInput) SetNamespaceId(v string) *CreateServiceInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateServiceInput) SetTags(v []*Tag) *CreateServiceInput { + s.Tags = v + return s +} + type CreateServiceOutput struct { _ struct{} `type:"structure"` @@ -4817,23 +5179,88 @@ func (s *ListServicesOutput) SetServices(v []*ServiceSummary) *ListServicesOutpu return s } -// A complex type that contains information about a specified namespace. -type Namespace struct { +type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace - // when you create it. - Arn *string `type:"string"` + // The Amazon Resource Name (ARN) of the resource that you want to retrieve + // tags for. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` +} - // The date that the namespace was created, in Unix date/time format and Coordinated - // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. - // For example, the value 1516925490.087 represents Friday, January 26, 2018 - // 12:11:30.087 AM. - CreateDate *time.Time `type:"timestamp"` +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} - // A unique string that identifies the request and that allows failed requests - // to be retried without the risk of executing an operation twice. - CreatorRequestId *string `type:"string"` +// 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 that are assigned to the 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 +} + +// A complex type that contains information about a specified namespace. +type Namespace struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace + // when you create it. + Arn *string `type:"string"` + + // The date that the namespace was created, in Unix date/time format and Coordinated + // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreateDate *time.Time `type:"timestamp"` + + // A unique string that identifies the request and that allows failed requests + // to be retried without the risk of executing an operation twice. + CreatorRequestId *string `type:"string"` // The description that you specify for the namespace when you create it. Description *string `type:"string"` @@ -5657,7 +6084,8 @@ type RegisterInstanceInput struct { // // You can add up to 30 custom attributes. For each key-value pair, the maximum // length of the attribute name is 255 characters, and the maximum length of - // the attribute value is 1,024 characters. + // the attribute value is 1,024 characters. Total size of all provided attributes + // (sum of all keys and values) must not exceed 5,000 characters. // // Attributes is a required field Attributes map[string]*string `type:"map" required:"true"` @@ -5774,6 +6202,63 @@ func (s *RegisterInstanceOutput) SetOperationId(v string) *RegisterInstanceOutpu return s } +// The operation can't be completed because you've reached the limit on the +// number of requests. +type RequestLimitExceeded struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation +func (s RequestLimitExceeded) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestLimitExceeded) GoString() string { + return s.String() +} + +func newErrorRequestLimitExceeded(v protocol.ResponseMetadata) error { + return &RequestLimitExceeded{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *RequestLimitExceeded) Code() string { + return "RequestLimitExceeded" +} + +// Message returns the exception's message. +func (s *RequestLimitExceeded) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *RequestLimitExceeded) OrigErr() error { + return nil +} + +func (s *RequestLimitExceeded) 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 *RequestLimitExceeded) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *RequestLimitExceeded) RequestID() string { + return s.RespMetadata.RequestID +} + // The specified resource can't be deleted because it contains other resources. // For example, you can't delete a service that contains any instances. type ResourceInUse struct { @@ -5888,6 +6373,62 @@ func (s *ResourceLimitExceeded) RequestID() string { return s.RespMetadata.RequestID } +// The operation can't be completed because the resource was not found. +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 +} + // A complex type that contains information about the specified service. type Service struct { _ struct{} `type:"structure"` @@ -6094,9 +6635,7 @@ type ServiceChange struct { // A complex type that contains information about the Route 53 DNS records that // you want AWS Cloud Map to create when you register an instance. - // - // DnsConfig is a required field - DnsConfig *DnsConfigChange `type:"structure" required:"true"` + DnsConfig *DnsConfigChange `type:"structure"` // Public DNS and HTTP namespaces only. A complex type that contains settings // for an optional health check. If you specify settings for a health check, @@ -6173,9 +6712,6 @@ func (s ServiceChange) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ServiceChange) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ServiceChange"} - if s.DnsConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DnsConfig")) - } if s.DnsConfig != nil { if err := s.DnsConfig.Validate(); err != nil { invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams)) @@ -6547,6 +7083,276 @@ func (s *ServiceSummary) SetName(v string) *ServiceSummary { return s } +// A custom key-value pair associated with a resource. +type Tag struct { + _ struct{} `type:"structure"` + + // The key identifier, or name, of the tag. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The string value that's associated with the key of the tag. You can set the + // value of a tag to an empty string, but you can't set the value of a tag to + // 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"` + + // The Amazon Resource Name (ARN) of the resource that you want to retrieve + // tags for. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // The tags to add to the specified resource. Specifying the tag key is required. + // You can set the value of a tag to an empty string, but you can't set the + // value of a tag to null. + // + // 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() +} + +// The list of tags on the resource is over the limit. The maximum number of +// tags that can be applied to a resource is 50. +type TooManyTagsException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` + + // The name of the resource. + ResourceName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s TooManyTagsException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TooManyTagsException) GoString() string { + return s.String() +} + +func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { + return &TooManyTagsException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *TooManyTagsException) Code() string { + return "TooManyTagsException" +} + +// Message returns the exception's message. +func (s *TooManyTagsException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *TooManyTagsException) OrigErr() error { + return nil +} + +func (s *TooManyTagsException) 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 *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to retrieve + // tags for. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // The tag keys to remove from the specified 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 UpdateInstanceCustomHealthStatusInput struct { _ struct{} `type:"structure"` diff --git a/service/servicediscovery/errors.go b/service/servicediscovery/errors.go index 0e4e0085797..b6050c8931e 100644 --- a/service/servicediscovery/errors.go +++ b/service/servicediscovery/errors.go @@ -54,6 +54,13 @@ const ( // No operation exists with the specified ID. ErrCodeOperationNotFound = "OperationNotFound" + // ErrCodeRequestLimitExceeded for service response error code + // "RequestLimitExceeded". + // + // The operation can't be completed because you've reached the limit on the + // number of requests. + ErrCodeRequestLimitExceeded = "RequestLimitExceeded" + // ErrCodeResourceInUse for service response error code // "ResourceInUse". // @@ -68,6 +75,12 @@ const ( // of resources. ErrCodeResourceLimitExceeded = "ResourceLimitExceeded" + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The operation can't be completed because the resource was not found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + // ErrCodeServiceAlreadyExists for service response error code // "ServiceAlreadyExists". // @@ -80,18 +93,28 @@ const ( // // No service exists with the specified ID. ErrCodeServiceNotFound = "ServiceNotFound" + + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // The list of tags on the resource is over the limit. The maximum number of + // tags that can be applied to a resource is 50. + ErrCodeTooManyTagsException = "TooManyTagsException" ) var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ - "CustomHealthNotFound": newErrorCustomHealthNotFound, - "DuplicateRequest": newErrorDuplicateRequest, - "InstanceNotFound": newErrorInstanceNotFound, - "InvalidInput": newErrorInvalidInput, - "NamespaceAlreadyExists": newErrorNamespaceAlreadyExists, - "NamespaceNotFound": newErrorNamespaceNotFound, - "OperationNotFound": newErrorOperationNotFound, - "ResourceInUse": newErrorResourceInUse, - "ResourceLimitExceeded": newErrorResourceLimitExceeded, - "ServiceAlreadyExists": newErrorServiceAlreadyExists, - "ServiceNotFound": newErrorServiceNotFound, + "CustomHealthNotFound": newErrorCustomHealthNotFound, + "DuplicateRequest": newErrorDuplicateRequest, + "InstanceNotFound": newErrorInstanceNotFound, + "InvalidInput": newErrorInvalidInput, + "NamespaceAlreadyExists": newErrorNamespaceAlreadyExists, + "NamespaceNotFound": newErrorNamespaceNotFound, + "OperationNotFound": newErrorOperationNotFound, + "RequestLimitExceeded": newErrorRequestLimitExceeded, + "ResourceInUse": newErrorResourceInUse, + "ResourceLimitExceeded": newErrorResourceLimitExceeded, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceAlreadyExists": newErrorServiceAlreadyExists, + "ServiceNotFound": newErrorServiceNotFound, + "TooManyTagsException": newErrorTooManyTagsException, } diff --git a/service/servicediscovery/examples_test.go b/service/servicediscovery/examples_test.go index 030c2974bdb..536aa82f0b7 100644 --- a/service/servicediscovery/examples_test.go +++ b/service/servicediscovery/examples_test.go @@ -25,6 +25,45 @@ func parseTime(layout, value string) *time.Time { return &t } +// CreateHttpNamespace example +// +// This example creates an HTTP namespace. +func ExampleServiceDiscovery_CreateHttpNamespace_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.CreateHttpNamespaceInput{ + CreatorRequestId: aws.String("example-creator-request-id-0001"), + Description: aws.String("Example.com AWS Cloud Map HTTP Namespace"), + Name: aws.String("example-http.com"), + } + + result, err := svc.CreateHttpNamespace(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeNamespaceAlreadyExists: + fmt.Println(servicediscovery.ErrCodeNamespaceAlreadyExists, aerr.Error()) + case servicediscovery.ErrCodeResourceLimitExceeded: + fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error()) + case servicediscovery.ErrCodeDuplicateRequest: + fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error()) + case servicediscovery.ErrCodeTooManyTagsException: + fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + // Example: Create private DNS namespace // // Example: Create private DNS namespace @@ -48,6 +87,47 @@ func ExampleServiceDiscovery_CreatePrivateDnsNamespace_shared00() { fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error()) case servicediscovery.ErrCodeDuplicateRequest: fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error()) + case servicediscovery.ErrCodeTooManyTagsException: + fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// CreatePublicDnsNamespace example +// +// This example creates a public namespace based on DNS. +func ExampleServiceDiscovery_CreatePublicDnsNamespace_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.CreatePublicDnsNamespaceInput{ + CreatorRequestId: aws.String("example-creator-request-id-0003"), + Description: aws.String("Example.com AWS Cloud Map Public DNS Namespace"), + Name: aws.String("example-public-dns.com"), + } + + result, err := svc.CreatePublicDnsNamespace(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeNamespaceAlreadyExists: + fmt.Println(servicediscovery.ErrCodeNamespaceAlreadyExists, aerr.Error()) + case servicediscovery.ErrCodeResourceLimitExceeded: + fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error()) + case servicediscovery.ErrCodeDuplicateRequest: + fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error()) + case servicediscovery.ErrCodeTooManyTagsException: + fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error()) default: fmt.Println(aerr.Error()) } @@ -95,6 +175,8 @@ func ExampleServiceDiscovery_CreateService_shared00() { fmt.Println(servicediscovery.ErrCodeNamespaceNotFound, aerr.Error()) case servicediscovery.ErrCodeServiceAlreadyExists: fmt.Println(servicediscovery.ErrCodeServiceAlreadyExists, aerr.Error()) + case servicediscovery.ErrCodeTooManyTagsException: + fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error()) default: fmt.Println(aerr.Error()) } @@ -237,6 +319,107 @@ func ExampleServiceDiscovery_DiscoverInstances_shared00() { fmt.Println(servicediscovery.ErrCodeNamespaceNotFound, aerr.Error()) case servicediscovery.ErrCodeInvalidInput: fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeRequestLimitExceeded: + fmt.Println(servicediscovery.ErrCodeRequestLimitExceeded, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// GetInstance example +// +// This example gets information about a specified instance. +func ExampleServiceDiscovery_GetInstance_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.GetInstanceInput{ + InstanceId: aws.String("i-abcd1234"), + ServiceId: aws.String("srv-e4anhexample0004"), + } + + result, err := svc.GetInstance(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInstanceNotFound: + fmt.Println(servicediscovery.ErrCodeInstanceNotFound, aerr.Error()) + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeServiceNotFound: + fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// GetInstancesHealthStatus example +// +// This example gets the current health status of one or more instances that are associate +// with a specified service. +func ExampleServiceDiscovery_GetInstancesHealthStatus_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.GetInstancesHealthStatusInput{ + ServiceId: aws.String("srv-e4anhexample0004"), + } + + result, err := svc.GetInstancesHealthStatus(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInstanceNotFound: + fmt.Println(servicediscovery.ErrCodeInstanceNotFound, aerr.Error()) + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeServiceNotFound: + fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// GetNamespace example +// +// This example gets information about a specified namespace. +func ExampleServiceDiscovery_GetNamespace_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.GetNamespaceInput{ + Id: aws.String("ns-e4anhexample0004"), + } + + result, err := svc.GetNamespace(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeNamespaceNotFound: + fmt.Println(servicediscovery.ErrCodeNamespaceNotFound, aerr.Error()) default: fmt.Println(aerr.Error()) } @@ -282,6 +465,37 @@ func ExampleServiceDiscovery_GetOperation_shared00() { fmt.Println(result) } +// GetService Example +// +// This example gets the settings for a specified service. +func ExampleServiceDiscovery_GetService_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.GetServiceInput{ + Id: aws.String("srv-e4anhexample0004"), + } + + result, err := svc.GetService(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeServiceNotFound: + fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + // Example: List service instances // // Example: List service instances @@ -340,6 +554,44 @@ func ExampleServiceDiscovery_ListNamespaces_shared00() { fmt.Println(result) } +// ListOperations Example +// +// This example gets the operations that have a STATUS of either PENDING or SUCCESS. +func ExampleServiceDiscovery_ListOperations_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.ListOperationsInput{ + Filters: []*servicediscovery.OperationFilter{ + { + Condition: aws.String("IN"), + Name: aws.String("STATUS"), + Values: []*string{ + aws.String("PENDING"), + aws.String("SUCCESS"), + }, + }, + }, + } + + result, err := svc.ListOperations(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + // Example: List services // // Example: List services @@ -367,6 +619,37 @@ func ExampleServiceDiscovery_ListServices_shared00() { fmt.Println(result) } +// ListTagsForResource example +// +// This example lists the tags of a resource. +func ExampleServiceDiscovery_ListTagsForResource_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.ListTagsForResourceInput{ + ResourceARN: aws.String("arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm"), + } + + result, err := svc.ListTagsForResource(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeResourceNotFoundException: + fmt.Println(servicediscovery.ErrCodeResourceNotFoundException, aerr.Error()) + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + // Example: Register Instance // // Example: Register Instance @@ -409,3 +692,168 @@ func ExampleServiceDiscovery_RegisterInstance_shared00() { fmt.Println(result) } + +// TagResource example +// +// This example adds "Department" and "Project" tags to a resource. +func ExampleServiceDiscovery_TagResource_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.TagResourceInput{ + ResourceARN: aws.String("arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm"), + Tags: []*servicediscovery.Tag{ + { + Key: aws.String("Department"), + Value: aws.String("Engineering"), + }, + { + Key: aws.String("Project"), + Value: aws.String("Zeta"), + }, + }, + } + + result, err := svc.TagResource(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeResourceNotFoundException: + fmt.Println(servicediscovery.ErrCodeResourceNotFoundException, aerr.Error()) + case servicediscovery.ErrCodeTooManyTagsException: + fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error()) + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// UntagResource example +// +// This example removes the "Department" and "Project" tags from a resource. +func ExampleServiceDiscovery_UntagResource_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.UntagResourceInput{ + ResourceARN: aws.String("arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm"), + TagKeys: []*string{ + aws.String("Project"), + aws.String("Department"), + }, + } + + result, err := svc.UntagResource(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeResourceNotFoundException: + fmt.Println(servicediscovery.ErrCodeResourceNotFoundException, aerr.Error()) + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// UpdateInstanceCustomHealthStatus Example +// +// This example submits a request to change the health status of an instance associated +// with a service with a custom health check to HEALTHY. +func ExampleServiceDiscovery_UpdateInstanceCustomHealthStatus_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.UpdateInstanceCustomHealthStatusInput{ + InstanceId: aws.String("i-abcd1234"), + ServiceId: aws.String("srv-e4anhexample0004"), + Status: aws.String("HEALTHY"), + } + + result, err := svc.UpdateInstanceCustomHealthStatus(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeInstanceNotFound: + fmt.Println(servicediscovery.ErrCodeInstanceNotFound, aerr.Error()) + case servicediscovery.ErrCodeServiceNotFound: + fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error()) + case servicediscovery.ErrCodeCustomHealthNotFound: + fmt.Println(servicediscovery.ErrCodeCustomHealthNotFound, aerr.Error()) + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} + +// UpdateService Example +// +// This example submits a request to replace the DnsConfig and HealthCheckConfig settings +// of a specified service. +func ExampleServiceDiscovery_UpdateService_shared00() { + svc := servicediscovery.New(session.New()) + input := &servicediscovery.UpdateServiceInput{ + Id: aws.String("srv-e4anhexample0004"), + Service: &servicediscovery.ServiceChange{ + DnsConfig: &servicediscovery.DnsConfigChange{ + DnsRecords: []*servicediscovery.DnsRecord{ + { + TTL: aws.Int64(60), + Type: aws.String("A"), + }, + }, + }, + HealthCheckConfig: &servicediscovery.HealthCheckConfig{ + FailureThreshold: aws.Int64(2), + ResourcePath: aws.String("/"), + Type: aws.String("HTTP"), + }, + }, + } + + result, err := svc.UpdateService(input) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case servicediscovery.ErrCodeDuplicateRequest: + fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error()) + case servicediscovery.ErrCodeInvalidInput: + fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error()) + case servicediscovery.ErrCodeServiceNotFound: + fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error()) + default: + fmt.Println(aerr.Error()) + } + } else { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + } + return + } + + fmt.Println(result) +} diff --git a/service/servicediscovery/servicediscoveryiface/interface.go b/service/servicediscovery/servicediscoveryiface/interface.go index aad37f7a8cc..bb7541c115a 100644 --- a/service/servicediscovery/servicediscoveryiface/interface.go +++ b/service/servicediscovery/servicediscoveryiface/interface.go @@ -143,10 +143,22 @@ type ServiceDiscoveryAPI interface { ListServicesPages(*servicediscovery.ListServicesInput, func(*servicediscovery.ListServicesOutput, bool) bool) error ListServicesPagesWithContext(aws.Context, *servicediscovery.ListServicesInput, func(*servicediscovery.ListServicesOutput, bool) bool, ...request.Option) error + ListTagsForResource(*servicediscovery.ListTagsForResourceInput) (*servicediscovery.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *servicediscovery.ListTagsForResourceInput, ...request.Option) (*servicediscovery.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*servicediscovery.ListTagsForResourceInput) (*request.Request, *servicediscovery.ListTagsForResourceOutput) + RegisterInstance(*servicediscovery.RegisterInstanceInput) (*servicediscovery.RegisterInstanceOutput, error) RegisterInstanceWithContext(aws.Context, *servicediscovery.RegisterInstanceInput, ...request.Option) (*servicediscovery.RegisterInstanceOutput, error) RegisterInstanceRequest(*servicediscovery.RegisterInstanceInput) (*request.Request, *servicediscovery.RegisterInstanceOutput) + TagResource(*servicediscovery.TagResourceInput) (*servicediscovery.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *servicediscovery.TagResourceInput, ...request.Option) (*servicediscovery.TagResourceOutput, error) + TagResourceRequest(*servicediscovery.TagResourceInput) (*request.Request, *servicediscovery.TagResourceOutput) + + UntagResource(*servicediscovery.UntagResourceInput) (*servicediscovery.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *servicediscovery.UntagResourceInput, ...request.Option) (*servicediscovery.UntagResourceOutput, error) + UntagResourceRequest(*servicediscovery.UntagResourceInput) (*request.Request, *servicediscovery.UntagResourceOutput) + UpdateInstanceCustomHealthStatus(*servicediscovery.UpdateInstanceCustomHealthStatusInput) (*servicediscovery.UpdateInstanceCustomHealthStatusOutput, error) UpdateInstanceCustomHealthStatusWithContext(aws.Context, *servicediscovery.UpdateInstanceCustomHealthStatusInput, ...request.Option) (*servicediscovery.UpdateInstanceCustomHealthStatusOutput, error) UpdateInstanceCustomHealthStatusRequest(*servicediscovery.UpdateInstanceCustomHealthStatusInput) (*request.Request, *servicediscovery.UpdateInstanceCustomHealthStatusOutput) diff --git a/service/shield/api.go b/service/shield/api.go index 0d070f3b51b..a058a8fc96b 100644 --- a/service/shield/api.go +++ b/service/shield/api.go @@ -58,7 +58,7 @@ func (c *Shield) AssociateDRTLogBucketRequest(input *AssociateDRTLogBucketInput) // AssociateDRTLogBucket API operation for AWS Shield. // -// Authorizes the DDoS Response team (DRT) to access the specified Amazon S3 +// Authorizes the DDoS Response Team (DRT) to access the specified Amazon S3 // bucket containing your AWS WAF logs. You can associate up to 10 Amazon S3 // buckets with your subscription. // @@ -96,14 +96,14 @@ func (c *Shield) AssociateDRTLogBucketRequest(input *AssociateDRTLogBucketInput) // Exception that indicates that the parameters passed to the API are invalid. // // * AccessDeniedForDependencyException -// In order to grant the necessary access to the DDoS Response Team, the user -// submitting the request must have the iam:PassRole permission. This error +// In order to grant the necessary access to the DDoS Response Team (DRT), the +// user submitting the request must have the iam:PassRole permission. This error // indicates the user did not have the appropriate permissions. For more information, // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html). // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // * ResourceNotFoundException // Exception indicating the specified resource does not exist. @@ -175,7 +175,7 @@ func (c *Shield) AssociateDRTRoleRequest(input *AssociateDRTRoleInput) (req *req // AssociateDRTRole API operation for AWS Shield. // -// Authorizes the DDoS Response team (DRT), using the specified role, to access +// Authorizes the DDoS Response Team (DRT), using the specified role, to access // your AWS account to assist with DDoS attack mitigation during potential attacks. // This enables the DRT to inspect your AWS WAF configuration and create or // update AWS WAF rules and web ACLs. @@ -224,14 +224,14 @@ func (c *Shield) AssociateDRTRoleRequest(input *AssociateDRTRoleInput) (req *req // Exception that indicates that the parameters passed to the API are invalid. // // * AccessDeniedForDependencyException -// In order to grant the necessary access to the DDoS Response Team, the user -// submitting the request must have the iam:PassRole permission. This error +// In order to grant the necessary access to the DDoS Response Team (DRT), the +// user submitting the request must have the iam:PassRole permission. This error // indicates the user did not have the appropriate permissions. For more information, // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html). // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // * ResourceNotFoundException // Exception indicating the specified resource does not exist. @@ -338,8 +338,8 @@ func (c *Shield) AssociateHealthCheckRequest(input *AssociateHealthCheckInput) ( // Exception that indicates that the parameters passed to the API are invalid. // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AssociateHealthCheck func (c *Shield) AssociateHealthCheck(input *AssociateHealthCheckInput) (*AssociateHealthCheckOutput, error) { @@ -363,6 +363,116 @@ func (c *Shield) AssociateHealthCheckWithContext(ctx aws.Context, input *Associa return out, req.Send() } +const opAssociateProactiveEngagementDetails = "AssociateProactiveEngagementDetails" + +// AssociateProactiveEngagementDetailsRequest generates a "aws/request.Request" representing the +// client's request for the AssociateProactiveEngagementDetails 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 AssociateProactiveEngagementDetails for more information on using the AssociateProactiveEngagementDetails +// 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 AssociateProactiveEngagementDetailsRequest method. +// req, resp := client.AssociateProactiveEngagementDetailsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AssociateProactiveEngagementDetails +func (c *Shield) AssociateProactiveEngagementDetailsRequest(input *AssociateProactiveEngagementDetailsInput) (req *request.Request, output *AssociateProactiveEngagementDetailsOutput) { + op := &request.Operation{ + Name: opAssociateProactiveEngagementDetails, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateProactiveEngagementDetailsInput{} + } + + output = &AssociateProactiveEngagementDetailsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateProactiveEngagementDetails API operation for AWS Shield. +// +// Initializes proactive engagement and sets the list of contacts for the DDoS +// Response Team (DRT) to use. You must provide at least one phone number in +// the emergency contact list. +// +// After you have initialized proactive engagement using this call, to disable +// or enable proactive engagement, use the calls DisableProactiveEngagement +// and EnableProactiveEngagement. +// +// This call defines the list of email addresses and phone numbers that the +// DDoS Response Team (DRT) can use to contact you for escalations to the DRT +// and to initiate proactive customer support. +// +// The contacts that you provide in the request replace any contacts that were +// already defined. If you already have contacts defined and want to use them, +// retrieve the list using DescribeEmergencyContactSettings and then provide +// it to this call. +// +// 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 AWS Shield's +// API operation AssociateProactiveEngagementDetails for usage and error information. +// +// Returned Error Types: +// * InternalErrorException +// Exception that indicates that a problem occurred with the service infrastructure. +// You can retry the request. +// +// * InvalidOperationException +// Exception that indicates that the operation would not cause any change to +// occur. +// +// * InvalidParameterException +// Exception that indicates that the parameters passed to the API are invalid. +// +// * ResourceNotFoundException +// Exception indicating the specified resource does not exist. +// +// * OptimisticLockException +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AssociateProactiveEngagementDetails +func (c *Shield) AssociateProactiveEngagementDetails(input *AssociateProactiveEngagementDetailsInput) (*AssociateProactiveEngagementDetailsOutput, error) { + req, out := c.AssociateProactiveEngagementDetailsRequest(input) + return out, req.Send() +} + +// AssociateProactiveEngagementDetailsWithContext is the same as AssociateProactiveEngagementDetails with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateProactiveEngagementDetails 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 *Shield) AssociateProactiveEngagementDetailsWithContext(ctx aws.Context, input *AssociateProactiveEngagementDetailsInput, opts ...request.Option) (*AssociateProactiveEngagementDetailsOutput, error) { + req, out := c.AssociateProactiveEngagementDetailsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateProtection = "CreateProtection" // CreateProtectionRequest generates a "aws/request.Request" representing the @@ -449,8 +559,8 @@ func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *req // Exception indicating the specified resource already exists. // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // * ResourceNotFoundException // Exception indicating the specified resource does not exist. @@ -637,8 +747,8 @@ func (c *Shield) DeleteProtectionRequest(input *DeleteProtectionInput) (req *req // Exception indicating the specified resource does not exist. // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection func (c *Shield) DeleteProtection(input *DeleteProtectionInput) (*DeleteProtectionOutput, error) { @@ -892,7 +1002,7 @@ func (c *Shield) DescribeDRTAccessRequest(input *DescribeDRTAccessInput) (req *r // DescribeDRTAccess API operation for AWS Shield. // // Returns the current role and list of Amazon S3 log buckets used by the DDoS -// Response team (DRT) to access your AWS account while assisting with attack +// Response Team (DRT) to access your AWS account while assisting with attack // mitigation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -976,8 +1086,9 @@ func (c *Shield) DescribeEmergencyContactSettingsRequest(input *DescribeEmergenc // DescribeEmergencyContactSettings API operation for AWS Shield. // -// Lists the email addresses that the DRT can use to contact you during a suspected -// attack. +// A list of email addresses and phone numbers that the DDoS Response Team (DRT) +// can use to contact you if you have proactive engagement enabled, for escalations +// to the DRT and to initiate proactive customer support. // // 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 @@ -1185,6 +1296,102 @@ func (c *Shield) DescribeSubscriptionWithContext(ctx aws.Context, input *Describ return out, req.Send() } +const opDisableProactiveEngagement = "DisableProactiveEngagement" + +// DisableProactiveEngagementRequest generates a "aws/request.Request" representing the +// client's request for the DisableProactiveEngagement 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 DisableProactiveEngagement for more information on using the DisableProactiveEngagement +// 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 DisableProactiveEngagementRequest method. +// req, resp := client.DisableProactiveEngagementRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisableProactiveEngagement +func (c *Shield) DisableProactiveEngagementRequest(input *DisableProactiveEngagementInput) (req *request.Request, output *DisableProactiveEngagementOutput) { + op := &request.Operation{ + Name: opDisableProactiveEngagement, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableProactiveEngagementInput{} + } + + output = &DisableProactiveEngagementOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableProactiveEngagement API operation for AWS Shield. +// +// Removes authorization from the DDoS Response Team (DRT) to notify contacts +// about escalations to the DRT and to initiate proactive customer support. +// +// 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 AWS Shield's +// API operation DisableProactiveEngagement for usage and error information. +// +// Returned Error Types: +// * InternalErrorException +// Exception that indicates that a problem occurred with the service infrastructure. +// You can retry the request. +// +// * InvalidOperationException +// Exception that indicates that the operation would not cause any change to +// occur. +// +// * InvalidParameterException +// Exception that indicates that the parameters passed to the API are invalid. +// +// * ResourceNotFoundException +// Exception indicating the specified resource does not exist. +// +// * OptimisticLockException +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisableProactiveEngagement +func (c *Shield) DisableProactiveEngagement(input *DisableProactiveEngagementInput) (*DisableProactiveEngagementOutput, error) { + req, out := c.DisableProactiveEngagementRequest(input) + return out, req.Send() +} + +// DisableProactiveEngagementWithContext is the same as DisableProactiveEngagement with the addition of +// the ability to pass a context and additional request options. +// +// See DisableProactiveEngagement 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 *Shield) DisableProactiveEngagementWithContext(ctx aws.Context, input *DisableProactiveEngagementInput, opts ...request.Option) (*DisableProactiveEngagementOutput, error) { + req, out := c.DisableProactiveEngagementRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateDRTLogBucket = "DisassociateDRTLogBucket" // DisassociateDRTLogBucketRequest generates a "aws/request.Request" representing the @@ -1230,7 +1437,7 @@ func (c *Shield) DisassociateDRTLogBucketRequest(input *DisassociateDRTLogBucket // DisassociateDRTLogBucket API operation for AWS Shield. // -// Removes the DDoS Response team's (DRT) access to the specified Amazon S3 +// Removes the DDoS Response Team's (DRT) access to the specified Amazon S3 // bucket containing your AWS WAF logs. // // To make a DisassociateDRTLogBucket request, you must be subscribed to the @@ -1260,14 +1467,14 @@ func (c *Shield) DisassociateDRTLogBucketRequest(input *DisassociateDRTLogBucket // The ARN of the role that you specifed does not exist. // // * AccessDeniedForDependencyException -// In order to grant the necessary access to the DDoS Response Team, the user -// submitting the request must have the iam:PassRole permission. This error +// In order to grant the necessary access to the DDoS Response Team (DRT), the +// user submitting the request must have the iam:PassRole permission. This error // indicates the user did not have the appropriate permissions. For more information, // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html). // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // * ResourceNotFoundException // Exception indicating the specified resource does not exist. @@ -1339,7 +1546,7 @@ func (c *Shield) DisassociateDRTRoleRequest(input *DisassociateDRTRoleInput) (re // DisassociateDRTRole API operation for AWS Shield. // -// Removes the DDoS Response team's (DRT) access to your AWS account. +// Removes the DDoS Response Team's (DRT) access to your AWS account. // // To make a DisassociateDRTRole request, you must be subscribed to the Business // Support plan (https://aws.amazon.com/premiumsupport/business-support/) or @@ -1365,8 +1572,8 @@ func (c *Shield) DisassociateDRTRoleRequest(input *DisassociateDRTRoleInput) (re // occur. // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // * ResourceNotFoundException // Exception indicating the specified resource does not exist. @@ -1467,8 +1674,8 @@ func (c *Shield) DisassociateHealthCheckRequest(input *DisassociateHealthCheckIn // Exception indicating the specified resource does not exist. // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisassociateHealthCheck func (c *Shield) DisassociateHealthCheck(input *DisassociateHealthCheckInput) (*DisassociateHealthCheckOutput, error) { @@ -1492,6 +1699,103 @@ func (c *Shield) DisassociateHealthCheckWithContext(ctx aws.Context, input *Disa return out, req.Send() } +const opEnableProactiveEngagement = "EnableProactiveEngagement" + +// EnableProactiveEngagementRequest generates a "aws/request.Request" representing the +// client's request for the EnableProactiveEngagement 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 EnableProactiveEngagement for more information on using the EnableProactiveEngagement +// 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 EnableProactiveEngagementRequest method. +// req, resp := client.EnableProactiveEngagementRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/EnableProactiveEngagement +func (c *Shield) EnableProactiveEngagementRequest(input *EnableProactiveEngagementInput) (req *request.Request, output *EnableProactiveEngagementOutput) { + op := &request.Operation{ + Name: opEnableProactiveEngagement, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableProactiveEngagementInput{} + } + + output = &EnableProactiveEngagementOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// EnableProactiveEngagement API operation for AWS Shield. +// +// Authorizes the DDoS Response Team (DRT) to use email and phone to notify +// contacts about escalations to the DRT and to initiate proactive customer +// support. +// +// 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 AWS Shield's +// API operation EnableProactiveEngagement for usage and error information. +// +// Returned Error Types: +// * InternalErrorException +// Exception that indicates that a problem occurred with the service infrastructure. +// You can retry the request. +// +// * InvalidOperationException +// Exception that indicates that the operation would not cause any change to +// occur. +// +// * InvalidParameterException +// Exception that indicates that the parameters passed to the API are invalid. +// +// * ResourceNotFoundException +// Exception indicating the specified resource does not exist. +// +// * OptimisticLockException +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/EnableProactiveEngagement +func (c *Shield) EnableProactiveEngagement(input *EnableProactiveEngagementInput) (*EnableProactiveEngagementOutput, error) { + req, out := c.EnableProactiveEngagementRequest(input) + return out, req.Send() +} + +// EnableProactiveEngagementWithContext is the same as EnableProactiveEngagement with the addition of +// the ability to pass a context and additional request options. +// +// See EnableProactiveEngagement 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 *Shield) EnableProactiveEngagementWithContext(ctx aws.Context, input *EnableProactiveEngagementInput, opts ...request.Option) (*EnableProactiveEngagementOutput, error) { + req, out := c.EnableProactiveEngagementRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetSubscriptionState = "GetSubscriptionState" // GetSubscriptionStateRequest generates a "aws/request.Request" representing the @@ -1603,6 +1907,12 @@ func (c *Shield) ListAttacksRequest(input *ListAttacksInput) (req *request.Reque Name: opListAttacks, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1660,6 +1970,58 @@ func (c *Shield) ListAttacksWithContext(ctx aws.Context, input *ListAttacksInput return out, req.Send() } +// ListAttacksPages iterates over the pages of a ListAttacks operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListAttacks 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 ListAttacks operation. +// pageNum := 0 +// err := client.ListAttacksPages(params, +// func(page *shield.ListAttacksOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Shield) ListAttacksPages(input *ListAttacksInput, fn func(*ListAttacksOutput, bool) bool) error { + return c.ListAttacksPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListAttacksPagesWithContext same as ListAttacksPages 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 *Shield) ListAttacksPagesWithContext(ctx aws.Context, input *ListAttacksInput, fn func(*ListAttacksOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListAttacksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListAttacksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListAttacksOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opListProtections = "ListProtections" // ListProtectionsRequest generates a "aws/request.Request" representing the @@ -1691,6 +2053,12 @@ func (c *Shield) ListProtectionsRequest(input *ListProtectionsInput) (req *reque Name: opListProtections, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1747,6 +2115,58 @@ func (c *Shield) ListProtectionsWithContext(ctx aws.Context, input *ListProtecti return out, req.Send() } +// ListProtectionsPages iterates over the pages of a ListProtections operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListProtections 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 ListProtections operation. +// pageNum := 0 +// err := client.ListProtectionsPages(params, +// func(page *shield.ListProtectionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Shield) ListProtectionsPages(input *ListProtectionsInput, fn func(*ListProtectionsOutput, bool) bool) error { + return c.ListProtectionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListProtectionsPagesWithContext same as ListProtectionsPages 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 *Shield) ListProtectionsPagesWithContext(ctx aws.Context, input *ListProtectionsInput, fn func(*ListProtectionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListProtectionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListProtectionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListProtectionsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opUpdateEmergencyContactSettings = "UpdateEmergencyContactSettings" // UpdateEmergencyContactSettingsRequest generates a "aws/request.Request" representing the @@ -1792,8 +2212,10 @@ func (c *Shield) UpdateEmergencyContactSettingsRequest(input *UpdateEmergencyCon // UpdateEmergencyContactSettings API operation for AWS Shield. // -// Updates the details of the list of email addresses that the DRT can use to -// contact you during a suspected attack. +// Updates the details of the list of email addresses and phone numbers that +// the DDoS Response Team (DRT) can use to contact you if you have proactive +// engagement enabled, for escalations to the DRT and to initiate proactive +// customer support. // // 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 @@ -1811,8 +2233,8 @@ func (c *Shield) UpdateEmergencyContactSettingsRequest(input *UpdateEmergencyCon // Exception that indicates that the parameters passed to the API are invalid. // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // * ResourceNotFoundException // Exception indicating the specified resource does not exist. @@ -1912,8 +2334,8 @@ func (c *Shield) UpdateSubscriptionRequest(input *UpdateSubscriptionInput) (req // Exception that indicates that the parameters passed to the API are invalid. // // * OptimisticLockException -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. // // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/UpdateSubscription func (c *Shield) UpdateSubscription(input *UpdateSubscriptionInput) (*UpdateSubscriptionOutput, error) { @@ -1994,8 +2416,8 @@ func (s *AccessDeniedException) RequestID() string { return s.RespMetadata.RequestID } -// In order to grant the necessary access to the DDoS Response Team, the user -// submitting the request must have the iam:PassRole permission. This error +// In order to grant the necessary access to the DDoS Response Team (DRT), the +// user submitting the request must have the iam:PassRole permission. This error // indicates the user did not have the appropriate permissions. For more information, // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html). type AccessDeniedForDependencyException struct { @@ -2243,6 +2665,77 @@ func (s AssociateHealthCheckOutput) GoString() string { return s.String() } +type AssociateProactiveEngagementDetailsInput struct { + _ struct{} `type:"structure"` + + // A list of email addresses and phone numbers that the DDoS Response Team (DRT) + // can use to contact you for escalations to the DRT and to initiate proactive + // customer support. + // + // To enable proactive engagement, the contact list must include at least one + // phone number. + // + // The contacts that you provide here replace any contacts that were already + // defined. If you already have contacts defined and want to use them, retrieve + // the list using DescribeEmergencyContactSettings and then provide it here. + // + // EmergencyContactList is a required field + EmergencyContactList []*EmergencyContact `type:"list" required:"true"` +} + +// String returns the string representation +func (s AssociateProactiveEngagementDetailsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateProactiveEngagementDetailsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateProactiveEngagementDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateProactiveEngagementDetailsInput"} + if s.EmergencyContactList == nil { + invalidParams.Add(request.NewErrParamRequired("EmergencyContactList")) + } + if s.EmergencyContactList != nil { + for i, v := range s.EmergencyContactList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EmergencyContactList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEmergencyContactList sets the EmergencyContactList field's value. +func (s *AssociateProactiveEngagementDetailsInput) SetEmergencyContactList(v []*EmergencyContact) *AssociateProactiveEngagementDetailsInput { + s.EmergencyContactList = v + return s +} + +type AssociateProactiveEngagementDetailsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateProactiveEngagementDetailsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateProactiveEngagementDetailsOutput) GoString() string { + return s.String() +} + // The details of a DDoS attack. type AttackDetail struct { _ struct{} `type:"structure"` @@ -2895,8 +3388,9 @@ func (s DescribeEmergencyContactSettingsInput) GoString() string { type DescribeEmergencyContactSettingsOutput struct { _ struct{} `type:"structure"` - // A list of email addresses that the DRT can use to contact you during a suspected - // attack. + // A list of email addresses and phone numbers that the DDoS Response Team (DRT) + // can use to contact you if you have proactive engagement enabled, for escalations + // to the DRT and to initiate proactive customer support. EmergencyContactList []*EmergencyContact `type:"list"` } @@ -3028,6 +3522,34 @@ func (s *DescribeSubscriptionOutput) SetSubscription(v *Subscription) *DescribeS return s } +type DisableProactiveEngagementInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableProactiveEngagementInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableProactiveEngagementInput) GoString() string { + return s.String() +} + +type DisableProactiveEngagementOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableProactiveEngagementOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableProactiveEngagementOutput) GoString() string { + return s.String() +} + type DisassociateDRTLogBucketInput struct { _ struct{} `type:"structure"` @@ -3185,15 +3707,22 @@ func (s DisassociateHealthCheckOutput) GoString() string { return s.String() } -// Contact information that the DRT can use to contact you during a suspected -// attack. +// Contact information that the DRT can use to contact you if you have proactive +// engagement enabled, for escalations to the DRT and to initiate proactive +// customer support. type EmergencyContact struct { _ struct{} `type:"structure"` - // An email address that the DRT can use to contact you during a suspected attack. + // Additional notes regarding the contact. + ContactNotes *string `min:"1" type:"string"` + + // The email address for the contact. // // EmailAddress is a required field EmailAddress *string `min:"1" type:"string" required:"true"` + + // The phone number for the contact. + PhoneNumber *string `min:"1" type:"string"` } // String returns the string representation @@ -3209,12 +3738,18 @@ func (s EmergencyContact) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *EmergencyContact) Validate() error { invalidParams := request.ErrInvalidParams{Context: "EmergencyContact"} + if s.ContactNotes != nil && len(*s.ContactNotes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContactNotes", 1)) + } if s.EmailAddress == nil { invalidParams.Add(request.NewErrParamRequired("EmailAddress")) } if s.EmailAddress != nil && len(*s.EmailAddress) < 1 { invalidParams.Add(request.NewErrParamMinLen("EmailAddress", 1)) } + if s.PhoneNumber != nil && len(*s.PhoneNumber) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PhoneNumber", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3222,12 +3757,52 @@ func (s *EmergencyContact) Validate() error { return nil } +// SetContactNotes sets the ContactNotes field's value. +func (s *EmergencyContact) SetContactNotes(v string) *EmergencyContact { + s.ContactNotes = &v + return s +} + // SetEmailAddress sets the EmailAddress field's value. func (s *EmergencyContact) SetEmailAddress(v string) *EmergencyContact { s.EmailAddress = &v return s } +// SetPhoneNumber sets the PhoneNumber field's value. +func (s *EmergencyContact) SetPhoneNumber(v string) *EmergencyContact { + s.PhoneNumber = &v + return s +} + +type EnableProactiveEngagementInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableProactiveEngagementInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableProactiveEngagementInput) GoString() string { + return s.String() +} + +type EnableProactiveEngagementOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableProactiveEngagementOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableProactiveEngagementOutput) GoString() string { + return s.String() +} + type GetSubscriptionStateInput struct { _ struct{} `type:"structure"` } @@ -4006,8 +4581,8 @@ func (s *NoAssociatedRoleException) RequestID() string { return s.RespMetadata.RequestID } -// Exception that indicates that the protection state has been modified by another -// client. You can retry the request. +// Exception that indicates that the resource state has been modified by another +// client. Retrieve the resource and then retry your request. type OptimisticLockException struct { _ struct{} `type:"structure"` RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` @@ -4297,6 +4872,17 @@ type Subscription struct { // Specifies how many protections of a given type you can create. Limits []*Limit `type:"list"` + // If ENABLED, the DDoS Response Team (DRT) will use email and phone to notify + // contacts about escalations to the DRT and to initiate proactive customer + // support. + // + // If PENDING, you have requested proactive engagement and the request is pending. + // The status changes to ENABLED when your request is fully processed. + // + // If DISABLED, the DRT will not proactively notify contacts about escalations + // or to initiate proactive customer support. + ProactiveEngagementStatus *string `type:"string" enum:"ProactiveEngagementStatus"` + // The start time of the subscription, in Unix time in seconds. For more information // see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types). StartTime *time.Time `type:"timestamp"` @@ -4333,6 +4919,12 @@ func (s *Subscription) SetLimits(v []*Limit) *Subscription { return s } +// SetProactiveEngagementStatus sets the ProactiveEngagementStatus field's value. +func (s *Subscription) SetProactiveEngagementStatus(v string) *Subscription { + s.ProactiveEngagementStatus = &v + return s +} + // SetStartTime sets the StartTime field's value. func (s *Subscription) SetStartTime(v time.Time) *Subscription { s.StartTime = &v @@ -4487,8 +5079,12 @@ func (s *TimeRange) SetToExclusive(v time.Time) *TimeRange { type UpdateEmergencyContactSettingsInput struct { _ struct{} `type:"structure"` - // A list of email addresses that the DRT can use to contact you during a suspected - // attack. + // A list of email addresses and phone numbers that the DDoS Response Team (DRT) + // can use to contact you if you have proactive engagement enabled, for escalations + // to the DRT and to initiate proactive customer support. + // + // If you have proactive engagement enabled, the contact list must include at + // least one phone number. EmergencyContactList []*EmergencyContact `type:"list"` } @@ -4625,6 +5221,17 @@ const ( AutoRenewDisabled = "DISABLED" ) +const ( + // ProactiveEngagementStatusEnabled is a ProactiveEngagementStatus enum value + ProactiveEngagementStatusEnabled = "ENABLED" + + // ProactiveEngagementStatusDisabled is a ProactiveEngagementStatus enum value + ProactiveEngagementStatusDisabled = "DISABLED" + + // ProactiveEngagementStatusPending is a ProactiveEngagementStatus enum value + ProactiveEngagementStatusPending = "PENDING" +) + const ( // SubResourceTypeIp is a SubResourceType enum value SubResourceTypeIp = "IP" diff --git a/service/shield/errors.go b/service/shield/errors.go index a0af389f673..c30b5cc6a7a 100644 --- a/service/shield/errors.go +++ b/service/shield/errors.go @@ -18,8 +18,8 @@ const ( // ErrCodeAccessDeniedForDependencyException for service response error code // "AccessDeniedForDependencyException". // - // In order to grant the necessary access to the DDoS Response Team, the user - // submitting the request must have the iam:PassRole permission. This error + // In order to grant the necessary access to the DDoS Response Team (DRT), the + // user submitting the request must have the iam:PassRole permission. This error // indicates the user did not have the appropriate permissions. For more information, // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html). ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException" @@ -86,8 +86,8 @@ const ( // ErrCodeOptimisticLockException for service response error code // "OptimisticLockException". // - // Exception that indicates that the protection state has been modified by another - // client. You can retry the request. + // Exception that indicates that the resource state has been modified by another + // client. Retrieve the resource and then retry your request. ErrCodeOptimisticLockException = "OptimisticLockException" // ErrCodeResourceAlreadyExistsException for service response error code diff --git a/service/shield/shieldiface/interface.go b/service/shield/shieldiface/interface.go index 47565e0198b..371e0431417 100644 --- a/service/shield/shieldiface/interface.go +++ b/service/shield/shieldiface/interface.go @@ -72,6 +72,10 @@ type ShieldAPI interface { AssociateHealthCheckWithContext(aws.Context, *shield.AssociateHealthCheckInput, ...request.Option) (*shield.AssociateHealthCheckOutput, error) AssociateHealthCheckRequest(*shield.AssociateHealthCheckInput) (*request.Request, *shield.AssociateHealthCheckOutput) + AssociateProactiveEngagementDetails(*shield.AssociateProactiveEngagementDetailsInput) (*shield.AssociateProactiveEngagementDetailsOutput, error) + AssociateProactiveEngagementDetailsWithContext(aws.Context, *shield.AssociateProactiveEngagementDetailsInput, ...request.Option) (*shield.AssociateProactiveEngagementDetailsOutput, error) + AssociateProactiveEngagementDetailsRequest(*shield.AssociateProactiveEngagementDetailsInput) (*request.Request, *shield.AssociateProactiveEngagementDetailsOutput) + CreateProtection(*shield.CreateProtectionInput) (*shield.CreateProtectionOutput, error) CreateProtectionWithContext(aws.Context, *shield.CreateProtectionInput, ...request.Option) (*shield.CreateProtectionOutput, error) CreateProtectionRequest(*shield.CreateProtectionInput) (*request.Request, *shield.CreateProtectionOutput) @@ -108,6 +112,10 @@ type ShieldAPI interface { DescribeSubscriptionWithContext(aws.Context, *shield.DescribeSubscriptionInput, ...request.Option) (*shield.DescribeSubscriptionOutput, error) DescribeSubscriptionRequest(*shield.DescribeSubscriptionInput) (*request.Request, *shield.DescribeSubscriptionOutput) + DisableProactiveEngagement(*shield.DisableProactiveEngagementInput) (*shield.DisableProactiveEngagementOutput, error) + DisableProactiveEngagementWithContext(aws.Context, *shield.DisableProactiveEngagementInput, ...request.Option) (*shield.DisableProactiveEngagementOutput, error) + DisableProactiveEngagementRequest(*shield.DisableProactiveEngagementInput) (*request.Request, *shield.DisableProactiveEngagementOutput) + DisassociateDRTLogBucket(*shield.DisassociateDRTLogBucketInput) (*shield.DisassociateDRTLogBucketOutput, error) DisassociateDRTLogBucketWithContext(aws.Context, *shield.DisassociateDRTLogBucketInput, ...request.Option) (*shield.DisassociateDRTLogBucketOutput, error) DisassociateDRTLogBucketRequest(*shield.DisassociateDRTLogBucketInput) (*request.Request, *shield.DisassociateDRTLogBucketOutput) @@ -120,6 +128,10 @@ type ShieldAPI interface { DisassociateHealthCheckWithContext(aws.Context, *shield.DisassociateHealthCheckInput, ...request.Option) (*shield.DisassociateHealthCheckOutput, error) DisassociateHealthCheckRequest(*shield.DisassociateHealthCheckInput) (*request.Request, *shield.DisassociateHealthCheckOutput) + EnableProactiveEngagement(*shield.EnableProactiveEngagementInput) (*shield.EnableProactiveEngagementOutput, error) + EnableProactiveEngagementWithContext(aws.Context, *shield.EnableProactiveEngagementInput, ...request.Option) (*shield.EnableProactiveEngagementOutput, error) + EnableProactiveEngagementRequest(*shield.EnableProactiveEngagementInput) (*request.Request, *shield.EnableProactiveEngagementOutput) + GetSubscriptionState(*shield.GetSubscriptionStateInput) (*shield.GetSubscriptionStateOutput, error) GetSubscriptionStateWithContext(aws.Context, *shield.GetSubscriptionStateInput, ...request.Option) (*shield.GetSubscriptionStateOutput, error) GetSubscriptionStateRequest(*shield.GetSubscriptionStateInput) (*request.Request, *shield.GetSubscriptionStateOutput) @@ -128,10 +140,16 @@ type ShieldAPI interface { ListAttacksWithContext(aws.Context, *shield.ListAttacksInput, ...request.Option) (*shield.ListAttacksOutput, error) ListAttacksRequest(*shield.ListAttacksInput) (*request.Request, *shield.ListAttacksOutput) + ListAttacksPages(*shield.ListAttacksInput, func(*shield.ListAttacksOutput, bool) bool) error + ListAttacksPagesWithContext(aws.Context, *shield.ListAttacksInput, func(*shield.ListAttacksOutput, bool) bool, ...request.Option) error + ListProtections(*shield.ListProtectionsInput) (*shield.ListProtectionsOutput, error) ListProtectionsWithContext(aws.Context, *shield.ListProtectionsInput, ...request.Option) (*shield.ListProtectionsOutput, error) ListProtectionsRequest(*shield.ListProtectionsInput) (*request.Request, *shield.ListProtectionsOutput) + ListProtectionsPages(*shield.ListProtectionsInput, func(*shield.ListProtectionsOutput, bool) bool) error + ListProtectionsPagesWithContext(aws.Context, *shield.ListProtectionsInput, func(*shield.ListProtectionsOutput, bool) bool, ...request.Option) error + UpdateEmergencyContactSettings(*shield.UpdateEmergencyContactSettingsInput) (*shield.UpdateEmergencyContactSettingsOutput, error) UpdateEmergencyContactSettingsWithContext(aws.Context, *shield.UpdateEmergencyContactSettingsInput, ...request.Option) (*shield.UpdateEmergencyContactSettingsOutput, error) UpdateEmergencyContactSettingsRequest(*shield.UpdateEmergencyContactSettingsInput) (*request.Request, *shield.UpdateEmergencyContactSettingsOutput)