{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApplicationAutoScaling.DescribeScalingActivities
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Provides descriptive information about the scaling activities in the
-- specified namespace from the previous six weeks.
--
-- You can filter the results using @ResourceId@ and @ScalableDimension@.
--
-- This operation returns paginated results.
module Amazonka.ApplicationAutoScaling.DescribeScalingActivities
  ( -- * Creating a Request
    DescribeScalingActivities (..),
    newDescribeScalingActivities,

    -- * Request Lenses
    describeScalingActivities_scalableDimension,
    describeScalingActivities_resourceId,
    describeScalingActivities_nextToken,
    describeScalingActivities_maxResults,
    describeScalingActivities_serviceNamespace,

    -- * Destructuring the Response
    DescribeScalingActivitiesResponse (..),
    newDescribeScalingActivitiesResponse,

    -- * Response Lenses
    describeScalingActivitiesResponse_scalingActivities,
    describeScalingActivitiesResponse_nextToken,
    describeScalingActivitiesResponse_httpStatus,
  )
where

import Amazonka.ApplicationAutoScaling.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeScalingActivities' smart constructor.
data DescribeScalingActivities = DescribeScalingActivities'
  { -- | The scalable dimension. This string consists of the service namespace,
    -- resource type, and scaling property. If you specify a scalable
    -- dimension, you must also specify a resource ID.
    --
    -- -   @ecs:service:DesiredCount@ - The desired task count of an ECS
    --     service.
    --
    -- -   @elasticmapreduce:instancegroup:InstanceCount@ - The instance count
    --     of an EMR Instance Group.
    --
    -- -   @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a
    --     Spot Fleet.
    --
    -- -   @appstream:fleet:DesiredCapacity@ - The desired capacity of an
    --     AppStream 2.0 fleet.
    --
    -- -   @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity
    --     for a DynamoDB table.
    --
    -- -   @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity
    --     for a DynamoDB table.
    --
    -- -   @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity
    --     for a DynamoDB global secondary index.
    --
    -- -   @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity
    --     for a DynamoDB global secondary index.
    --
    -- -   @rds:cluster:ReadReplicaCount@ - The count of Aurora Replicas in an
    --     Aurora DB cluster. Available for Aurora MySQL-compatible edition and
    --     Aurora PostgreSQL-compatible edition.
    --
    -- -   @sagemaker:variant:DesiredInstanceCount@ - The number of EC2
    --     instances for an SageMaker model endpoint variant.
    --
    -- -   @custom-resource:ResourceType:Property@ - The scalable dimension for
    --     a custom resource provided by your own application or service.
    --
    -- -   @comprehend:document-classifier-endpoint:DesiredInferenceUnits@ -
    --     The number of inference units for an Amazon Comprehend document
    --     classification endpoint.
    --
    -- -   @comprehend:entity-recognizer-endpoint:DesiredInferenceUnits@ - The
    --     number of inference units for an Amazon Comprehend entity recognizer
    --     endpoint.
    --
    -- -   @lambda:function:ProvisionedConcurrency@ - The provisioned
    --     concurrency for a Lambda function.
    --
    -- -   @cassandra:table:ReadCapacityUnits@ - The provisioned read capacity
    --     for an Amazon Keyspaces table.
    --
    -- -   @cassandra:table:WriteCapacityUnits@ - The provisioned write
    --     capacity for an Amazon Keyspaces table.
    --
    -- -   @kafka:broker-storage:VolumeSize@ - The provisioned volume size (in
    --     GiB) for brokers in an Amazon MSK cluster.
    --
    -- -   @elasticache:replication-group:NodeGroups@ - The number of node
    --     groups for an Amazon ElastiCache replication group.
    --
    -- -   @elasticache:replication-group:Replicas@ - The number of replicas
    --     per node group for an Amazon ElastiCache replication group.
    --
    -- -   @neptune:cluster:ReadReplicaCount@ - The count of read replicas in
    --     an Amazon Neptune DB cluster.
    DescribeScalingActivities -> Maybe ScalableDimension
scalableDimension :: Prelude.Maybe ScalableDimension,
    -- | The identifier of the resource associated with the scaling activity.
    -- This string consists of the resource type and unique identifier.
    --
    -- -   ECS service - The resource type is @service@ and the unique
    --     identifier is the cluster name and service name. Example:
    --     @service\/default\/sample-webapp@.
    --
    -- -   Spot Fleet - The resource type is @spot-fleet-request@ and the
    --     unique identifier is the Spot Fleet request ID. Example:
    --     @spot-fleet-request\/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@.
    --
    -- -   EMR cluster - The resource type is @instancegroup@ and the unique
    --     identifier is the cluster ID and instance group ID. Example:
    --     @instancegroup\/j-2EEZNYKUA1NTV\/ig-1791Y4E1L8YI0@.
    --
    -- -   AppStream 2.0 fleet - The resource type is @fleet@ and the unique
    --     identifier is the fleet name. Example: @fleet\/sample-fleet@.
    --
    -- -   DynamoDB table - The resource type is @table@ and the unique
    --     identifier is the table name. Example: @table\/my-table@.
    --
    -- -   DynamoDB global secondary index - The resource type is @index@ and
    --     the unique identifier is the index name. Example:
    --     @table\/my-table\/index\/my-table-index@.
    --
    -- -   Aurora DB cluster - The resource type is @cluster@ and the unique
    --     identifier is the cluster name. Example: @cluster:my-db-cluster@.
    --
    -- -   SageMaker endpoint variant - The resource type is @variant@ and the
    --     unique identifier is the resource ID. Example:
    --     @endpoint\/my-end-point\/variant\/KMeansClustering@.
    --
    -- -   Custom resources are not supported with a resource type. This
    --     parameter must specify the @OutputValue@ from the CloudFormation
    --     template stack used to access the resources. The unique identifier
    --     is defined by the service provider. More information is available in
    --     our
    --     <https://github.com/aws/aws-auto-scaling-custom-resource GitHub repository>.
    --
    -- -   Amazon Comprehend document classification endpoint - The resource
    --     type and unique identifier are specified using the endpoint ARN.
    --     Example:
    --     @arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint\/EXAMPLE@.
    --
    -- -   Amazon Comprehend entity recognizer endpoint - The resource type and
    --     unique identifier are specified using the endpoint ARN. Example:
    --     @arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint\/EXAMPLE@.
    --
    -- -   Lambda provisioned concurrency - The resource type is @function@ and
    --     the unique identifier is the function name with a function version
    --     or alias name suffix that is not @$LATEST@. Example:
    --     @function:my-function:prod@ or @function:my-function:1@.
    --
    -- -   Amazon Keyspaces table - The resource type is @table@ and the unique
    --     identifier is the table name. Example:
    --     @keyspace\/mykeyspace\/table\/mytable@.
    --
    -- -   Amazon MSK cluster - The resource type and unique identifier are
    --     specified using the cluster ARN. Example:
    --     @arn:aws:kafka:us-east-1:123456789012:cluster\/demo-cluster-1\/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5@.
    --
    -- -   Amazon ElastiCache replication group - The resource type is
    --     @replication-group@ and the unique identifier is the replication
    --     group name. Example: @replication-group\/mycluster@.
    --
    -- -   Neptune cluster - The resource type is @cluster@ and the unique
    --     identifier is the cluster name. Example: @cluster:mycluster@.
    DescribeScalingActivities -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results.
    DescribeScalingActivities -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of scalable targets. This value can be between 1 and
    -- 50. The default value is 50.
    --
    -- If this parameter is used, the operation returns up to @MaxResults@
    -- results at a time, along with a @NextToken@ value. To get the next set
    -- of results, include the @NextToken@ value in a subsequent call. If this
    -- parameter is not used, the operation returns up to 50 results and a
    -- @NextToken@ value, if applicable.
    DescribeScalingActivities -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | 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.
    DescribeScalingActivities -> ServiceNamespace
serviceNamespace :: ServiceNamespace
  }
  deriving (DescribeScalingActivities -> DescribeScalingActivities -> Bool
(DescribeScalingActivities -> DescribeScalingActivities -> Bool)
-> (DescribeScalingActivities -> DescribeScalingActivities -> Bool)
-> Eq DescribeScalingActivities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
$c/= :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
== :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
$c== :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
Prelude.Eq, ReadPrec [DescribeScalingActivities]
ReadPrec DescribeScalingActivities
Int -> ReadS DescribeScalingActivities
ReadS [DescribeScalingActivities]
(Int -> ReadS DescribeScalingActivities)
-> ReadS [DescribeScalingActivities]
-> ReadPrec DescribeScalingActivities
-> ReadPrec [DescribeScalingActivities]
-> Read DescribeScalingActivities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScalingActivities]
$creadListPrec :: ReadPrec [DescribeScalingActivities]
readPrec :: ReadPrec DescribeScalingActivities
$creadPrec :: ReadPrec DescribeScalingActivities
readList :: ReadS [DescribeScalingActivities]
$creadList :: ReadS [DescribeScalingActivities]
readsPrec :: Int -> ReadS DescribeScalingActivities
$creadsPrec :: Int -> ReadS DescribeScalingActivities
Prelude.Read, Int -> DescribeScalingActivities -> ShowS
[DescribeScalingActivities] -> ShowS
DescribeScalingActivities -> String
(Int -> DescribeScalingActivities -> ShowS)
-> (DescribeScalingActivities -> String)
-> ([DescribeScalingActivities] -> ShowS)
-> Show DescribeScalingActivities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScalingActivities] -> ShowS
$cshowList :: [DescribeScalingActivities] -> ShowS
show :: DescribeScalingActivities -> String
$cshow :: DescribeScalingActivities -> String
showsPrec :: Int -> DescribeScalingActivities -> ShowS
$cshowsPrec :: Int -> DescribeScalingActivities -> ShowS
Prelude.Show, (forall x.
 DescribeScalingActivities -> Rep DescribeScalingActivities x)
-> (forall x.
    Rep DescribeScalingActivities x -> DescribeScalingActivities)
-> Generic DescribeScalingActivities
forall x.
Rep DescribeScalingActivities x -> DescribeScalingActivities
forall x.
DescribeScalingActivities -> Rep DescribeScalingActivities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScalingActivities x -> DescribeScalingActivities
$cfrom :: forall x.
DescribeScalingActivities -> Rep DescribeScalingActivities x
Prelude.Generic)

-- |
-- Create a value of 'DescribeScalingActivities' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'scalableDimension', 'describeScalingActivities_scalableDimension' - The scalable dimension. This string consists of the service namespace,
-- resource type, and scaling property. If you specify a scalable
-- dimension, you must also specify a resource ID.
--
-- -   @ecs:service:DesiredCount@ - The desired task count of an ECS
--     service.
--
-- -   @elasticmapreduce:instancegroup:InstanceCount@ - The instance count
--     of an EMR Instance Group.
--
-- -   @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a
--     Spot Fleet.
--
-- -   @appstream:fleet:DesiredCapacity@ - The desired capacity of an
--     AppStream 2.0 fleet.
--
-- -   @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB global secondary index.
--
-- -   @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB global secondary index.
--
-- -   @rds:cluster:ReadReplicaCount@ - The count of Aurora Replicas in an
--     Aurora DB cluster. Available for Aurora MySQL-compatible edition and
--     Aurora PostgreSQL-compatible edition.
--
-- -   @sagemaker:variant:DesiredInstanceCount@ - The number of EC2
--     instances for an SageMaker model endpoint variant.
--
-- -   @custom-resource:ResourceType:Property@ - The scalable dimension for
--     a custom resource provided by your own application or service.
--
-- -   @comprehend:document-classifier-endpoint:DesiredInferenceUnits@ -
--     The number of inference units for an Amazon Comprehend document
--     classification endpoint.
--
-- -   @comprehend:entity-recognizer-endpoint:DesiredInferenceUnits@ - The
--     number of inference units for an Amazon Comprehend entity recognizer
--     endpoint.
--
-- -   @lambda:function:ProvisionedConcurrency@ - The provisioned
--     concurrency for a Lambda function.
--
-- -   @cassandra:table:ReadCapacityUnits@ - The provisioned read capacity
--     for an Amazon Keyspaces table.
--
-- -   @cassandra:table:WriteCapacityUnits@ - The provisioned write
--     capacity for an Amazon Keyspaces table.
--
-- -   @kafka:broker-storage:VolumeSize@ - The provisioned volume size (in
--     GiB) for brokers in an Amazon MSK cluster.
--
-- -   @elasticache:replication-group:NodeGroups@ - The number of node
--     groups for an Amazon ElastiCache replication group.
--
-- -   @elasticache:replication-group:Replicas@ - The number of replicas
--     per node group for an Amazon ElastiCache replication group.
--
-- -   @neptune:cluster:ReadReplicaCount@ - The count of read replicas in
--     an Amazon Neptune DB cluster.
--
-- 'resourceId', 'describeScalingActivities_resourceId' - The identifier of the resource associated with the scaling activity.
-- This string consists of the resource type and unique identifier.
--
-- -   ECS service - The resource type is @service@ and the unique
--     identifier is the cluster name and service name. Example:
--     @service\/default\/sample-webapp@.
--
-- -   Spot Fleet - The resource type is @spot-fleet-request@ and the
--     unique identifier is the Spot Fleet request ID. Example:
--     @spot-fleet-request\/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@.
--
-- -   EMR cluster - The resource type is @instancegroup@ and the unique
--     identifier is the cluster ID and instance group ID. Example:
--     @instancegroup\/j-2EEZNYKUA1NTV\/ig-1791Y4E1L8YI0@.
--
-- -   AppStream 2.0 fleet - The resource type is @fleet@ and the unique
--     identifier is the fleet name. Example: @fleet\/sample-fleet@.
--
-- -   DynamoDB table - The resource type is @table@ and the unique
--     identifier is the table name. Example: @table\/my-table@.
--
-- -   DynamoDB global secondary index - The resource type is @index@ and
--     the unique identifier is the index name. Example:
--     @table\/my-table\/index\/my-table-index@.
--
-- -   Aurora DB cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:my-db-cluster@.
--
-- -   SageMaker endpoint variant - The resource type is @variant@ and the
--     unique identifier is the resource ID. Example:
--     @endpoint\/my-end-point\/variant\/KMeansClustering@.
--
-- -   Custom resources are not supported with a resource type. This
--     parameter must specify the @OutputValue@ from the CloudFormation
--     template stack used to access the resources. The unique identifier
--     is defined by the service provider. More information is available in
--     our
--     <https://github.com/aws/aws-auto-scaling-custom-resource GitHub repository>.
--
-- -   Amazon Comprehend document classification endpoint - The resource
--     type and unique identifier are specified using the endpoint ARN.
--     Example:
--     @arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint\/EXAMPLE@.
--
-- -   Amazon Comprehend entity recognizer endpoint - The resource type and
--     unique identifier are specified using the endpoint ARN. Example:
--     @arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint\/EXAMPLE@.
--
-- -   Lambda provisioned concurrency - The resource type is @function@ and
--     the unique identifier is the function name with a function version
--     or alias name suffix that is not @$LATEST@. Example:
--     @function:my-function:prod@ or @function:my-function:1@.
--
-- -   Amazon Keyspaces table - The resource type is @table@ and the unique
--     identifier is the table name. Example:
--     @keyspace\/mykeyspace\/table\/mytable@.
--
-- -   Amazon MSK cluster - The resource type and unique identifier are
--     specified using the cluster ARN. Example:
--     @arn:aws:kafka:us-east-1:123456789012:cluster\/demo-cluster-1\/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5@.
--
-- -   Amazon ElastiCache replication group - The resource type is
--     @replication-group@ and the unique identifier is the replication
--     group name. Example: @replication-group\/mycluster@.
--
-- -   Neptune cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:mycluster@.
--
-- 'nextToken', 'describeScalingActivities_nextToken' - The token for the next set of results.
--
-- 'maxResults', 'describeScalingActivities_maxResults' - The maximum number of scalable targets. This value can be between 1 and
-- 50. The default value is 50.
--
-- If this parameter is used, the operation returns up to @MaxResults@
-- results at a time, along with a @NextToken@ value. To get the next set
-- of results, include the @NextToken@ value in a subsequent call. If this
-- parameter is not used, the operation returns up to 50 results and a
-- @NextToken@ value, if applicable.
--
-- 'serviceNamespace', 'describeScalingActivities_serviceNamespace' - 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.
newDescribeScalingActivities ::
  -- | 'serviceNamespace'
  ServiceNamespace ->
  DescribeScalingActivities
newDescribeScalingActivities :: ServiceNamespace -> DescribeScalingActivities
newDescribeScalingActivities ServiceNamespace
pServiceNamespace_ =
  DescribeScalingActivities' :: Maybe ScalableDimension
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> ServiceNamespace
-> DescribeScalingActivities
DescribeScalingActivities'
    { $sel:scalableDimension:DescribeScalingActivities' :: Maybe ScalableDimension
scalableDimension =
        Maybe ScalableDimension
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:DescribeScalingActivities' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeScalingActivities' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeScalingActivities' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceNamespace:DescribeScalingActivities' :: ServiceNamespace
serviceNamespace = ServiceNamespace
pServiceNamespace_
    }

-- | The scalable dimension. This string consists of the service namespace,
-- resource type, and scaling property. If you specify a scalable
-- dimension, you must also specify a resource ID.
--
-- -   @ecs:service:DesiredCount@ - The desired task count of an ECS
--     service.
--
-- -   @elasticmapreduce:instancegroup:InstanceCount@ - The instance count
--     of an EMR Instance Group.
--
-- -   @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a
--     Spot Fleet.
--
-- -   @appstream:fleet:DesiredCapacity@ - The desired capacity of an
--     AppStream 2.0 fleet.
--
-- -   @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB table.
--
-- -   @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity
--     for a DynamoDB global secondary index.
--
-- -   @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity
--     for a DynamoDB global secondary index.
--
-- -   @rds:cluster:ReadReplicaCount@ - The count of Aurora Replicas in an
--     Aurora DB cluster. Available for Aurora MySQL-compatible edition and
--     Aurora PostgreSQL-compatible edition.
--
-- -   @sagemaker:variant:DesiredInstanceCount@ - The number of EC2
--     instances for an SageMaker model endpoint variant.
--
-- -   @custom-resource:ResourceType:Property@ - The scalable dimension for
--     a custom resource provided by your own application or service.
--
-- -   @comprehend:document-classifier-endpoint:DesiredInferenceUnits@ -
--     The number of inference units for an Amazon Comprehend document
--     classification endpoint.
--
-- -   @comprehend:entity-recognizer-endpoint:DesiredInferenceUnits@ - The
--     number of inference units for an Amazon Comprehend entity recognizer
--     endpoint.
--
-- -   @lambda:function:ProvisionedConcurrency@ - The provisioned
--     concurrency for a Lambda function.
--
-- -   @cassandra:table:ReadCapacityUnits@ - The provisioned read capacity
--     for an Amazon Keyspaces table.
--
-- -   @cassandra:table:WriteCapacityUnits@ - The provisioned write
--     capacity for an Amazon Keyspaces table.
--
-- -   @kafka:broker-storage:VolumeSize@ - The provisioned volume size (in
--     GiB) for brokers in an Amazon MSK cluster.
--
-- -   @elasticache:replication-group:NodeGroups@ - The number of node
--     groups for an Amazon ElastiCache replication group.
--
-- -   @elasticache:replication-group:Replicas@ - The number of replicas
--     per node group for an Amazon ElastiCache replication group.
--
-- -   @neptune:cluster:ReadReplicaCount@ - The count of read replicas in
--     an Amazon Neptune DB cluster.
describeScalingActivities_scalableDimension :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe ScalableDimension)
describeScalingActivities_scalableDimension :: (Maybe ScalableDimension -> f (Maybe ScalableDimension))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_scalableDimension = (DescribeScalingActivities -> Maybe ScalableDimension)
-> (DescribeScalingActivities
    -> Maybe ScalableDimension -> DescribeScalingActivities)
-> Lens
     DescribeScalingActivities
     DescribeScalingActivities
     (Maybe ScalableDimension)
     (Maybe ScalableDimension)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe ScalableDimension
scalableDimension :: Maybe ScalableDimension
$sel:scalableDimension:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe ScalableDimension
scalableDimension} -> Maybe ScalableDimension
scalableDimension) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe ScalableDimension
a -> DescribeScalingActivities
s {$sel:scalableDimension:DescribeScalingActivities' :: Maybe ScalableDimension
scalableDimension = Maybe ScalableDimension
a} :: DescribeScalingActivities)

-- | The identifier of the resource associated with the scaling activity.
-- This string consists of the resource type and unique identifier.
--
-- -   ECS service - The resource type is @service@ and the unique
--     identifier is the cluster name and service name. Example:
--     @service\/default\/sample-webapp@.
--
-- -   Spot Fleet - The resource type is @spot-fleet-request@ and the
--     unique identifier is the Spot Fleet request ID. Example:
--     @spot-fleet-request\/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@.
--
-- -   EMR cluster - The resource type is @instancegroup@ and the unique
--     identifier is the cluster ID and instance group ID. Example:
--     @instancegroup\/j-2EEZNYKUA1NTV\/ig-1791Y4E1L8YI0@.
--
-- -   AppStream 2.0 fleet - The resource type is @fleet@ and the unique
--     identifier is the fleet name. Example: @fleet\/sample-fleet@.
--
-- -   DynamoDB table - The resource type is @table@ and the unique
--     identifier is the table name. Example: @table\/my-table@.
--
-- -   DynamoDB global secondary index - The resource type is @index@ and
--     the unique identifier is the index name. Example:
--     @table\/my-table\/index\/my-table-index@.
--
-- -   Aurora DB cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:my-db-cluster@.
--
-- -   SageMaker endpoint variant - The resource type is @variant@ and the
--     unique identifier is the resource ID. Example:
--     @endpoint\/my-end-point\/variant\/KMeansClustering@.
--
-- -   Custom resources are not supported with a resource type. This
--     parameter must specify the @OutputValue@ from the CloudFormation
--     template stack used to access the resources. The unique identifier
--     is defined by the service provider. More information is available in
--     our
--     <https://github.com/aws/aws-auto-scaling-custom-resource GitHub repository>.
--
-- -   Amazon Comprehend document classification endpoint - The resource
--     type and unique identifier are specified using the endpoint ARN.
--     Example:
--     @arn:aws:comprehend:us-west-2:123456789012:document-classifier-endpoint\/EXAMPLE@.
--
-- -   Amazon Comprehend entity recognizer endpoint - The resource type and
--     unique identifier are specified using the endpoint ARN. Example:
--     @arn:aws:comprehend:us-west-2:123456789012:entity-recognizer-endpoint\/EXAMPLE@.
--
-- -   Lambda provisioned concurrency - The resource type is @function@ and
--     the unique identifier is the function name with a function version
--     or alias name suffix that is not @$LATEST@. Example:
--     @function:my-function:prod@ or @function:my-function:1@.
--
-- -   Amazon Keyspaces table - The resource type is @table@ and the unique
--     identifier is the table name. Example:
--     @keyspace\/mykeyspace\/table\/mytable@.
--
-- -   Amazon MSK cluster - The resource type and unique identifier are
--     specified using the cluster ARN. Example:
--     @arn:aws:kafka:us-east-1:123456789012:cluster\/demo-cluster-1\/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5@.
--
-- -   Amazon ElastiCache replication group - The resource type is
--     @replication-group@ and the unique identifier is the replication
--     group name. Example: @replication-group\/mycluster@.
--
-- -   Neptune cluster - The resource type is @cluster@ and the unique
--     identifier is the cluster name. Example: @cluster:mycluster@.
describeScalingActivities_resourceId :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Text)
describeScalingActivities_resourceId :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_resourceId = (DescribeScalingActivities -> Maybe Text)
-> (DescribeScalingActivities
    -> Maybe Text -> DescribeScalingActivities)
-> Lens
     DescribeScalingActivities
     DescribeScalingActivities
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe Text
a -> DescribeScalingActivities
s {$sel:resourceId:DescribeScalingActivities' :: Maybe Text
resourceId = Maybe Text
a} :: DescribeScalingActivities)

-- | The token for the next set of results.
describeScalingActivities_nextToken :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Text)
describeScalingActivities_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_nextToken = (DescribeScalingActivities -> Maybe Text)
-> (DescribeScalingActivities
    -> Maybe Text -> DescribeScalingActivities)
-> Lens
     DescribeScalingActivities
     DescribeScalingActivities
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe Text
a -> DescribeScalingActivities
s {$sel:nextToken:DescribeScalingActivities' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScalingActivities)

-- | The maximum number of scalable targets. This value can be between 1 and
-- 50. The default value is 50.
--
-- If this parameter is used, the operation returns up to @MaxResults@
-- results at a time, along with a @NextToken@ value. To get the next set
-- of results, include the @NextToken@ value in a subsequent call. If this
-- parameter is not used, the operation returns up to 50 results and a
-- @NextToken@ value, if applicable.
describeScalingActivities_maxResults :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Int)
describeScalingActivities_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_maxResults = (DescribeScalingActivities -> Maybe Int)
-> (DescribeScalingActivities
    -> Maybe Int -> DescribeScalingActivities)
-> Lens
     DescribeScalingActivities
     DescribeScalingActivities
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe Int
a -> DescribeScalingActivities
s {$sel:maxResults:DescribeScalingActivities' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeScalingActivities)

-- | 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.
describeScalingActivities_serviceNamespace :: Lens.Lens' DescribeScalingActivities ServiceNamespace
describeScalingActivities_serviceNamespace :: (ServiceNamespace -> f ServiceNamespace)
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_serviceNamespace = (DescribeScalingActivities -> ServiceNamespace)
-> (DescribeScalingActivities
    -> ServiceNamespace -> DescribeScalingActivities)
-> Lens
     DescribeScalingActivities
     DescribeScalingActivities
     ServiceNamespace
     ServiceNamespace
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {ServiceNamespace
serviceNamespace :: ServiceNamespace
$sel:serviceNamespace:DescribeScalingActivities' :: DescribeScalingActivities -> ServiceNamespace
serviceNamespace} -> ServiceNamespace
serviceNamespace) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} ServiceNamespace
a -> DescribeScalingActivities
s {$sel:serviceNamespace:DescribeScalingActivities' :: ServiceNamespace
serviceNamespace = ServiceNamespace
a} :: DescribeScalingActivities)

instance Core.AWSPager DescribeScalingActivities where
  page :: DescribeScalingActivities
-> AWSResponse DescribeScalingActivities
-> Maybe DescribeScalingActivities
page DescribeScalingActivities
rq AWSResponse DescribeScalingActivities
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeScalingActivities
DescribeScalingActivitiesResponse
rs
            DescribeScalingActivitiesResponse
-> Getting (First Text) DescribeScalingActivitiesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingActivitiesResponse
-> Const (First Text) DescribeScalingActivitiesResponse
Lens' DescribeScalingActivitiesResponse (Maybe Text)
describeScalingActivitiesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeScalingActivitiesResponse
 -> Const (First Text) DescribeScalingActivitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScalingActivitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeScalingActivities
forall a. Maybe a
Prelude.Nothing
    | Maybe [ScalingActivity] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeScalingActivities
DescribeScalingActivitiesResponse
rs
            DescribeScalingActivitiesResponse
-> Getting
     (First [ScalingActivity])
     DescribeScalingActivitiesResponse
     [ScalingActivity]
-> Maybe [ScalingActivity]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ScalingActivity]
 -> Const (First [ScalingActivity]) (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> Const
     (First [ScalingActivity]) DescribeScalingActivitiesResponse
Lens' DescribeScalingActivitiesResponse (Maybe [ScalingActivity])
describeScalingActivitiesResponse_scalingActivities
              ((Maybe [ScalingActivity]
  -> Const (First [ScalingActivity]) (Maybe [ScalingActivity]))
 -> DescribeScalingActivitiesResponse
 -> Const
      (First [ScalingActivity]) DescribeScalingActivitiesResponse)
-> (([ScalingActivity]
     -> Const (First [ScalingActivity]) [ScalingActivity])
    -> Maybe [ScalingActivity]
    -> Const (First [ScalingActivity]) (Maybe [ScalingActivity]))
-> Getting
     (First [ScalingActivity])
     DescribeScalingActivitiesResponse
     [ScalingActivity]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScalingActivity]
 -> Const (First [ScalingActivity]) [ScalingActivity])
-> Maybe [ScalingActivity]
-> Const (First [ScalingActivity]) (Maybe [ScalingActivity])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeScalingActivities
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeScalingActivities -> Maybe DescribeScalingActivities
forall a. a -> Maybe a
Prelude.Just (DescribeScalingActivities -> Maybe DescribeScalingActivities)
-> DescribeScalingActivities -> Maybe DescribeScalingActivities
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeScalingActivities
rq
          DescribeScalingActivities
-> (DescribeScalingActivities -> DescribeScalingActivities)
-> DescribeScalingActivities
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeScalingActivities -> Identity DescribeScalingActivities
Lens
  DescribeScalingActivities
  DescribeScalingActivities
  (Maybe Text)
  (Maybe Text)
describeScalingActivities_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeScalingActivities -> Identity DescribeScalingActivities)
-> Maybe Text
-> DescribeScalingActivities
-> DescribeScalingActivities
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeScalingActivities
DescribeScalingActivitiesResponse
rs
          DescribeScalingActivitiesResponse
-> Getting (First Text) DescribeScalingActivitiesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingActivitiesResponse
-> Const (First Text) DescribeScalingActivitiesResponse
Lens' DescribeScalingActivitiesResponse (Maybe Text)
describeScalingActivitiesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeScalingActivitiesResponse
 -> Const (First Text) DescribeScalingActivitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScalingActivitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeScalingActivities where
  type
    AWSResponse DescribeScalingActivities =
      DescribeScalingActivitiesResponse
  request :: DescribeScalingActivities -> Request DescribeScalingActivities
request = Service
-> DescribeScalingActivities -> Request DescribeScalingActivities
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeScalingActivities
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeScalingActivities)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeScalingActivities))
-> Logger
-> Service
-> Proxy DescribeScalingActivities
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeScalingActivities)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ScalingActivity]
-> Maybe Text -> Int -> DescribeScalingActivitiesResponse
DescribeScalingActivitiesResponse'
            (Maybe [ScalingActivity]
 -> Maybe Text -> Int -> DescribeScalingActivitiesResponse)
-> Either String (Maybe [ScalingActivity])
-> Either
     String (Maybe Text -> Int -> DescribeScalingActivitiesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ScalingActivity]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScalingActivities"
                            Either String (Maybe (Maybe [ScalingActivity]))
-> Maybe [ScalingActivity]
-> Either String (Maybe [ScalingActivity])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ScalingActivity]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> DescribeScalingActivitiesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeScalingActivitiesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> DescribeScalingActivitiesResponse)
-> Either String Int
-> Either String DescribeScalingActivitiesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeScalingActivities

instance Prelude.NFData DescribeScalingActivities

instance Core.ToHeaders DescribeScalingActivities where
  toHeaders :: DescribeScalingActivities -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeScalingActivities -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AnyScaleFrontendService.DescribeScalingActivities" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeScalingActivities where
  toJSON :: DescribeScalingActivities -> Value
toJSON DescribeScalingActivities' {Maybe Int
Maybe Text
Maybe ScalableDimension
ServiceNamespace
serviceNamespace :: ServiceNamespace
maxResults :: Maybe Int
nextToken :: Maybe Text
resourceId :: Maybe Text
scalableDimension :: Maybe ScalableDimension
$sel:serviceNamespace:DescribeScalingActivities' :: DescribeScalingActivities -> ServiceNamespace
$sel:maxResults:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Int
$sel:nextToken:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:resourceId:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:scalableDimension:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe ScalableDimension
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ScalableDimension" Text -> ScalableDimension -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ScalableDimension -> Pair)
-> Maybe ScalableDimension -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScalableDimension
scalableDimension,
            (Text
"ResourceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceId,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ServiceNamespace" Text -> ServiceNamespace -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ServiceNamespace
serviceNamespace)
          ]
      )

instance Core.ToPath DescribeScalingActivities where
  toPath :: DescribeScalingActivities -> ByteString
toPath = ByteString -> DescribeScalingActivities -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeScalingActivities where
  toQuery :: DescribeScalingActivities -> QueryString
toQuery = QueryString -> DescribeScalingActivities -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeScalingActivitiesResponse' smart constructor.
data DescribeScalingActivitiesResponse = DescribeScalingActivitiesResponse'
  { -- | A list of scaling activity objects.
    DescribeScalingActivitiesResponse -> Maybe [ScalingActivity]
scalingActivities :: Prelude.Maybe [ScalingActivity],
    -- | The token required to get the next set of results. This value is @null@
    -- if there are no more results to return.
    DescribeScalingActivitiesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeScalingActivitiesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
(DescribeScalingActivitiesResponse
 -> DescribeScalingActivitiesResponse -> Bool)
-> (DescribeScalingActivitiesResponse
    -> DescribeScalingActivitiesResponse -> Bool)
-> Eq DescribeScalingActivitiesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
$c/= :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
== :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
$c== :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeScalingActivitiesResponse]
ReadPrec DescribeScalingActivitiesResponse
Int -> ReadS DescribeScalingActivitiesResponse
ReadS [DescribeScalingActivitiesResponse]
(Int -> ReadS DescribeScalingActivitiesResponse)
-> ReadS [DescribeScalingActivitiesResponse]
-> ReadPrec DescribeScalingActivitiesResponse
-> ReadPrec [DescribeScalingActivitiesResponse]
-> Read DescribeScalingActivitiesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScalingActivitiesResponse]
$creadListPrec :: ReadPrec [DescribeScalingActivitiesResponse]
readPrec :: ReadPrec DescribeScalingActivitiesResponse
$creadPrec :: ReadPrec DescribeScalingActivitiesResponse
readList :: ReadS [DescribeScalingActivitiesResponse]
$creadList :: ReadS [DescribeScalingActivitiesResponse]
readsPrec :: Int -> ReadS DescribeScalingActivitiesResponse
$creadsPrec :: Int -> ReadS DescribeScalingActivitiesResponse
Prelude.Read, Int -> DescribeScalingActivitiesResponse -> ShowS
[DescribeScalingActivitiesResponse] -> ShowS
DescribeScalingActivitiesResponse -> String
(Int -> DescribeScalingActivitiesResponse -> ShowS)
-> (DescribeScalingActivitiesResponse -> String)
-> ([DescribeScalingActivitiesResponse] -> ShowS)
-> Show DescribeScalingActivitiesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScalingActivitiesResponse] -> ShowS
$cshowList :: [DescribeScalingActivitiesResponse] -> ShowS
show :: DescribeScalingActivitiesResponse -> String
$cshow :: DescribeScalingActivitiesResponse -> String
showsPrec :: Int -> DescribeScalingActivitiesResponse -> ShowS
$cshowsPrec :: Int -> DescribeScalingActivitiesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeScalingActivitiesResponse
 -> Rep DescribeScalingActivitiesResponse x)
-> (forall x.
    Rep DescribeScalingActivitiesResponse x
    -> DescribeScalingActivitiesResponse)
-> Generic DescribeScalingActivitiesResponse
forall x.
Rep DescribeScalingActivitiesResponse x
-> DescribeScalingActivitiesResponse
forall x.
DescribeScalingActivitiesResponse
-> Rep DescribeScalingActivitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScalingActivitiesResponse x
-> DescribeScalingActivitiesResponse
$cfrom :: forall x.
DescribeScalingActivitiesResponse
-> Rep DescribeScalingActivitiesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeScalingActivitiesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'scalingActivities', 'describeScalingActivitiesResponse_scalingActivities' - A list of scaling activity objects.
--
-- 'nextToken', 'describeScalingActivitiesResponse_nextToken' - The token required to get the next set of results. This value is @null@
-- if there are no more results to return.
--
-- 'httpStatus', 'describeScalingActivitiesResponse_httpStatus' - The response's http status code.
newDescribeScalingActivitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeScalingActivitiesResponse
newDescribeScalingActivitiesResponse :: Int -> DescribeScalingActivitiesResponse
newDescribeScalingActivitiesResponse Int
pHttpStatus_ =
  DescribeScalingActivitiesResponse' :: Maybe [ScalingActivity]
-> Maybe Text -> Int -> DescribeScalingActivitiesResponse
DescribeScalingActivitiesResponse'
    { $sel:scalingActivities:DescribeScalingActivitiesResponse' :: Maybe [ScalingActivity]
scalingActivities =
        Maybe [ScalingActivity]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeScalingActivitiesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeScalingActivitiesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of scaling activity objects.
describeScalingActivitiesResponse_scalingActivities :: Lens.Lens' DescribeScalingActivitiesResponse (Prelude.Maybe [ScalingActivity])
describeScalingActivitiesResponse_scalingActivities :: (Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
describeScalingActivitiesResponse_scalingActivities = (DescribeScalingActivitiesResponse -> Maybe [ScalingActivity])
-> (DescribeScalingActivitiesResponse
    -> Maybe [ScalingActivity] -> DescribeScalingActivitiesResponse)
-> Lens'
     DescribeScalingActivitiesResponse (Maybe [ScalingActivity])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivitiesResponse' {Maybe [ScalingActivity]
scalingActivities :: Maybe [ScalingActivity]
$sel:scalingActivities:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Maybe [ScalingActivity]
scalingActivities} -> Maybe [ScalingActivity]
scalingActivities) (\s :: DescribeScalingActivitiesResponse
s@DescribeScalingActivitiesResponse' {} Maybe [ScalingActivity]
a -> DescribeScalingActivitiesResponse
s {$sel:scalingActivities:DescribeScalingActivitiesResponse' :: Maybe [ScalingActivity]
scalingActivities = Maybe [ScalingActivity]
a} :: DescribeScalingActivitiesResponse) ((Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
 -> DescribeScalingActivitiesResponse
 -> f DescribeScalingActivitiesResponse)
-> ((Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
    -> Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> (Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ScalingActivity]
  [ScalingActivity]
  [ScalingActivity]
  [ScalingActivity]
-> Iso
     (Maybe [ScalingActivity])
     (Maybe [ScalingActivity])
     (Maybe [ScalingActivity])
     (Maybe [ScalingActivity])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [ScalingActivity]
  [ScalingActivity]
  [ScalingActivity]
  [ScalingActivity]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token required to get the next set of results. This value is @null@
-- if there are no more results to return.
describeScalingActivitiesResponse_nextToken :: Lens.Lens' DescribeScalingActivitiesResponse (Prelude.Maybe Prelude.Text)
describeScalingActivitiesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
describeScalingActivitiesResponse_nextToken = (DescribeScalingActivitiesResponse -> Maybe Text)
-> (DescribeScalingActivitiesResponse
    -> Maybe Text -> DescribeScalingActivitiesResponse)
-> Lens' DescribeScalingActivitiesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivitiesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScalingActivitiesResponse
s@DescribeScalingActivitiesResponse' {} Maybe Text
a -> DescribeScalingActivitiesResponse
s {$sel:nextToken:DescribeScalingActivitiesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScalingActivitiesResponse)

-- | The response's http status code.
describeScalingActivitiesResponse_httpStatus :: Lens.Lens' DescribeScalingActivitiesResponse Prelude.Int
describeScalingActivitiesResponse_httpStatus :: (Int -> f Int)
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
describeScalingActivitiesResponse_httpStatus = (DescribeScalingActivitiesResponse -> Int)
-> (DescribeScalingActivitiesResponse
    -> Int -> DescribeScalingActivitiesResponse)
-> Lens
     DescribeScalingActivitiesResponse
     DescribeScalingActivitiesResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivitiesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeScalingActivitiesResponse
s@DescribeScalingActivitiesResponse' {} Int
a -> DescribeScalingActivitiesResponse
s {$sel:httpStatus:DescribeScalingActivitiesResponse' :: Int
httpStatus = Int
a} :: DescribeScalingActivitiesResponse)

instance
  Prelude.NFData
    DescribeScalingActivitiesResponse