lib/aws-sdk-applicationautoscaling/client.rb in aws-sdk-applicationautoscaling-1.67.0 vs lib/aws-sdk-applicationautoscaling/client.rb in aws-sdk-applicationautoscaling-1.68.0
- old
+ new
@@ -735,10 +735,26 @@
# * `neptune:cluster:ReadReplicaCount` - The count of read replicas in
# an Amazon Neptune DB cluster.
#
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
#
+ #
+ # @example Example: To delete a scheduled action
+ #
+ # # This example deletes a scheduled action for the AppStream 2.0 fleet called sample-fleet.
+ #
+ # resp = client.delete_scheduled_action({
+ # resource_id: "fleet/sample-fleet",
+ # scalable_dimension: "appstream:fleet:DesiredCapacity",
+ # scheduled_action_name: "my-recurring-action",
+ # service_namespace: "appstream",
+ # })
+ #
+ # resp.to_h outputs the following:
+ # {
+ # }
+ #
# @example Request syntax with placeholder values
#
# resp = client.delete_scheduled_action({
# service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream, dynamodb, rds, sagemaker, custom-resource, comprehend, lambda, cassandra, kafka, elasticache, neptune
# scheduled_action_name: "ResourceIdMaxLen1600", # required
@@ -1170,10 +1186,11 @@
# resp.scalable_targets[0].role_arn #=> String
# resp.scalable_targets[0].creation_time #=> Time
# resp.scalable_targets[0].suspended_state.dynamic_scaling_in_suspended #=> Boolean
# resp.scalable_targets[0].suspended_state.dynamic_scaling_out_suspended #=> Boolean
# resp.scalable_targets[0].suspended_state.scheduled_scaling_suspended #=> Boolean
+ # resp.scalable_targets[0].scalable_target_arn #=> String
# resp.next_token #=> String
#
# @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalableTargets AWS API Documentation
#
# @overload describe_scalable_targets(params = {})
@@ -1916,10 +1933,51 @@
# * {Types::DescribeScheduledActionsResponse#scheduled_actions #scheduled_actions} => Array<Types::ScheduledAction>
# * {Types::DescribeScheduledActionsResponse#next_token #next_token} => String
#
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
#
+ #
+ # @example Example: To describe scheduled actions
+ #
+ # # This example describes the scheduled actions for the dynamodb service namespace.
+ #
+ # resp = client.describe_scheduled_actions({
+ # service_namespace: "dynamodb",
+ # })
+ #
+ # resp.to_h outputs the following:
+ # {
+ # scheduled_actions: [
+ # {
+ # creation_time: Time.parse(1561571888.361),
+ # resource_id: "table/my-table",
+ # scalable_dimension: "dynamodb:table:WriteCapacityUnits",
+ # scalable_target_action: {
+ # max_capacity: 20,
+ # min_capacity: 15,
+ # },
+ # schedule: "at(2019-05-20T18:35:00)",
+ # scheduled_action_arn: "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-first-scheduled-action",
+ # scheduled_action_name: "my-first-scheduled-action",
+ # service_namespace: "dynamodb",
+ # },
+ # {
+ # creation_time: Time.parse(1561571946.021),
+ # resource_id: "table/my-table",
+ # scalable_dimension: "dynamodb:table:WriteCapacityUnits",
+ # scalable_target_action: {
+ # max_capacity: 10,
+ # min_capacity: 5,
+ # },
+ # schedule: "at(2019-05-20T18:40:00)",
+ # scheduled_action_arn: "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-second-scheduled-action",
+ # scheduled_action_name: "my-second-scheduled-action",
+ # service_namespace: "dynamodb",
+ # },
+ # ],
+ # }
+ #
# @example Request syntax with placeholder values
#
# resp = client.describe_scheduled_actions({
# scheduled_action_names: ["ResourceIdMaxLen1600"],
# service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream, dynamodb, rds, sagemaker, custom-resource, comprehend, lambda, cassandra, kafka, elasticache, neptune
@@ -1953,10 +2011,69 @@
def describe_scheduled_actions(params = {}, options = {})
req = build_request(:describe_scheduled_actions, params)
req.send_request(options)
end
+ # Returns all the tags on the specified Application Auto Scaling
+ # scalable target.
+ #
+ # For general information about tags, including the format and syntax,
+ # see [Tagging Amazon Web Services resources][1] in the *Amazon Web
+ # Services General Reference*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
+ #
+ # @option params [required, String] :resource_arn
+ # Specify the ARN of the scalable target.
+ #
+ # For example:
+ # `arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123`
+ #
+ # To get the ARN for a scalable target, use DescribeScalableTargets.
+ #
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
+ #
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Hash<String,String>
+ #
+ #
+ # @example Example: To list tags for a scalable target
+ #
+ # # This example lists the tag key names and values that are attached to the scalable target specified by its ARN.
+ #
+ # resp = client.list_tags_for_resource({
+ # resource_arn: "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123",
+ # })
+ #
+ # resp.to_h outputs the following:
+ # {
+ # tags: {
+ # "environment" => "production",
+ # },
+ # }
+ #
+ # @example Request syntax with placeholder values
+ #
+ # resp = client.list_tags_for_resource({
+ # resource_arn: "AmazonResourceName", # required
+ # })
+ #
+ # @example Response structure
+ #
+ # resp.tags #=> Hash
+ # resp.tags["TagKey"] #=> String
+ #
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/ListTagsForResource AWS API Documentation
+ #
+ # @overload list_tags_for_resource(params = {})
+ # @param [Hash] params ({})
+ def list_tags_for_resource(params = {}, options = {})
+ req = build_request(:list_tags_for_resource, params)
+ req.send_request(options)
+ end
+
# Creates or updates a scaling policy for an Application Auto Scaling
# scalable target.
#
# Each scalable target is identified by a service namespace, resource
# ID, and scalable dimension. A scaling policy applies to the scalable
@@ -1987,11 +2104,11 @@
# For more information, see [Target tracking scaling policies][1] and
# [Step scaling policies][2] in the *Application Auto Scaling User
# Guide*.
#
# <note markdown="1"> If a scalable target is deregistered, the scalable target is no longer
- # available to execute scaling policies. Any scaling policies that were
+ # available to use scaling policies. Any scaling policies that were
# specified for the scalable target are deleted.
#
# </note>
#
#
@@ -2316,12 +2433,12 @@
# ID, and scalable dimension. A scheduled action applies to the scalable
# target identified by those three attributes. You cannot create a
# scheduled action until you have registered the resource as a scalable
# target.
#
- # When start and end times are specified with a recurring schedule using
- # a cron expression or rates, they form the boundaries for when the
+ # When you specify start and end times with a recurring schedule using a
+ # cron expression or rates, they form the boundaries for when the
# recurring action starts and stops.
#
# To update a scheduled action, specify the parameters that you want to
# change. If you don't specify start and end times, the old values are
# deleted.
@@ -2545,10 +2662,32 @@
# capacity. If the current capacity is above the maximum capacity,
# Application Auto Scaling scales in to the maximum capacity.
#
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
#
+ #
+ # @example Example: To create a recurring scheduled action
+ #
+ # # This example adds a scheduled action to a DynamoDB table called TestTable to scale out on a recurring schedule. On the
+ # # specified schedule (every day at 12:15pm UTC), if the current capacity is below the value specified for MinCapacity,
+ # # Application Auto Scaling scales out to the value specified by MinCapacity.
+ #
+ # resp = client.put_scheduled_action({
+ # resource_id: "table/TestTable",
+ # scalable_dimension: "dynamodb:table:WriteCapacityUnits",
+ # scalable_target_action: {
+ # min_capacity: 6,
+ # },
+ # schedule: "cron(15 12 * * ? *)",
+ # scheduled_action_name: "my-recurring-action",
+ # service_namespace: "dynamodb",
+ # })
+ #
+ # resp.to_h outputs the following:
+ # {
+ # }
+ #
# @example Request syntax with placeholder values
#
# resp = client.put_scheduled_action({
# service_namespace: "ecs", # required, accepts ecs, elasticmapreduce, ec2, appstream, dynamodb, rds, sagemaker, custom-resource, comprehend, lambda, cassandra, kafka, elasticache, neptune
# schedule: "ResourceIdMaxLen1600",
@@ -2571,12 +2710,12 @@
def put_scheduled_action(params = {}, options = {})
req = build_request(:put_scheduled_action, params)
req.send_request(options)
end
- # Registers or updates a scalable target, the resource that you want to
- # scale.
+ # Registers or updates a scalable target, which is the resource that you
+ # want to scale.
#
# Scalable targets are uniquely identified by the combination of
# resource ID, scalable dimension, and namespace, which represents some
# capacity dimension of the underlying service.
#
@@ -2584,14 +2723,14 @@
# the minimum and maximum capacity. If the specified resource is not
# active in the target service, this operation does not change the
# resource's current capacity. Otherwise, it changes the resource's
# current capacity to a value that is inside of this range.
#
- # If you choose to add a scaling policy, current capacity is adjustable
- # within the specified range when scaling starts. Application Auto
- # Scaling scaling policies will not scale capacity to values that are
- # outside of the minimum and maximum range.
+ # If you add a scaling policy, current capacity is adjustable within the
+ # specified range when scaling starts. Application Auto Scaling scaling
+ # policies will not scale capacity to values that are outside of the
+ # minimum and maximum range.
#
# After you register a scalable target, you do not need to register it
# again to use other Application Auto Scaling operations. To see which
# resources have been registered, use [DescribeScalableTargets][1]. You
# can also view the scaling policies for a service namespace by using
@@ -2601,23 +2740,32 @@
# To update a scalable target, specify the parameters that you want to
# change. Include the parameters that identify the scalable target:
# resource ID, scalable dimension, and namespace. Any parameters that
# you don't specify are not changed by this update request.
#
- # <note markdown="1"> If you call the `RegisterScalableTarget` API to update an existing
- # scalable target, Application Auto Scaling retrieves the current
- # capacity of the resource. If it is below the minimum capacity or above
- # the maximum capacity, Application Auto Scaling adjusts the capacity of
- # the scalable target to place it within these bounds, even if you
- # don't include the `MinCapacity` or `MaxCapacity` request parameters.
+ # <note markdown="1"> If you call the `RegisterScalableTarget` API operation to create a
+ # scalable target, there might be a brief delay until the operation
+ # achieves [eventual consistency][3]. You might become aware of this
+ # brief delay if you get unexpected errors when performing sequential
+ # operations. The typical strategy is to retry the request, and some
+ # Amazon Web Services SDKs include automatic backoff and retry logic.
#
+ # If you call the `RegisterScalableTarget` API operation to update an
+ # existing scalable target, Application Auto Scaling retrieves the
+ # current capacity of the resource. If it's below the minimum capacity
+ # or above the maximum capacity, Application Auto Scaling adjusts the
+ # capacity of the scalable target to place it within these bounds, even
+ # if you don't include the `MinCapacity` or `MaxCapacity` request
+ # parameters.
+ #
# </note>
#
#
#
# [1]: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_DescribeScalableTargets.html
# [2]: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_DeregisterScalableTarget.html
+ # [3]: https://en.wikipedia.org/wiki/Eventual_consistency
#
# @option params [required, String] :service_namespace
# The namespace of the Amazon Web Services service that provides the
# resource. For a resource provided by your own application or service,
# use `custom-resource` instead.
@@ -2803,11 +2951,11 @@
# is in effect, Application Auto Scaling can scale out (expand) as
# needed to the maximum capacity limit in response to changing demand.
# This property is required when registering a new scalable target.
#
# Although you can specify a large maximum capacity, note that service
- # quotas may impose lower limits. Each service has its own default
+ # quotas might impose lower limits. Each service has its own default
# quotas for the maximum capacity of the resource. If you want to
# specify a higher limit, you can request an increase. For more
# information, consult the documentation for that service. For
# information about the default quotas for each service, see [Service
# endpoints and quotas][1] in the *Amazon Web Services General
@@ -2856,13 +3004,32 @@
#
#
#
# [1]: https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-suspend-resume-scaling.html
#
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
+ # @option params [Hash<String,String>] :tags
+ # Assigns one or more tags to the scalable target. Use this parameter to
+ # tag the scalable target when it is created. To tag an existing
+ # scalable target, use the TagResource operation.
#
+ # Each tag consists of a tag key and a tag value. Both the tag key and
+ # the tag value are required. You cannot have more than one tag on a
+ # scalable target with the same tag key.
#
+ # Use tags to control access to a scalable target. For more information,
+ # see [Tagging support for Application Auto Scaling][1] in the
+ # *Application Auto Scaling User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/autoscaling/application/userguide/resource-tagging-support.html
+ #
+ # @return [Types::RegisterScalableTargetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
+ #
+ # * {Types::RegisterScalableTargetResponse#scalable_target_arn #scalable_target_arn} => String
+ #
+ #
# @example Example: To register an ECS service as a scalable target
#
# # This example registers a scalable target from an Amazon ECS service called web-app that is running on the default
# # cluster, with a minimum desired count of 1 task and a maximum desired count of 10 tasks.
#
@@ -2886,21 +3053,168 @@
# suspended_state: {
# dynamic_scaling_in_suspended: false,
# dynamic_scaling_out_suspended: false,
# scheduled_scaling_suspended: false,
# },
+ # tags: {
+ # "TagKey" => "TagValue",
+ # },
# })
#
+ # @example Response structure
+ #
+ # resp.scalable_target_arn #=> String
+ #
# @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/RegisterScalableTarget AWS API Documentation
#
# @overload register_scalable_target(params = {})
# @param [Hash] params ({})
def register_scalable_target(params = {}, options = {})
req = build_request(:register_scalable_target, params)
req.send_request(options)
end
+ # Adds or edits tags on an Application Auto Scaling scalable target.
+ #
+ # Each tag consists of a tag key and a tag value, which are both
+ # case-sensitive strings. To add a tag, specify a new tag key and a tag
+ # value. To edit a tag, specify an existing tag key and a new tag value.
+ #
+ # You can use this operation to tag an Application Auto Scaling scalable
+ # target, but you cannot tag a scaling policy or scheduled action.
+ #
+ # You can also add tags to an Application Auto Scaling scalable target
+ # while creating it (`RegisterScalableTarget`).
+ #
+ # For general information about tags, including the format and syntax,
+ # see [Tagging Amazon Web Services resources][1] in the *Amazon Web
+ # Services General Reference*.
+ #
+ # Use tags to control access to a scalable target. For more information,
+ # see [Tagging support for Application Auto Scaling][2] in the
+ # *Application Auto Scaling User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
+ # [2]: https://docs.aws.amazon.com/autoscaling/application/userguide/resource-tagging-support.html
+ #
+ # @option params [required, String] :resource_arn
+ # Identifies the Application Auto Scaling scalable target that you want
+ # to apply tags to.
+ #
+ # For example:
+ # `arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123`
+ #
+ # To get the ARN for a scalable target, use DescribeScalableTargets.
+ #
+ # @option params [required, Hash<String,String>] :tags
+ # The tags assigned to the resource. A tag is a label that you assign to
+ # an AWS resource.
+ #
+ # Each tag consists of a tag key and a tag value.
+ #
+ # You cannot have more than one tag on an Application Auto Scaling
+ # scalable target with the same tag key. If you specify an existing tag
+ # key with a different tag value, Application Auto Scaling replaces the
+ # current tag value with the specified one.
+ #
+ # For information about the rules that apply to tag keys and tag values,
+ # see [User-defined tag restrictions][1] in the *Amazon Web Services
+ # Billing and Cost Management User Guide*.
+ #
+ #
+ #
+ # [1]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html
+ #
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
+ #
+ #
+ # @example Example: To add a tag to a scalable target
+ #
+ # # This example adds a tag with the key name "environment" and the value "production" to the scalable target specified by
+ # # its ARN.
+ #
+ # resp = client.tag_resource({
+ # resource_arn: "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123",
+ # tags: {
+ # "environment" => "production",
+ # },
+ # })
+ #
+ # resp.to_h outputs the following:
+ # {
+ # }
+ #
+ # @example Request syntax with placeholder values
+ #
+ # resp = client.tag_resource({
+ # resource_arn: "AmazonResourceName", # required
+ # tags: { # required
+ # "TagKey" => "TagValue",
+ # },
+ # })
+ #
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/TagResource AWS API Documentation
+ #
+ # @overload tag_resource(params = {})
+ # @param [Hash] params ({})
+ def tag_resource(params = {}, options = {})
+ req = build_request(:tag_resource, params)
+ req.send_request(options)
+ end
+
+ # Deletes tags from an Application Auto Scaling scalable target. To
+ # delete a tag, specify the tag key and the Application Auto Scaling
+ # scalable target.
+ #
+ # @option params [required, String] :resource_arn
+ # Identifies the Application Auto Scaling scalable target from which to
+ # remove tags.
+ #
+ # For example:
+ # `arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123`
+ #
+ # To get the ARN for a scalable target, use DescribeScalableTargets.
+ #
+ # @option params [required, Array<String>] :tag_keys
+ # One or more tag keys. Specify only the tag keys, not the tag values.
+ #
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
+ #
+ #
+ # @example Example: To remove a tag from a scalable target
+ #
+ # # This example removes the tag pair with the key name "environment" from the scalable target specified by its ARN.
+ #
+ # resp = client.untag_resource({
+ # resource_arn: "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123",
+ # tag_keys: [
+ # "environment",
+ # ],
+ # })
+ #
+ # resp.to_h outputs the following:
+ # {
+ # }
+ #
+ # @example Request syntax with placeholder values
+ #
+ # resp = client.untag_resource({
+ # resource_arn: "AmazonResourceName", # required
+ # tag_keys: ["TagKey"], # required
+ # })
+ #
+ # @see http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/UntagResource AWS API Documentation
+ #
+ # @overload untag_resource(params = {})
+ # @param [Hash] params ({})
+ def untag_resource(params = {}, options = {})
+ req = build_request(:untag_resource, params)
+ req.send_request(options)
+ end
+
# @!endgroup
# @param params ({})
# @api private
def build_request(operation_name, params = {})
@@ -2910,10 +3224,10 @@
operation: config.api.operation(operation_name),
client: self,
params: params,
config: config)
context[:gem_name] = 'aws-sdk-applicationautoscaling'
- context[:gem_version] = '1.67.0'
+ context[:gem_version] = '1.68.0'
Seahorse::Client::Request.new(handlers, context)
end
# @api private
# @deprecated