{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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@.
--
-- For information about viewing scaling activities using the Amazon Web
-- Services CLI, see
-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scaling-activities.html Scaling activities for Application Auto Scaling>.
--
-- This operation returns paginated results.
module Amazonka.ApplicationAutoScaling.DescribeScalingActivities
  ( -- * Creating a Request
    DescribeScalingActivities (..),
    newDescribeScalingActivities,

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

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

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

import Amazonka.ApplicationAutoScaling.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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'
  { -- | Specifies whether to include activities that aren\'t scaled (/not scaled
    -- activities/) in the response. Not scaled activities are activities that
    -- aren\'t completed or started for various reasons, such as preventing
    -- infinite scaling loops. For help interpreting the not scaled reason
    -- details in the response, see
    -- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scaling-activities.html Scaling activities for Application Auto Scaling>.
    DescribeScalingActivities -> Maybe Bool
includeNotScaledActivities :: Prelude.Maybe Prelude.Bool,
    -- | 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 token for the next set of results.
    DescribeScalingActivities -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | 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 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 a 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 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
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]
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
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.
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:
--
-- 'includeNotScaledActivities', 'describeScalingActivities_includeNotScaledActivities' - Specifies whether to include activities that aren\'t scaled (/not scaled
-- activities/) in the response. Not scaled activities are activities that
-- aren\'t completed or started for various reasons, such as preventing
-- infinite scaling loops. For help interpreting the not scaled reason
-- details in the response, see
-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scaling-activities.html Scaling activities for Application Auto Scaling>.
--
-- '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.
--
-- 'nextToken', 'describeScalingActivities_nextToken' - The token for the next set of results.
--
-- '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@.
--
-- '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 a 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.
--
-- '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'
    { $sel:includeNotScaledActivities:DescribeScalingActivities' :: Maybe Bool
includeNotScaledActivities =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeScalingActivities' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeScalingActivities' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceId:DescribeScalingActivities' :: Maybe Text
resourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:scalableDimension:DescribeScalingActivities' :: Maybe ScalableDimension
scalableDimension = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceNamespace:DescribeScalingActivities' :: ServiceNamespace
serviceNamespace = ServiceNamespace
pServiceNamespace_
    }

-- | Specifies whether to include activities that aren\'t scaled (/not scaled
-- activities/) in the response. Not scaled activities are activities that
-- aren\'t completed or started for various reasons, such as preventing
-- infinite scaling loops. For help interpreting the not scaled reason
-- details in the response, see
-- <https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scaling-activities.html Scaling activities for Application Auto Scaling>.
describeScalingActivities_includeNotScaledActivities :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Bool)
describeScalingActivities_includeNotScaledActivities :: Lens' DescribeScalingActivities (Maybe Bool)
describeScalingActivities_includeNotScaledActivities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe Bool
includeNotScaledActivities :: Maybe Bool
$sel:includeNotScaledActivities:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Bool
includeNotScaledActivities} -> Maybe Bool
includeNotScaledActivities) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe Bool
a -> DescribeScalingActivities
s {$sel:includeNotScaledActivities:DescribeScalingActivities' :: Maybe Bool
includeNotScaledActivities = Maybe Bool
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 :: Lens' DescribeScalingActivities (Maybe Int)
describeScalingActivities_maxResults = 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 token for the next set of results.
describeScalingActivities_nextToken :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Text)
describeScalingActivities_nextToken :: Lens' DescribeScalingActivities (Maybe Text)
describeScalingActivities_nextToken = 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 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 :: Lens' DescribeScalingActivities (Maybe Text)
describeScalingActivities_resourceId = 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 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 a 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 :: Lens' DescribeScalingActivities (Maybe ScalableDimension)
describeScalingActivities_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 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 :: Lens' DescribeScalingActivities ServiceNamespace
describeScalingActivities_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
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeScalingActivities
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeScalingActivitiesResponse (Maybe Text)
describeScalingActivitiesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeScalingActivities
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeScalingActivitiesResponse (Maybe [ScalingActivity])
describeScalingActivitiesResponse_scalingActivities
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeScalingActivities
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeScalingActivities (Maybe Text)
describeScalingActivities_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeScalingActivities
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeScalingActivitiesResponse (Maybe Text)
describeScalingActivitiesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable DescribeScalingActivities where
  hashWithSalt :: Int -> DescribeScalingActivities -> Int
hashWithSalt Int
_salt DescribeScalingActivities' {Maybe Bool
Maybe Int
Maybe Text
Maybe ScalableDimension
ServiceNamespace
serviceNamespace :: ServiceNamespace
scalableDimension :: Maybe ScalableDimension
resourceId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
includeNotScaledActivities :: Maybe Bool
$sel:serviceNamespace:DescribeScalingActivities' :: DescribeScalingActivities -> ServiceNamespace
$sel:scalableDimension:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe ScalableDimension
$sel:resourceId:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:nextToken:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:maxResults:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Int
$sel:includeNotScaledActivities:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeNotScaledActivities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScalableDimension
scalableDimension
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ServiceNamespace
serviceNamespace

instance Prelude.NFData DescribeScalingActivities where
  rnf :: DescribeScalingActivities -> ()
rnf DescribeScalingActivities' {Maybe Bool
Maybe Int
Maybe Text
Maybe ScalableDimension
ServiceNamespace
serviceNamespace :: ServiceNamespace
scalableDimension :: Maybe ScalableDimension
resourceId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
includeNotScaledActivities :: Maybe Bool
$sel:serviceNamespace:DescribeScalingActivities' :: DescribeScalingActivities -> ServiceNamespace
$sel:scalableDimension:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe ScalableDimension
$sel:resourceId:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:nextToken:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:maxResults:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Int
$sel:includeNotScaledActivities:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeNotScaledActivities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScalableDimension
scalableDimension
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ServiceNamespace
serviceNamespace

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

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

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

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

-- | /See:/ 'newDescribeScalingActivitiesResponse' smart constructor.
data DescribeScalingActivitiesResponse = DescribeScalingActivitiesResponse'
  { -- | 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,
    -- | A list of scaling activity objects.
    DescribeScalingActivitiesResponse -> Maybe [ScalingActivity]
scalingActivities :: Prelude.Maybe [ScalingActivity],
    -- | The response's http status code.
    DescribeScalingActivitiesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
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]
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
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.
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:
--
-- '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.
--
-- 'scalingActivities', 'describeScalingActivitiesResponse_scalingActivities' - A list of scaling activity objects.
--
-- 'httpStatus', 'describeScalingActivitiesResponse_httpStatus' - The response's http status code.
newDescribeScalingActivitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeScalingActivitiesResponse
newDescribeScalingActivitiesResponse :: Int -> DescribeScalingActivitiesResponse
newDescribeScalingActivitiesResponse Int
pHttpStatus_ =
  DescribeScalingActivitiesResponse'
    { $sel:nextToken:DescribeScalingActivitiesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:scalingActivities:DescribeScalingActivitiesResponse' :: Maybe [ScalingActivity]
scalingActivities = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeScalingActivitiesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: Lens' DescribeScalingActivitiesResponse (Maybe Text)
describeScalingActivitiesResponse_nextToken = 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)

-- | A list of scaling activity objects.
describeScalingActivitiesResponse_scalingActivities :: Lens.Lens' DescribeScalingActivitiesResponse (Prelude.Maybe [ScalingActivity])
describeScalingActivitiesResponse_scalingActivities :: Lens' DescribeScalingActivitiesResponse (Maybe [ScalingActivity])
describeScalingActivitiesResponse_scalingActivities = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeScalingActivitiesResponse_httpStatus :: Lens.Lens' DescribeScalingActivitiesResponse Prelude.Int
describeScalingActivitiesResponse_httpStatus :: Lens' DescribeScalingActivitiesResponse Int
describeScalingActivitiesResponse_httpStatus = 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
  where
  rnf :: DescribeScalingActivitiesResponse -> ()
rnf DescribeScalingActivitiesResponse' {Int
Maybe [ScalingActivity]
Maybe Text
httpStatus :: Int
scalingActivities :: Maybe [ScalingActivity]
nextToken :: Maybe Text
$sel:httpStatus:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Int
$sel:scalingActivities:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Maybe [ScalingActivity]
$sel:nextToken:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ScalingActivity]
scalingActivities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus