Class CfnScalableTarget
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.applicationautoscaling.CfnScalableTarget
- All Implemented Interfaces:
IInspectable,IScalableTargetRef,IEnvironmentAware,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:04.647Z")
@Stability(Stable)
public class CfnScalableTarget
extends CfnResource
implements IInspectable, IScalableTargetRef
The
AWS::ApplicationAutoScaling::ScalableTarget resource specifies a resource that Application Auto Scaling can scale, such as an AWS::DynamoDB::Table or AWS::ECS::Service resource.
For more information, see Getting started in the Application Auto Scaling User Guide .
If the resource that you want Application Auto Scaling to scale is not yet created in your account, add a dependency on the resource when registering it as a scalable target using the DependsOn attribute.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.applicationautoscaling.*;
CfnScalableTarget cfnScalableTarget = CfnScalableTarget.Builder.create(this, "MyCfnScalableTarget")
.maxCapacity(123)
.minCapacity(123)
.resourceId("resourceId")
.scalableDimension("scalableDimension")
.serviceNamespace("serviceNamespace")
// the properties below are optional
.roleArn("roleArn")
.scheduledActions(List.of(ScheduledActionProperty.builder()
.schedule("schedule")
.scheduledActionName("scheduledActionName")
// the properties below are optional
.endTime(new Date())
.scalableTargetAction(ScalableTargetActionProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.build())
.startTime(new Date())
.timezone("timezone")
.build()))
.suspendedState(SuspendedStateProperty.builder()
.dynamicScalingInSuspended(false)
.dynamicScalingOutSuspended(false)
.scheduledScalingSuspended(false)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnScalableTarget.static interfaceScalableTargetActionspecifies the minimum and maximum capacity for theScalableTargetActionproperty of the AWS::ApplicationAutoScaling::ScalableTarget ScheduledAction property type.static interfaceScheduledActionis a property of the AWS::ApplicationAutoScaling::ScalableTarget resource that specifies a scheduled action for a scalable target.static interfaceSuspendedStateis a property of the AWS::ApplicationAutoScaling::ScalableTarget resource that specifies whether the scaling activities for a scalable target are in a suspended state.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.applicationautoscaling.IScalableTargetRef
IScalableTargetRef.Jsii$Default, IScalableTargetRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnScalableTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnScalableTarget(software.amazon.jsii.JsiiObjectRef objRef) CfnScalableTarget(software.constructs.Construct scope, String id, CfnScalableTargetProps props) Create a newAWS::ApplicationAutoScaling::ScalableTarget. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForScalableTarget(IScalableTargetRef resource) The maximum value that you plan to scale out to.The minimum value that you plan to scale in to.The identifier of the resource associated with the scalable target.Specify the Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that allows Application Auto Scaling to modify the scalable target on your behalf.The scalable dimension associated with the scalable target.A reference to a ScalableTarget resource.The scheduled actions for the scalable target.The namespace of the AWS service that provides the resource, or acustom-resource.An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnScalableTarget.renderProperties(Map<String, Object> props) voidsetMaxCapacity(Number value) The maximum value that you plan to scale out to.voidsetMinCapacity(Number value) The minimum value that you plan to scale in to.voidsetResourceId(String value) The identifier of the resource associated with the scalable target.voidsetRoleArn(String value) Specify the Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that allows Application Auto Scaling to modify the scalable target on your behalf.voidsetScalableDimension(String value) The scalable dimension associated with the scalable target.voidsetScheduledActions(List<Object> value) The scheduled actions for the scalable target.voidsetScheduledActions(IResolvable value) The scheduled actions for the scalable target.voidsetServiceNamespace(String value) The namespace of the AWS service that provides the resource, or acustom-resource.voidsetSuspendedState(IResolvable value) An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling.voidAn embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnScalableTarget
protected CfnScalableTarget(software.amazon.jsii.JsiiObjectRef objRef) -
CfnScalableTarget
protected CfnScalableTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnScalableTarget
@Stability(Stable) public CfnScalableTarget(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnScalableTargetProps props) Create a newAWS::ApplicationAutoScaling::ScalableTarget.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForScalableTarget
@Stability(Stable) @NotNull public static String arnForScalableTarget(@NotNull IScalableTargetRef resource) - Parameters:
resource- This parameter is required.
-
isCfnScalableTarget
Checks whether the given object is a CfnScalableTarget.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getScalableTargetRef
A reference to a ScalableTarget resource.- Specified by:
getScalableTargetRefin interfaceIScalableTargetRef
-
getMaxCapacity
The maximum value that you plan to scale out to. -
setMaxCapacity
The maximum value that you plan to scale out to. -
getMinCapacity
The minimum value that you plan to scale in to. -
setMinCapacity
The minimum value that you plan to scale in to. -
getResourceId
The identifier of the resource associated with the scalable target. -
setResourceId
The identifier of the resource associated with the scalable target. -
getScalableDimension
The scalable dimension associated with the scalable target. -
setScalableDimension
The scalable dimension associated with the scalable target. -
getServiceNamespace
The namespace of the AWS service that provides the resource, or acustom-resource. -
setServiceNamespace
The namespace of the AWS service that provides the resource, or acustom-resource. -
getRoleArn
Specify the Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that allows Application Auto Scaling to modify the scalable target on your behalf. -
setRoleArn
Specify the Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that allows Application Auto Scaling to modify the scalable target on your behalf. -
getScheduledActions
The scheduled actions for the scalable target.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnScalableTarget.ScheduledActionProperty> -
setScheduledActions
The scheduled actions for the scalable target. -
setScheduledActions
The scheduled actions for the scalable target. -
getSuspendedState
An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling.Returns union: either
IResolvableorCfnScalableTarget.SuspendedStateProperty -
setSuspendedState
An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling. -
setSuspendedState
@Stability(Stable) public void setSuspendedState(@Nullable CfnScalableTarget.SuspendedStateProperty value) An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling.
-