Skip to content

Commit 6c2d9e7

Browse files
authored
Merge pull request aws-beam#44 from jkakar/update-services
Update services
2 parents 96bfe7d + 61cf21a commit 6c2d9e7

28 files changed

+2319
-911
lines changed

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,51 @@
33
All notable changes to this project will be documented in this file.
44

55
## [Unreleased][unreleased]
6+
### Added
7+
- `AWS.AutoScaling` module for AWS Auto Scaling service.
8+
- `AWS.CertificateManager` module has support for adding, listing and removing
9+
tags from certificates along with updated documentation.
10+
- `AWS.CloudHSM` module has updated documentation.
11+
- `AWS.CloudTrail` module has updated documentation.
12+
- `AWS.CodePipeline` module has support for putting approval results, retrying
13+
stage execution and updated documentation.
14+
- `AWS.Config` module has support to delete configuration recorders and
15+
updated documentation.
16+
- `AWS.DirectConnect` module has support to fetch letters of authorization for
17+
connections and interconnects and has updated documentation.
18+
- `AWS.DirectoryService` module has support to add, list and remove tags from
19+
resources.
20+
- `AWS.Discovery` module for AWS Application Discovery Service.
21+
- `AWS.DMS` module has support to import, delete and describe certifications
22+
and has updated documentation.
23+
- `AWS.DynamoDB` module has updated documentation.
24+
- `AWS.DyanamoDB.Streams` module has updated documentation.
25+
- `AWS.ECS` module has updated documentation.
26+
- `AWS.EFS` module has updated documentation.
27+
- `AWS.GameLift` module has support to describe and update a runtime
28+
configuration for a fleet and has updated documentation.
29+
- `AWS.Inspector` module has updated documentation.
30+
- `AWS.IoT` module has support to list policy principals and has updated
31+
documentation.
32+
- `AWS.Kinesis.Firehose` module has updated documentation.
33+
- `AWS.KMS` module has updated documentation.
34+
- `AWS.MachineLearning` module has support to add, describe and delete tags on
35+
an object and has updated documentation.
36+
- `AWS.OpsWorks` module has updated documentation.
37+
- `AWS.Route53.Domains` module has support to get and resent contact
38+
reachability status and has updated documentation.
39+
- `AWS.ServiceCatalog` module for AWS Service Catalog service.
40+
- `AWS.SSM` module has support to add, list and remove tags from resources, to
41+
create, describe and delete activations, to deregister managed instances, to
42+
describe and modify document permissions, to update managed instance roles
43+
and has updated documentation.
44+
- `AWS.StorageGateway` module has support to list taps and has updated
45+
documentation.
46+
- `AWS.Workspaces` module has support to create, describe and delete tags.
47+
48+
### Removed
49+
- `AWS.CognitoIdentityProvider` module removes support to get JSON web keys or
50+
OpenID configuration information for user pools.
651

752
## [v0.0.12] - 2016-07-13
853
### Changed

lib/aws/autoscaling.ex

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
2+
# See https://github.com/jkakar/aws-codegen for more details.
3+
4+
defmodule AWS.AutoScaling do
5+
@moduledoc """
6+
Application Auto Scaling is a general purpose Auto Scaling service for
7+
supported elastic AWS resources. With Application Auto Scaling, you can
8+
automatically scale your AWS resources, with an experience similar to that
9+
of Auto Scaling.
10+
11+
<note> At this time, Application Auto Scaling only supports scaling Amazon
12+
ECS services.
13+
14+
</note> For example, you can use Application Auto Scaling to accomplish the
15+
following tasks:
16+
17+
<ul> <li> Define scaling policies for automatically adjusting your
18+
application’s resources
19+
20+
</li> <li> Scale your resources in response to CloudWatch alarms
21+
22+
</li> <li> View history of your scaling events
23+
24+
</li> </ul> Application Auto Scaling is available in the following regions:
25+
26+
<ul> <li> `us-east-1`
27+
28+
</li> <li> `us-west-2`
29+
30+
</li> <li> `eu-west-1`
31+
32+
</li> </ul>
33+
"""
34+
35+
@doc """
36+
Deletes an Application Auto Scaling scaling policy that was previously
37+
created. If you are no longer using a scaling policy, you can delete it
38+
with this operation.
39+
40+
Deleting a policy deletes the underlying alarm action, but does not delete
41+
the CloudWatch alarm, even if it no longer has an associated action.
42+
43+
To create a new scaling policy or update an existing one, see
44+
`PutScalingPolicy`.
45+
"""
46+
def delete_scaling_policy(client, input, options \\ []) do
47+
request(client, "DeleteScalingPolicy", input, options)
48+
end
49+
50+
@doc """
51+
Deregisters a scalable target that was previously registered. If you are no
52+
longer using a scalable target, you can delete it with this operation. When
53+
you deregister a scalable target, all of the scaling policies that are
54+
associated with that scalable target are deleted.
55+
56+
To create a new scalable target or update an existing one, see
57+
`RegisterScalableTarget`.
58+
"""
59+
def deregister_scalable_target(client, input, options \\ []) do
60+
request(client, "DeregisterScalableTarget", input, options)
61+
end
62+
63+
@doc """
64+
Provides descriptive information for scalable targets with a specified
65+
service namespace.
66+
67+
You can filter the results in a service namespace with the `ResourceIds`
68+
and `ScalableDimension` parameters.
69+
70+
To create a new scalable target or update an existing one, see
71+
`RegisterScalableTarget`. If you are no longer using a scalable target, you
72+
can deregister it with `DeregisterScalableTarget`.
73+
"""
74+
def describe_scalable_targets(client, input, options \\ []) do
75+
request(client, "DescribeScalableTargets", input, options)
76+
end
77+
78+
@doc """
79+
Provides descriptive information for scaling activities with a specified
80+
service namespace.
81+
82+
You can filter the results in a service namespace with the `ResourceId` and
83+
`ScalableDimension` parameters.
84+
85+
Scaling activities are triggered by CloudWatch alarms that are associated
86+
with scaling policies. To view the existing scaling policies for a service
87+
namespace, see `DescribeScalingPolicies`. To create a new scaling policy or
88+
update an existing one, see `PutScalingPolicy`.
89+
"""
90+
def describe_scaling_activities(client, input, options \\ []) do
91+
request(client, "DescribeScalingActivities", input, options)
92+
end
93+
94+
@doc """
95+
Provides descriptive information for scaling policies with a specified
96+
service namespace.
97+
98+
You can filter the results in a service namespace with the `ResourceId`,
99+
`ScalableDimension`, and `PolicyNames` parameters.
100+
101+
To create a new scaling policy or update an existing one, see
102+
`PutScalingPolicy`. If you are no longer using a scaling policy, you can
103+
delete it with `DeleteScalingPolicy`.
104+
"""
105+
def describe_scaling_policies(client, input, options \\ []) do
106+
request(client, "DescribeScalingPolicies", input, options)
107+
end
108+
109+
@doc """
110+
Creates or updates a policy for an existing Application Auto Scaling
111+
scalable target. Each scalable target is identified by service namespace, a
112+
resource ID, and a scalable dimension, and a scaling policy applies to a
113+
scalable target that is identified by those three attributes. You cannot
114+
create a scaling policy without first registering a scalable target with
115+
`RegisterScalableTarget`.
116+
117+
To update an existing policy, use the existing policy name and set the
118+
parameters you want to change. Any existing parameter not changed in an
119+
update to an existing policy is not changed in this update request.
120+
121+
You can view the existing scaling policies for a service namespace with
122+
`DescribeScalingPolicies`. If you are no longer using a scaling policy, you
123+
can delete it with `DeleteScalingPolicy`.
124+
"""
125+
def put_scaling_policy(client, input, options \\ []) do
126+
request(client, "PutScalingPolicy", input, options)
127+
end
128+
129+
@doc """
130+
Registers or updates a scalable target. A scalable target is a resource
131+
that can be scaled up or down with Application Auto Scaling. After you have
132+
registered a scalable target, you can use this command to update the
133+
minimum and maximum values for your scalable dimension.
134+
135+
<note> At this time, Application Auto Scaling only supports scaling Amazon
136+
ECS services.
137+
138+
</note> After you register a scalable target with Application Auto Scaling,
139+
you can create and apply scaling policies to it with `PutScalingPolicy`.
140+
You can view the existing scaling policies for a service namespace with
141+
`DescribeScalableTargets`. If you are no longer using a scalable target,
142+
you can deregister it with `DeregisterScalableTarget`.
143+
"""
144+
def register_scalable_target(client, input, options \\ []) do
145+
request(client, "RegisterScalableTarget", input, options)
146+
end
147+
148+
@spec request(map(), binary(), map(), list()) ::
149+
{:ok, Poison.Parser.t | nil, Poison.Response.t} |
150+
{:error, Poison.Parser.t} |
151+
{:error, HTTPoison.Error.t}
152+
defp request(client, action, input, options) do
153+
client = %{client | service: "autoscaling"}
154+
host = get_host("autoscaling", client)
155+
url = get_url(host, client)
156+
headers = [{"Host", host},
157+
{"Content-Type", "application/x-amz-json-1.1"},
158+
{"X-Amz-Target", "AnyScaleFrontendService.#{action}"}]
159+
payload = Poison.Encoder.encode(input, [])
160+
headers = AWS.Request.sign_v4(client, "POST", url, headers, payload)
161+
case HTTPoison.post(url, payload, headers, options) do
162+
{:ok, response=%HTTPoison.Response{status_code: 200, body: ""}} ->
163+
{:ok, nil, response}
164+
{:ok, response=%HTTPoison.Response{status_code: 200, body: body}} ->
165+
{:ok, Poison.Parser.parse!(body), response}
166+
{:ok, _response=%HTTPoison.Response{body: body}} ->
167+
error = Poison.Parser.parse!(body)
168+
exception = error["__type"]
169+
message = error["message"]
170+
{:error, {exception, message}}
171+
{:error, %HTTPoison.Error{reason: reason}} ->
172+
{:error, %HTTPoison.Error{reason: reason}}
173+
end
174+
end
175+
176+
defp get_host(endpoint_prefix, client) do
177+
if client.region == "local" do
178+
"localhost"
179+
else
180+
"#{endpoint_prefix}.#{client.region}.#{client.endpoint}"
181+
end
182+
end
183+
184+
defp get_url(host, %{:proto => proto, :port => port}) do
185+
"#{proto}://#{host}:#{port}/"
186+
end
187+
188+
end

lib/aws/certificate_manager.ex

Lines changed: 63 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,47 @@ defmodule AWS.CertificateManager do
1212
ACM and for more information about using the console, see the [AWS
1313
Certificate Manager User
1414
Guide](http://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html).
15-
For more information about using the ACM API, see the [ AWS Certificate
15+
For more information about using the ACM API, see the [AWS Certificate
1616
Manager API
1717
Reference](http://docs.aws.amazon.com/acm/latest/APIReference/Welcome.html).
1818
"""
1919

20+
@doc """
21+
Adds one or more tags to an ACM Certificate. Tags are labels that you can
22+
use to identify and organize your AWS resources. Each tag consists of a
23+
`key` and an optional `value`. You specify the certificate on input by its
24+
Amazon Resource Name (ARN). You specify the tag by using a key-value pair.
25+
26+
You can apply a tag to just one certificate if you want to identify a
27+
specific characteristic of that certificate, or you can apply the same tag
28+
to multiple certificates if you want to filter for a common relationship
29+
among those certificates. Similarly, you can apply the same tag to multiple
30+
resources if you want to specify a relationship among those resources. For
31+
example, you can add the same tag to an ACM Certificate and an Elastic Load
32+
Balancing load balancer to indicate that they are both used by the same
33+
website. For more information, see [Tagging ACM
34+
Certificates](http://docs.aws.amazon.com/acm/latest/userguide/tags.html).
35+
36+
To remove one or more tags, use the `RemoveTagsFromCertificate` action. To
37+
view all of the tags that have been applied to the certificate, use the
38+
`ListTagsForCertificate` action.
39+
"""
40+
def add_tags_to_certificate(client, input, options \\ []) do
41+
request(client, "AddTagsToCertificate", input, options)
42+
end
43+
2044
@doc """
2145
Deletes an ACM Certificate and its associated private key. If this action
2246
succeeds, the certificate no longer appears in the list of ACM Certificates
2347
that can be displayed by calling the `ListCertificates` action or be
2448
retrieved by calling the `GetCertificate` action. The certificate will not
2549
be available for use by other AWS services.
2650
27-
<note>You cannot delete an ACM Certificate that is being used by another
51+
<note> You cannot delete an ACM Certificate that is being used by another
2852
AWS service. To delete a certificate that is in use, the certificate
29-
association must first be removed. </note>
53+
association must first be removed.
54+
55+
</note>
3056
"""
3157
def delete_certificate(client, input, options \\ []) do
3258
request(client, "DeleteCertificate", input, options)
@@ -36,8 +62,8 @@ defmodule AWS.CertificateManager do
3662
Returns a list of the fields contained in the specified ACM Certificate.
3763
For example, this action returns the certificate status, a flag that
3864
indicates whether the certificate is associated with any other AWS service,
39-
and the date at which the certificate request was created. The ACM
40-
Certificate is specified on input by its Amazon Resource Name (ARN).
65+
and the date at which the certificate request was created. You specify the
66+
ACM Certificate on input by its Amazon Resource Name (ARN).
4167
"""
4268
def describe_certificate(client, input, options \\ []) do
4369
request(client, "DescribeCertificate", input, options)
@@ -52,32 +78,56 @@ defmodule AWS.CertificateManager do
5278
individual certificate fields, you can use OpenSSL.
5379
5480
<note> Currently, ACM Certificates can be used only with Elastic Load
55-
Balancing and Amazon CloudFront. </note>
81+
Balancing and Amazon CloudFront.
82+
83+
</note>
5684
"""
5785
def get_certificate(client, input, options \\ []) do
5886
request(client, "GetCertificate", input, options)
5987
end
6088

6189
@doc """
62-
Retrieves a list of the ACM Certificate ARNs, and the domain name for each
63-
ARN, owned by the calling account. You can filter the list based on the
64-
`CertificateStatuses` parameter, and you can display up to `MaxItems`
65-
certificates at one time. If you have more than `MaxItems` certificates,
66-
use the `NextToken` marker from the response object in your next call to
67-
the `ListCertificates` action to retrieve the next set of certificate ARNs.
90+
Retrieves a list of ACM Certificates and the domain name for each. You can
91+
optionally filter the list to return only the certificates that match the
92+
specified status.
6893
"""
6994
def list_certificates(client, input, options \\ []) do
7095
request(client, "ListCertificates", input, options)
7196
end
7297

98+
@doc """
99+
Lists the tags that have been applied to the ACM Certificate. Use the
100+
certificate ARN to specify the certificate. To add a tag to an ACM
101+
Certificate, use the `AddTagsToCertificate` action. To delete a tag, use
102+
the `RemoveTagsFromCertificate` action.
103+
"""
104+
def list_tags_for_certificate(client, input, options \\ []) do
105+
request(client, "ListTagsForCertificate", input, options)
106+
end
107+
108+
@doc """
109+
Remove one or more tags from an ACM Certificate. A tag consists of a
110+
key-value pair. If you do not specify the value portion of the tag when
111+
calling this function, the tag will be removed regardless of value. If you
112+
specify a value, the tag is removed only if it is associated with the
113+
specified value.
114+
115+
To add tags to a certificate, use the `AddTagsToCertificate` action. To
116+
view all of the tags that have been applied to a specific ACM Certificate,
117+
use the `ListTagsForCertificate` action.
118+
"""
119+
def remove_tags_from_certificate(client, input, options \\ []) do
120+
request(client, "RemoveTagsFromCertificate", input, options)
121+
end
122+
73123
@doc """
74124
Requests an ACM Certificate for use with other AWS services. To request an
75125
ACM Certificate, you must specify the fully qualified domain name (FQDN)
76126
for your site. You can also specify additional FQDNs if users can reach
77127
your site by using other names. For each domain name you specify, email is
78128
sent to the domain owner to request approval to issue the certificate.
79129
After receiving approval from the domain owner, the ACM Certificate is
80-
issued. For more information, see the [ AWS Certificate Manager User Guide
130+
issued. For more information, see the [AWS Certificate Manager User Guide
81131
](http://docs.aws.amazon.com/acm/latest/userguide/overview.html).
82132
"""
83133
def request_certificate(client, input, options \\ []) do

lib/aws/cloud_hsm.ex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ defmodule AWS.CloudHSM do
77
"""
88

99
@doc """
10-
Adds or overwrites one or more tags for the specified resource.
10+
Adds or overwrites one or more tags for the specified AWS CloudHSM
11+
resource.
1112
12-
Each tag consists of a key and a value. Tag keys must be unique per
13+
Each tag consists of a key and a value. Tag keys must be unique to each
1314
resource.
1415
"""
1516
def add_tags_to_resource(client, input, options \\ []) do
@@ -147,7 +148,7 @@ defmodule AWS.CloudHSM do
147148
end
148149

149150
@doc """
150-
Returns a list of all tags for the specified resource.
151+
Returns a list of all tags for the specified AWS CloudHSM resource.
151152
"""
152153
def list_tags_for_resource(client, input, options \\ []) do
153154
request(client, "ListTagsForResource", input, options)
@@ -186,7 +187,7 @@ defmodule AWS.CloudHSM do
186187
end
187188

188189
@doc """
189-
Removes one or more tags from the specified resource.
190+
Removes one or more tags from the specified AWS CloudHSM resource.
190191
191192
To remove a tag, specify only the tag key to remove (not the value). To
192193
overwrite the value for an existing tag, use `AddTagsToResource`.

0 commit comments

Comments
 (0)