All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.appautoscaling.kotlin.TargetArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.66.3.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.appautoscaling.kotlin

import com.pulumi.aws.appautoscaling.TargetArgs.builder
import com.pulumi.aws.appautoscaling.kotlin.inputs.TargetSuspendedStateArgs
import com.pulumi.aws.appautoscaling.kotlin.inputs.TargetSuspendedStateArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * 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 use `tags` or participate in `default_tags`. To prevent `pulumi preview` showing differences that can never be reconciled, use the `lifecycle.ignore_changes` meta-argument. See the example below.
 * > **NOTE:** The [Application Auto Scaling service automatically attempts to manage IAM Service-Linked Roles](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-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
 * 
 * ```typescript
 * 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",
 * });
 * ```
 * ```python
 * 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")
 * ```
 * ```csharp
 * 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",
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * 
 * ```typescript
 * 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",
 * });
 * ```
 * ```python
 * 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")
 * ```
 * ```csharp
 * 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",
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * 
 * ```typescript
 * 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",
 * });
 * ```
 * ```python
 * 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")
 * ```
 * ```csharp
 * 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",
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * 
 * ```typescript
 * 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,
 * });
 * ```
 * ```python
 * 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)
 * ```
 * ```csharp
 * 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,
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * 
 * ```typescript
 * 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",
 * });
 * ```
 * ```python
 * 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")
 * ```
 * ```csharp
 * 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",
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * 
 * ```typescript
 * 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,
 * });
 * ```
 * ```python
 * 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)
 * ```
 * ```csharp
 * 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,
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   mskTarget:
 *     type: aws:appautoscaling:Target
 *     name: msk_target
 *     properties:
 *       serviceNamespace: kafka
 *       scalableDimension: kafka:broker-storage:VolumeSize
 *       resourceId: ${example.arn}
 *       minCapacity: 1
 *       maxCapacity: 8
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Application AutoScaling Target using the `service-namespace` , `resource-id` and `scalable-dimension` separated by `/`. For example:
 * ```sh
 * $ pulumi import aws:appautoscaling/target:Target test-target service-namespace/resource-id/scalable-dimension
 * ```
 * @property maxCapacity Max capacity of the scalable target.
 * @property minCapacity Min capacity of the scalable target.
 * @property resourceId 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](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
 * @property roleArn 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](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM.
 * @property scalableDimension Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
 * @property serviceNamespace AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
 * @property suspendedState Specifies whether the scaling activities for a scalable target are in a suspended state.
 * @property tags 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.
 */
public data class TargetArgs(
    public val maxCapacity: Output? = null,
    public val minCapacity: Output? = null,
    public val resourceId: Output? = null,
    public val roleArn: Output? = null,
    public val scalableDimension: Output? = null,
    public val serviceNamespace: Output? = null,
    public val suspendedState: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.appautoscaling.TargetArgs =
        com.pulumi.aws.appautoscaling.TargetArgs.builder()
            .maxCapacity(maxCapacity?.applyValue({ args0 -> args0 }))
            .minCapacity(minCapacity?.applyValue({ args0 -> args0 }))
            .resourceId(resourceId?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .scalableDimension(scalableDimension?.applyValue({ args0 -> args0 }))
            .serviceNamespace(serviceNamespace?.applyValue({ args0 -> args0 }))
            .suspendedState(suspendedState?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [TargetArgs].
 */
@PulumiTagMarker
public class TargetArgsBuilder internal constructor() {
    private var maxCapacity: Output? = null

    private var minCapacity: Output? = null

    private var resourceId: Output? = null

    private var roleArn: Output? = null

    private var scalableDimension: Output? = null

    private var serviceNamespace: Output? = null

    private var suspendedState: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Max capacity of the scalable target.
     */
    @JvmName("shsrsyxcacedxkxh")
    public suspend fun maxCapacity(`value`: Output) {
        this.maxCapacity = value
    }

    /**
     * @param value Min capacity of the scalable target.
     */
    @JvmName("gayqnlyiafseowhh")
    public suspend fun minCapacity(`value`: Output) {
        this.minCapacity = value
    }

    /**
     * @param value 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](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
     */
    @JvmName("wvgljwmotynqglgr")
    public suspend fun resourceId(`value`: Output) {
        this.resourceId = value
    }

    /**
     * @param value 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](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM.
     */
    @JvmName("licgvvmqohmjhrmd")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
     */
    @JvmName("qfikdbefotetvcgw")
    public suspend fun scalableDimension(`value`: Output) {
        this.scalableDimension = value
    }

    /**
     * @param value AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
     */
    @JvmName("ffvwbxjkireajfsf")
    public suspend fun serviceNamespace(`value`: Output) {
        this.serviceNamespace = value
    }

    /**
     * @param value Specifies whether the scaling activities for a scalable target are in a suspended state.
     */
    @JvmName("ulbgebamlpravstj")
    public suspend fun suspendedState(`value`: Output) {
        this.suspendedState = value
    }

    /**
     * @param value 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.
     */
    @JvmName("ecgtndijgkrihmad")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Max capacity of the scalable target.
     */
    @JvmName("jgrrjnrhcwpcuupl")
    public suspend fun maxCapacity(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxCapacity = mapped
    }

    /**
     * @param value Min capacity of the scalable target.
     */
    @JvmName("uwlxdphserqbakpp")
    public suspend fun minCapacity(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minCapacity = mapped
    }

    /**
     * @param value 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](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
     */
    @JvmName("eirwknqhxdfuiqaa")
    public suspend fun resourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceId = mapped
    }

    /**
     * @param value 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](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM.
     */
    @JvmName("hxgehmbtlvdkbxob")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
     */
    @JvmName("visquenxrfvxqbtr")
    public suspend fun scalableDimension(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scalableDimension = mapped
    }

    /**
     * @param value AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters)
     */
    @JvmName("liqvrbtvhlerewmw")
    public suspend fun serviceNamespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceNamespace = mapped
    }

    /**
     * @param value Specifies whether the scaling activities for a scalable target are in a suspended state.
     */
    @JvmName("roshbroxiadayloh")
    public suspend fun suspendedState(`value`: TargetSuspendedStateArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.suspendedState = mapped
    }

    /**
     * @param argument Specifies whether the scaling activities for a scalable target are in a suspended state.
     */
    @JvmName("pstujeonefmmcjfk")
    public suspend fun suspendedState(argument: suspend TargetSuspendedStateArgsBuilder.() -> Unit) {
        val toBeMapped = TargetSuspendedStateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.suspendedState = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("jeytdpmpltkhrcqi")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("ufhmdttqjbeefgnf")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): TargetArgs = TargetArgs(
        maxCapacity = maxCapacity,
        minCapacity = minCapacity,
        resourceId = resourceId,
        roleArn = roleArn,
        scalableDimension = scalableDimension,
        serviceNamespace = serviceNamespace,
        suspendedState = suspendedState,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy