Class CfnScalableTarget
A CloudFormation AWS::ApplicationAutoScaling::ScalableTarget
.
Inherited Members
Namespace: Amazon.CDK.AWS.ApplicationAutoScaling
Assembly: Amazon.CDK.AWS.ApplicationAutoScaling.dll
Syntax (csharp)
public class CfnScalableTarget : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnScalableTarget
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::ApplicationAutoScaling::ScalableTarget
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ApplicationAutoScaling;
var cfnScalableTarget = new CfnScalableTarget(this, "MyCfnScalableTarget", new CfnScalableTargetProps {
MaxCapacity = 123,
MinCapacity = 123,
ResourceId = "resourceId",
RoleArn = "roleArn",
ScalableDimension = "scalableDimension",
ServiceNamespace = "serviceNamespace",
// the properties below are optional
ScheduledActions = new [] { new ScheduledActionProperty {
Schedule = "schedule",
ScheduledActionName = "scheduledActionName",
// the properties below are optional
EndTime = new Date(),
ScalableTargetAction = new ScalableTargetActionProperty {
MaxCapacity = 123,
MinCapacity = 123
},
StartTime = new Date(),
Timezone = "timezone"
} },
SuspendedState = new SuspendedStateProperty {
DynamicScalingInSuspended = false,
DynamicScalingOutSuspended = false,
ScheduledScalingSuspended = false
}
});
Synopsis
Constructors
CfnScalableTarget(Construct, String, ICfnScalableTargetProps) | Create a new |
CfnScalableTarget(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnScalableTarget(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
MaxCapacity | The maximum value that you plan to scale out to. |
MinCapacity | The minimum value that you plan to scale in to. |
ResourceId | The identifier of the resource associated with the scalable target. |
RoleArn | 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. |
ScalableDimension | The scalable dimension associated with the scalable target. |
ScheduledActions | The scheduled actions for the scalable target. |
ServiceNamespace | The namespace of the AWS service that provides the resource, or a |
SuspendedState | An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnScalableTarget(Construct, String, ICfnScalableTargetProps)
Create a new AWS::ApplicationAutoScaling::ScalableTarget
.
public CfnScalableTarget(Construct scope, string id, ICfnScalableTargetProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnScalableTargetProps
- resource properties.
CfnScalableTarget(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnScalableTarget(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnScalableTarget(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnScalableTarget(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
MaxCapacity
The maximum value that you plan to scale out to.
public virtual double MaxCapacity { get; set; }
Property Value
System.Double
Remarks
When a scaling policy is in effect, Application Auto Scaling can scale out (expand) as needed to the maximum capacity limit in response to changing demand.
MinCapacity
The minimum value that you plan to scale in to.
public virtual double MinCapacity { get; set; }
Property Value
System.Double
Remarks
When a scaling policy is in effect, Application Auto Scaling can scale in (contract) as needed to the minimum capacity limit in response to changing demand.
ResourceId
The identifier of the resource associated with the scalable target.
public virtual string ResourceId { get; set; }
Property Value
System.String
Remarks
This string consists of the resource type and unique identifier.
RoleArn
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.
public virtual string RoleArn { get; set; }
Property Value
System.String
Remarks
This can be either an IAM service role that Application Auto Scaling can assume to make calls to other AWS resources on your behalf, or a service-linked role for the specified service. For more information, see How Application Auto Scaling works with IAM in the Application Auto Scaling User Guide .
To automatically create a service-linked role (recommended), specify the full ARN of the service-linked role in your stack template. To find the exact ARN of the service-linked role for your AWS or custom resource, see the Service-linked roles topic in the Application Auto Scaling User Guide . Look for the ARN in the table at the bottom of the page.
ScalableDimension
The scalable dimension associated with the scalable target.
public virtual string ScalableDimension { get; set; }
Property Value
System.String
Remarks
This string consists of the service namespace, resource type, and scaling property.
ScheduledActions
The scheduled actions for the scalable target.
public virtual object ScheduledActions { get; set; }
Property Value
System.Object
Remarks
ServiceNamespace
The namespace of the AWS service that provides the resource, or a custom-resource
.
public virtual string ServiceNamespace { get; set; }
Property Value
System.String
Remarks
SuspendedState
An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling.
public virtual object SuspendedState { get; set; }
Property Value
System.Object
Remarks
Setting the value of an attribute to true
suspends the specified scaling activities. Setting it to false
(default) resumes the specified scaling activities.
Suspension Outcomes
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>