#[non_exhaustive]pub struct ScalingActivity {
pub activity_id: String,
pub service_namespace: ServiceNamespace,
pub resource_id: String,
pub scalable_dimension: ScalableDimension,
pub description: String,
pub cause: String,
pub start_time: DateTime,
pub end_time: Option<DateTime>,
pub status_code: ScalingActivityStatusCode,
pub status_message: Option<String>,
pub details: Option<String>,
pub not_scaled_reasons: Option<Vec<NotScaledReason>>,
}Expand description
Represents a scaling activity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.activity_id: StringThe unique identifier of the scaling activity.
service_namespace: ServiceNamespaceThe namespace of the Amazon Web Services service that provides the resource, or a custom-resource.
resource_id: StringThe 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
serviceand the unique identifier is the cluster name and service name. Example:service/my-cluster/my-service. -
Spot Fleet - The resource type is
spot-fleet-requestand 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
instancegroupand 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
fleetand the unique identifier is the fleet name. Example:fleet/sample-fleet. -
DynamoDB table - The resource type is
tableand the unique identifier is the table name. Example:table/my-table. -
DynamoDB global secondary index - The resource type is
indexand the unique identifier is the index name. Example:table/my-table/index/my-table-index. -
Aurora DB cluster - The resource type is
clusterand the unique identifier is the cluster name. Example:cluster:my-db-cluster. -
SageMaker endpoint variant - The resource type is
variantand 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
OutputValuefrom the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our 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
functionand the unique identifier is the function name with a function version or alias name suffix that is not$LATEST. Example:function:my-function:prodorfunction:my-function:1. -
Amazon Keyspaces table - The resource type is
tableand 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-groupand the unique identifier is the replication group name. Example:replication-group/mycluster. -
Amazon ElastiCache cache cluster - The resource type is
cache-clusterand the unique identifier is the cache cluster name. Example:cache-cluster/mycluster. -
Neptune cluster - The resource type is
clusterand the unique identifier is the cluster name. Example:cluster:mycluster. -
SageMaker serverless endpoint - The resource type is
variantand the unique identifier is the resource ID. Example:endpoint/my-end-point/variant/KMeansClustering. -
SageMaker inference component - The resource type is
inference-componentand the unique identifier is the resource ID. Example:inference-component/my-inference-component. -
Pool of WorkSpaces - The resource type is
workspacespooland the unique identifier is the pool ID. Example:workspacespool/wspool-123456.
scalable_dimension: ScalableDimensionThe scalable dimension. This string consists of the service namespace, resource type, and scaling property.
-
ecs:service:DesiredCount- The 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 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:cache-cluster:Nodes- The number of nodes for an Amazon ElastiCache cache 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. -
sagemaker:variant:DesiredProvisionedConcurrency- The provisioned concurrency for a SageMaker serverless endpoint. -
sagemaker:inference-component:DesiredCopyCount- The number of copies across an endpoint for a SageMaker inference component. -
workspaces:workspacespool:DesiredUserSessions- The number of user sessions for the WorkSpaces in the pool.
description: StringA simple description of what action the scaling activity intends to accomplish.
cause: StringA simple description of what caused the scaling activity to happen.
start_time: DateTimeThe Unix timestamp for when the scaling activity began.
end_time: Option<DateTime>The Unix timestamp for when the scaling activity ended.
status_code: ScalingActivityStatusCodeIndicates the status of the scaling activity.
status_message: Option<String>A simple message about the current status of the scaling activity.
details: Option<String>The details about the scaling activity.
not_scaled_reasons: Option<Vec<NotScaledReason>>Machine-readable data that describes the reason for a not scaled activity. Only available when DescribeScalingActivities includes not scaled activities.
Implementations§
Source§impl ScalingActivity
impl ScalingActivity
Sourcepub fn activity_id(&self) -> &str
pub fn activity_id(&self) -> &str
The unique identifier of the scaling activity.
Sourcepub fn service_namespace(&self) -> &ServiceNamespace
pub fn service_namespace(&self) -> &ServiceNamespace
The namespace of the Amazon Web Services service that provides the resource, or a custom-resource.
Sourcepub fn resource_id(&self) -> &str
pub fn resource_id(&self) -> &str
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
serviceand the unique identifier is the cluster name and service name. Example:service/my-cluster/my-service. -
Spot Fleet - The resource type is
spot-fleet-requestand 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
instancegroupand 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
fleetand the unique identifier is the fleet name. Example:fleet/sample-fleet. -
DynamoDB table - The resource type is
tableand the unique identifier is the table name. Example:table/my-table. -
DynamoDB global secondary index - The resource type is
indexand the unique identifier is the index name. Example:table/my-table/index/my-table-index. -
Aurora DB cluster - The resource type is
clusterand the unique identifier is the cluster name. Example:cluster:my-db-cluster. -
SageMaker endpoint variant - The resource type is
variantand 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
OutputValuefrom the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our 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
functionand the unique identifier is the function name with a function version or alias name suffix that is not$LATEST. Example:function:my-function:prodorfunction:my-function:1. -
Amazon Keyspaces table - The resource type is
tableand 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-groupand the unique identifier is the replication group name. Example:replication-group/mycluster. -
Amazon ElastiCache cache cluster - The resource type is
cache-clusterand the unique identifier is the cache cluster name. Example:cache-cluster/mycluster. -
Neptune cluster - The resource type is
clusterand the unique identifier is the cluster name. Example:cluster:mycluster. -
SageMaker serverless endpoint - The resource type is
variantand the unique identifier is the resource ID. Example:endpoint/my-end-point/variant/KMeansClustering. -
SageMaker inference component - The resource type is
inference-componentand the unique identifier is the resource ID. Example:inference-component/my-inference-component. -
Pool of WorkSpaces - The resource type is
workspacespooland the unique identifier is the pool ID. Example:workspacespool/wspool-123456.
Sourcepub fn scalable_dimension(&self) -> &ScalableDimension
pub fn scalable_dimension(&self) -> &ScalableDimension
The scalable dimension. This string consists of the service namespace, resource type, and scaling property.
-
ecs:service:DesiredCount- The 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 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:cache-cluster:Nodes- The number of nodes for an Amazon ElastiCache cache 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. -
sagemaker:variant:DesiredProvisionedConcurrency- The provisioned concurrency for a SageMaker serverless endpoint. -
sagemaker:inference-component:DesiredCopyCount- The number of copies across an endpoint for a SageMaker inference component. -
workspaces:workspacespool:DesiredUserSessions- The number of user sessions for the WorkSpaces in the pool.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
A simple description of what action the scaling activity intends to accomplish.
Sourcepub fn cause(&self) -> &str
pub fn cause(&self) -> &str
A simple description of what caused the scaling activity to happen.
Sourcepub fn start_time(&self) -> &DateTime
pub fn start_time(&self) -> &DateTime
The Unix timestamp for when the scaling activity began.
Sourcepub fn end_time(&self) -> Option<&DateTime>
pub fn end_time(&self) -> Option<&DateTime>
The Unix timestamp for when the scaling activity ended.
Sourcepub fn status_code(&self) -> &ScalingActivityStatusCode
pub fn status_code(&self) -> &ScalingActivityStatusCode
Indicates the status of the scaling activity.
Sourcepub fn status_message(&self) -> Option<&str>
pub fn status_message(&self) -> Option<&str>
A simple message about the current status of the scaling activity.
Sourcepub fn not_scaled_reasons(&self) -> &[NotScaledReason]
pub fn not_scaled_reasons(&self) -> &[NotScaledReason]
Machine-readable data that describes the reason for a not scaled activity. Only available when DescribeScalingActivities includes not scaled activities.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .not_scaled_reasons.is_none().
Source§impl ScalingActivity
impl ScalingActivity
Sourcepub fn builder() -> ScalingActivityBuilder
pub fn builder() -> ScalingActivityBuilder
Creates a new builder-style object to manufacture ScalingActivity.
Trait Implementations§
Source§impl Clone for ScalingActivity
impl Clone for ScalingActivity
Source§fn clone(&self) -> ScalingActivity
fn clone(&self) -> ScalingActivity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScalingActivity
impl Debug for ScalingActivity
Source§impl PartialEq for ScalingActivity
impl PartialEq for ScalingActivity
impl StructuralPartialEq for ScalingActivity
Auto Trait Implementations§
impl Freeze for ScalingActivity
impl RefUnwindSafe for ScalingActivity
impl Send for ScalingActivity
impl Sync for ScalingActivity
impl Unpin for ScalingActivity
impl UnwindSafe for ScalingActivity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);