aws.appautoscaling.Target
Explore with Pulumi AI
Provides an Application AutoScaling ScalableTarget resource. To manage policies which get attached to the target, see the aws.appautoscaling.Policy
resource.
NOTE: Scalable targets created before 2023-03-20 may not have an assigned
arn
. These resource cannot usetags
or participate indefault_tags
. To preventpulumi preview
showing differences that can never be reconciled, use thelifecycle.ignore_changes
meta-argument. See the example below.
NOTE: The Application Auto Scaling service automatically attempts to manage IAM Service-Linked Roles when registering certain service namespaces for the first time. To manually manage this role, see the
aws.iam.ServiceLinkedRole
resource.
Example Usage
DynamoDB Table Autoscaling
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const dynamodbTableReadTarget = new aws.appautoscaling.Target("dynamodb_table_read_target", {
maxCapacity: 100,
minCapacity: 5,
resourceId: `table/${example.name}`,
scalableDimension: "dynamodb:table:ReadCapacityUnits",
serviceNamespace: "dynamodb",
});
import pulumi
import pulumi_aws as aws
dynamodb_table_read_target = aws.appautoscaling.Target("dynamodb_table_read_target",
max_capacity=100,
min_capacity=5,
resource_id=f"table/{example['name']}",
scalable_dimension="dynamodb:table:ReadCapacityUnits",
service_namespace="dynamodb")
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appautoscaling.NewTarget(ctx, "dynamodb_table_read_target", &appautoscaling.TargetArgs{
MaxCapacity: pulumi.Int(100),
MinCapacity: pulumi.Int(5),
ResourceId: pulumi.Sprintf("table/%v", example.Name),
ScalableDimension: pulumi.String("dynamodb:table:ReadCapacityUnits"),
ServiceNamespace: pulumi.String("dynamodb"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var dynamodbTableReadTarget = new Aws.AppAutoScaling.Target("dynamodb_table_read_target", new()
{
MaxCapacity = 100,
MinCapacity = 5,
ResourceId = $"table/{example.Name}",
ScalableDimension = "dynamodb:table:ReadCapacityUnits",
ServiceNamespace = "dynamodb",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dynamodbTableReadTarget = new Target("dynamodbTableReadTarget", TargetArgs.builder()
.maxCapacity(100)
.minCapacity(5)
.resourceId(String.format("table/%s", example.name()))
.scalableDimension("dynamodb:table:ReadCapacityUnits")
.serviceNamespace("dynamodb")
.build());
}
}
resources:
dynamodbTableReadTarget:
type: aws:appautoscaling:Target
name: dynamodb_table_read_target
properties:
maxCapacity: 100
minCapacity: 5
resourceId: table/${example.name}
scalableDimension: dynamodb:table:ReadCapacityUnits
serviceNamespace: dynamodb
DynamoDB Index Autoscaling
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const dynamodbIndexReadTarget = new aws.appautoscaling.Target("dynamodb_index_read_target", {
maxCapacity: 100,
minCapacity: 5,
resourceId: `table/${example.name}/index/${indexName}`,
scalableDimension: "dynamodb:index:ReadCapacityUnits",
serviceNamespace: "dynamodb",
});
import pulumi
import pulumi_aws as aws
dynamodb_index_read_target = aws.appautoscaling.Target("dynamodb_index_read_target",
max_capacity=100,
min_capacity=5,
resource_id=f"table/{example['name']}/index/{index_name}",
scalable_dimension="dynamodb:index:ReadCapacityUnits",
service_namespace="dynamodb")
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appautoscaling.NewTarget(ctx, "dynamodb_index_read_target", &appautoscaling.TargetArgs{
MaxCapacity: pulumi.Int(100),
MinCapacity: pulumi.Int(5),
ResourceId: pulumi.Sprintf("table/%v/index/%v", example.Name, indexName),
ScalableDimension: pulumi.String("dynamodb:index:ReadCapacityUnits"),
ServiceNamespace: pulumi.String("dynamodb"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var dynamodbIndexReadTarget = new Aws.AppAutoScaling.Target("dynamodb_index_read_target", new()
{
MaxCapacity = 100,
MinCapacity = 5,
ResourceId = $"table/{example.Name}/index/{indexName}",
ScalableDimension = "dynamodb:index:ReadCapacityUnits",
ServiceNamespace = "dynamodb",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dynamodbIndexReadTarget = new Target("dynamodbIndexReadTarget", TargetArgs.builder()
.maxCapacity(100)
.minCapacity(5)
.resourceId(String.format("table/%s/index/%s", example.name(),indexName))
.scalableDimension("dynamodb:index:ReadCapacityUnits")
.serviceNamespace("dynamodb")
.build());
}
}
resources:
dynamodbIndexReadTarget:
type: aws:appautoscaling:Target
name: dynamodb_index_read_target
properties:
maxCapacity: 100
minCapacity: 5
resourceId: table/${example.name}/index/${indexName}
scalableDimension: dynamodb:index:ReadCapacityUnits
serviceNamespace: dynamodb
ECS Service Autoscaling
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ecsTarget = new aws.appautoscaling.Target("ecs_target", {
maxCapacity: 4,
minCapacity: 1,
resourceId: `service/${example.name}/${exampleAwsEcsService.name}`,
scalableDimension: "ecs:service:DesiredCount",
serviceNamespace: "ecs",
});
import pulumi
import pulumi_aws as aws
ecs_target = aws.appautoscaling.Target("ecs_target",
max_capacity=4,
min_capacity=1,
resource_id=f"service/{example['name']}/{example_aws_ecs_service['name']}",
scalable_dimension="ecs:service:DesiredCount",
service_namespace="ecs")
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appautoscaling.NewTarget(ctx, "ecs_target", &appautoscaling.TargetArgs{
MaxCapacity: pulumi.Int(4),
MinCapacity: pulumi.Int(1),
ResourceId: pulumi.Sprintf("service/%v/%v", example.Name, exampleAwsEcsService.Name),
ScalableDimension: pulumi.String("ecs:service:DesiredCount"),
ServiceNamespace: pulumi.String("ecs"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var ecsTarget = new Aws.AppAutoScaling.Target("ecs_target", new()
{
MaxCapacity = 4,
MinCapacity = 1,
ResourceId = $"service/{example.Name}/{exampleAwsEcsService.Name}",
ScalableDimension = "ecs:service:DesiredCount",
ServiceNamespace = "ecs",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ecsTarget = new Target("ecsTarget", TargetArgs.builder()
.maxCapacity(4)
.minCapacity(1)
.resourceId(String.format("service/%s/%s", example.name(),exampleAwsEcsService.name()))
.scalableDimension("ecs:service:DesiredCount")
.serviceNamespace("ecs")
.build());
}
}
resources:
ecsTarget:
type: aws:appautoscaling:Target
name: ecs_target
properties:
maxCapacity: 4
minCapacity: 1
resourceId: service/${example.name}/${exampleAwsEcsService.name}
scalableDimension: ecs:service:DesiredCount
serviceNamespace: ecs
Aurora Read Replica Autoscaling
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const replicas = new aws.appautoscaling.Target("replicas", {
serviceNamespace: "rds",
scalableDimension: "rds:cluster:ReadReplicaCount",
resourceId: `cluster:${example.id}`,
minCapacity: 1,
maxCapacity: 15,
});
import pulumi
import pulumi_aws as aws
replicas = aws.appautoscaling.Target("replicas",
service_namespace="rds",
scalable_dimension="rds:cluster:ReadReplicaCount",
resource_id=f"cluster:{example['id']}",
min_capacity=1,
max_capacity=15)
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appautoscaling.NewTarget(ctx, "replicas", &appautoscaling.TargetArgs{
ServiceNamespace: pulumi.String("rds"),
ScalableDimension: pulumi.String("rds:cluster:ReadReplicaCount"),
ResourceId: pulumi.Sprintf("cluster:%v", example.Id),
MinCapacity: pulumi.Int(1),
MaxCapacity: pulumi.Int(15),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var replicas = new Aws.AppAutoScaling.Target("replicas", new()
{
ServiceNamespace = "rds",
ScalableDimension = "rds:cluster:ReadReplicaCount",
ResourceId = $"cluster:{example.Id}",
MinCapacity = 1,
MaxCapacity = 15,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var replicas = new Target("replicas", TargetArgs.builder()
.serviceNamespace("rds")
.scalableDimension("rds:cluster:ReadReplicaCount")
.resourceId(String.format("cluster:%s", example.id()))
.minCapacity(1)
.maxCapacity(15)
.build());
}
}
resources:
replicas:
type: aws:appautoscaling:Target
properties:
serviceNamespace: rds
scalableDimension: rds:cluster:ReadReplicaCount
resourceId: cluster:${example.id}
minCapacity: 1
maxCapacity: 15
Suppressing tags_all
Differences For Older Resources
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ecsTarget = new aws.appautoscaling.Target("ecs_target", {
maxCapacity: 4,
minCapacity: 1,
resourceId: `service/${example.name}/${exampleAwsEcsService.name}`,
scalableDimension: "ecs:service:DesiredCount",
serviceNamespace: "ecs",
});
import pulumi
import pulumi_aws as aws
ecs_target = aws.appautoscaling.Target("ecs_target",
max_capacity=4,
min_capacity=1,
resource_id=f"service/{example['name']}/{example_aws_ecs_service['name']}",
scalable_dimension="ecs:service:DesiredCount",
service_namespace="ecs")
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appautoscaling.NewTarget(ctx, "ecs_target", &appautoscaling.TargetArgs{
MaxCapacity: pulumi.Int(4),
MinCapacity: pulumi.Int(1),
ResourceId: pulumi.Sprintf("service/%v/%v", example.Name, exampleAwsEcsService.Name),
ScalableDimension: pulumi.String("ecs:service:DesiredCount"),
ServiceNamespace: pulumi.String("ecs"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var ecsTarget = new Aws.AppAutoScaling.Target("ecs_target", new()
{
MaxCapacity = 4,
MinCapacity = 1,
ResourceId = $"service/{example.Name}/{exampleAwsEcsService.Name}",
ScalableDimension = "ecs:service:DesiredCount",
ServiceNamespace = "ecs",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ecsTarget = new Target("ecsTarget", TargetArgs.builder()
.maxCapacity(4)
.minCapacity(1)
.resourceId(String.format("service/%s/%s", example.name(),exampleAwsEcsService.name()))
.scalableDimension("ecs:service:DesiredCount")
.serviceNamespace("ecs")
.build());
}
}
resources:
ecsTarget:
type: aws:appautoscaling:Target
name: ecs_target
properties:
maxCapacity: 4
minCapacity: 1
resourceId: service/${example.name}/${exampleAwsEcsService.name}
scalableDimension: ecs:service:DesiredCount
serviceNamespace: ecs
MSK / Kafka Autoscaling
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const mskTarget = new aws.appautoscaling.Target("msk_target", {
serviceNamespace: "kafka",
scalableDimension: "kafka:broker-storage:VolumeSize",
resourceId: example.arn,
minCapacity: 1,
maxCapacity: 8,
});
import pulumi
import pulumi_aws as aws
msk_target = aws.appautoscaling.Target("msk_target",
service_namespace="kafka",
scalable_dimension="kafka:broker-storage:VolumeSize",
resource_id=example["arn"],
min_capacity=1,
max_capacity=8)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appautoscaling.NewTarget(ctx, "msk_target", &appautoscaling.TargetArgs{
ServiceNamespace: pulumi.String("kafka"),
ScalableDimension: pulumi.String("kafka:broker-storage:VolumeSize"),
ResourceId: pulumi.Any(example.Arn),
MinCapacity: pulumi.Int(1),
MaxCapacity: pulumi.Int(8),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var mskTarget = new Aws.AppAutoScaling.Target("msk_target", new()
{
ServiceNamespace = "kafka",
ScalableDimension = "kafka:broker-storage:VolumeSize",
ResourceId = example.Arn,
MinCapacity = 1,
MaxCapacity = 8,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var mskTarget = new Target("mskTarget", TargetArgs.builder()
.serviceNamespace("kafka")
.scalableDimension("kafka:broker-storage:VolumeSize")
.resourceId(example.arn())
.minCapacity(1)
.maxCapacity(8)
.build());
}
}
resources:
mskTarget:
type: aws:appautoscaling:Target
name: msk_target
properties:
serviceNamespace: kafka
scalableDimension: kafka:broker-storage:VolumeSize
resourceId: ${example.arn}
minCapacity: 1
maxCapacity: 8
Create Target Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Target(name: string, args: TargetArgs, opts?: CustomResourceOptions);
@overload
def Target(resource_name: str,
args: TargetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Target(resource_name: str,
opts: Optional[ResourceOptions] = None,
max_capacity: Optional[int] = None,
min_capacity: Optional[int] = None,
resource_id: Optional[str] = None,
scalable_dimension: Optional[str] = None,
service_namespace: Optional[str] = None,
role_arn: Optional[str] = None,
suspended_state: Optional[TargetSuspendedStateArgs] = None,
tags: Optional[Mapping[str, str]] = None)
func NewTarget(ctx *Context, name string, args TargetArgs, opts ...ResourceOption) (*Target, error)
public Target(string name, TargetArgs args, CustomResourceOptions? opts = null)
public Target(String name, TargetArgs args)
public Target(String name, TargetArgs args, CustomResourceOptions options)
type: aws:appautoscaling:Target
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TargetArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TargetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TargetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var targetResource = new Aws.AppAutoScaling.Target("targetResource", new()
{
MaxCapacity = 0,
MinCapacity = 0,
ResourceId = "string",
ScalableDimension = "string",
ServiceNamespace = "string",
RoleArn = "string",
SuspendedState = new Aws.AppAutoScaling.Inputs.TargetSuspendedStateArgs
{
DynamicScalingInSuspended = false,
DynamicScalingOutSuspended = false,
ScheduledScalingSuspended = false,
},
Tags =
{
{ "string", "string" },
},
});
example, err := appautoscaling.NewTarget(ctx, "targetResource", &appautoscaling.TargetArgs{
MaxCapacity: pulumi.Int(0),
MinCapacity: pulumi.Int(0),
ResourceId: pulumi.String("string"),
ScalableDimension: pulumi.String("string"),
ServiceNamespace: pulumi.String("string"),
RoleArn: pulumi.String("string"),
SuspendedState: &appautoscaling.TargetSuspendedStateArgs{
DynamicScalingInSuspended: pulumi.Bool(false),
DynamicScalingOutSuspended: pulumi.Bool(false),
ScheduledScalingSuspended: pulumi.Bool(false),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var targetResource = new Target("targetResource", TargetArgs.builder()
.maxCapacity(0)
.minCapacity(0)
.resourceId("string")
.scalableDimension("string")
.serviceNamespace("string")
.roleArn("string")
.suspendedState(TargetSuspendedStateArgs.builder()
.dynamicScalingInSuspended(false)
.dynamicScalingOutSuspended(false)
.scheduledScalingSuspended(false)
.build())
.tags(Map.of("string", "string"))
.build());
target_resource = aws.appautoscaling.Target("targetResource",
max_capacity=0,
min_capacity=0,
resource_id="string",
scalable_dimension="string",
service_namespace="string",
role_arn="string",
suspended_state={
"dynamic_scaling_in_suspended": False,
"dynamic_scaling_out_suspended": False,
"scheduled_scaling_suspended": False,
},
tags={
"string": "string",
})
const targetResource = new aws.appautoscaling.Target("targetResource", {
maxCapacity: 0,
minCapacity: 0,
resourceId: "string",
scalableDimension: "string",
serviceNamespace: "string",
roleArn: "string",
suspendedState: {
dynamicScalingInSuspended: false,
dynamicScalingOutSuspended: false,
scheduledScalingSuspended: false,
},
tags: {
string: "string",
},
});
type: aws:appautoscaling:Target
properties:
maxCapacity: 0
minCapacity: 0
resourceId: string
roleArn: string
scalableDimension: string
serviceNamespace: string
suspendedState:
dynamicScalingInSuspended: false
dynamicScalingOutSuspended: false
scheduledScalingSuspended: false
tags:
string: string
Target Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Target resource accepts the following input properties:
- Max
Capacity int - Max capacity of the scalable target.
- Min
Capacity int - Min capacity of the scalable target.
- Resource
Id string - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - Scalable
Dimension string - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - Service
Namespace string - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - Role
Arn string - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- Suspended
State TargetSuspended State - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Dictionary<string, string>
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Max
Capacity int - Max capacity of the scalable target.
- Min
Capacity int - Min capacity of the scalable target.
- Resource
Id string - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - Scalable
Dimension string - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - Service
Namespace string - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - Role
Arn string - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- Suspended
State TargetSuspended State Args - Specifies whether the scaling activities for a scalable target are in a suspended state.
- map[string]string
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- max
Capacity Integer - Max capacity of the scalable target.
- min
Capacity Integer - Min capacity of the scalable target.
- resource
Id String - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - scalable
Dimension String - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service
Namespace String - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - role
Arn String - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- suspended
State TargetSuspended State - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Map<String,String>
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- max
Capacity number - Max capacity of the scalable target.
- min
Capacity number - Min capacity of the scalable target.
- resource
Id string - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - scalable
Dimension string - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service
Namespace string - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - role
Arn string - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- suspended
State TargetSuspended State - Specifies whether the scaling activities for a scalable target are in a suspended state.
- {[key: string]: string}
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- max_
capacity int - Max capacity of the scalable target.
- min_
capacity int - Min capacity of the scalable target.
- resource_
id str - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - scalable_
dimension str - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service_
namespace str - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - role_
arn str - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- suspended_
state TargetSuspended State Args - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Mapping[str, str]
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- max
Capacity Number - Max capacity of the scalable target.
- min
Capacity Number - Min capacity of the scalable target.
- resource
Id String - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - scalable
Dimension String - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service
Namespace String - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - role
Arn String - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- suspended
State Property Map - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Map<String>
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the Target resource produces the following output properties:
Look up Existing Target Resource
Get an existing Target resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TargetState, opts?: CustomResourceOptions): Target
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
max_capacity: Optional[int] = None,
min_capacity: Optional[int] = None,
resource_id: Optional[str] = None,
role_arn: Optional[str] = None,
scalable_dimension: Optional[str] = None,
service_namespace: Optional[str] = None,
suspended_state: Optional[TargetSuspendedStateArgs] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> Target
func GetTarget(ctx *Context, name string, id IDInput, state *TargetState, opts ...ResourceOption) (*Target, error)
public static Target Get(string name, Input<string> id, TargetState? state, CustomResourceOptions? opts = null)
public static Target get(String name, Output<String> id, TargetState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The ARN of the scalable target.
- Max
Capacity int - Max capacity of the scalable target.
- Min
Capacity int - Min capacity of the scalable target.
- Resource
Id string - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - Role
Arn string - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- Scalable
Dimension string - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - Service
Namespace string - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - Suspended
State TargetSuspended State - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Dictionary<string, string>
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The ARN of the scalable target.
- Max
Capacity int - Max capacity of the scalable target.
- Min
Capacity int - Min capacity of the scalable target.
- Resource
Id string - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - Role
Arn string - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- Scalable
Dimension string - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - Service
Namespace string - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - Suspended
State TargetSuspended State Args - Specifies whether the scaling activities for a scalable target are in a suspended state.
- map[string]string
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the scalable target.
- max
Capacity Integer - Max capacity of the scalable target.
- min
Capacity Integer - Min capacity of the scalable target.
- resource
Id String - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - role
Arn String - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- scalable
Dimension String - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service
Namespace String - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - suspended
State TargetSuspended State - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Map<String,String>
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The ARN of the scalable target.
- max
Capacity number - Max capacity of the scalable target.
- min
Capacity number - Min capacity of the scalable target.
- resource
Id string - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - role
Arn string - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- scalable
Dimension string - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service
Namespace string - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - suspended
State TargetSuspended State - Specifies whether the scaling activities for a scalable target are in a suspended state.
- {[key: string]: string}
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The ARN of the scalable target.
- max_
capacity int - Max capacity of the scalable target.
- min_
capacity int - Min capacity of the scalable target.
- resource_
id str - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - role_
arn str - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- scalable_
dimension str - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service_
namespace str - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - suspended_
state TargetSuspended State Args - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Mapping[str, str]
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The ARN of the scalable target.
- max
Capacity Number - Max capacity of the scalable target.
- min
Capacity Number - Min capacity of the scalable target.
- resource
Id String - Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the
ResourceId
parameter at: AWS Application Auto Scaling API Reference - role
Arn String - ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the AWS Application Auto Scaling documentation for more information about how this service interacts with IAM.
- scalable
Dimension String - Scalable dimension of the scalable target. Documentation can be found in the
ScalableDimension
parameter at: AWS Application Auto Scaling API Reference - service
Namespace String - AWS service namespace of the scalable target. Documentation can be found in the
ServiceNamespace
parameter at: AWS Application Auto Scaling API Reference - suspended
State Property Map - Specifies whether the scaling activities for a scalable target are in a suspended state.
- Map<String>
- Map of tags to assign to the scalable target. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
TargetSuspendedState, TargetSuspendedStateArgs
- Dynamic
Scaling boolIn Suspended - Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - Dynamic
Scaling boolOut Suspended - Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - Scheduled
Scaling boolSuspended - Whether scheduled scaling is suspended. Default is
false
.
- Dynamic
Scaling boolIn Suspended - Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - Dynamic
Scaling boolOut Suspended - Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - Scheduled
Scaling boolSuspended - Whether scheduled scaling is suspended. Default is
false
.
- dynamic
Scaling BooleanIn Suspended - Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - dynamic
Scaling BooleanOut Suspended - Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - scheduled
Scaling BooleanSuspended - Whether scheduled scaling is suspended. Default is
false
.
- dynamic
Scaling booleanIn Suspended - Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - dynamic
Scaling booleanOut Suspended - Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - scheduled
Scaling booleanSuspended - Whether scheduled scaling is suspended. Default is
false
.
- dynamic_
scaling_ boolin_ suspended - Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - dynamic_
scaling_ boolout_ suspended - Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - scheduled_
scaling_ boolsuspended - Whether scheduled scaling is suspended. Default is
false
.
- dynamic
Scaling BooleanIn Suspended - Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - dynamic
Scaling BooleanOut Suspended - Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Default is
false
. - scheduled
Scaling BooleanSuspended - Whether scheduled scaling is suspended. Default is
false
.
Import
Using pulumi import
, import Application AutoScaling Target using the service-namespace
, resource-id
and scalable-dimension
separated by /
. For example:
$ pulumi import aws:appautoscaling/target:Target test-target service-namespace/resource-id/scalable-dimension
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.