com.pulumi.aws.vpclattice.TargetGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.vpclattice;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.vpclattice.TargetGroupArgs;
import com.pulumi.aws.vpclattice.inputs.TargetGroupState;
import com.pulumi.aws.vpclattice.outputs.TargetGroupConfig;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Resource for managing an AWS VPC Lattice Target Group.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.vpclattice.TargetGroup;
* import com.pulumi.aws.vpclattice.TargetGroupArgs;
* import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigArgs;
* 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 example = new TargetGroup("example", TargetGroupArgs.builder()
* .name("example")
* .type("INSTANCE")
* .config(TargetGroupConfigArgs.builder()
* .vpcIdentifier(exampleAwsVpc.id())
* .port(443)
* .protocol("HTTPS")
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Basic usage with Health check
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.vpclattice.TargetGroup;
* import com.pulumi.aws.vpclattice.TargetGroupArgs;
* import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigArgs;
* import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigHealthCheckArgs;
* import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigHealthCheckMatcherArgs;
* 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 example = new TargetGroup("example", TargetGroupArgs.builder()
* .name("example")
* .type("IP")
* .config(TargetGroupConfigArgs.builder()
* .vpcIdentifier(exampleAwsVpc.id())
* .ipAddressType("IPV4")
* .port(443)
* .protocol("HTTPS")
* .protocolVersion("HTTP1")
* .healthCheck(TargetGroupConfigHealthCheckArgs.builder()
* .enabled(true)
* .healthCheckIntervalSeconds(20)
* .healthCheckTimeoutSeconds(10)
* .healthyThresholdCount(7)
* .unhealthyThresholdCount(3)
* .matcher(TargetGroupConfigHealthCheckMatcherArgs.builder()
* .value("200-299")
* .build())
* .path("/instance")
* .port(80)
* .protocol("HTTP")
* .protocolVersion("HTTP1")
* .build())
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### ALB
*
* If the type is ALB, `health_check` block is not supported.
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.vpclattice.TargetGroup;
* import com.pulumi.aws.vpclattice.TargetGroupArgs;
* import com.pulumi.aws.vpclattice.inputs.TargetGroupConfigArgs;
* 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 example = new TargetGroup("example", TargetGroupArgs.builder()
* .name("example")
* .type("ALB")
* .config(TargetGroupConfigArgs.builder()
* .vpcIdentifier(exampleAwsVpc.id())
* .port(443)
* .protocol("HTTPS")
* .protocolVersion("HTTP1")
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Lambda
*
* If the type is Lambda, `config` block is not supported.
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.vpclattice.TargetGroup;
* import com.pulumi.aws.vpclattice.TargetGroupArgs;
* 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 example = new TargetGroup("example", TargetGroupArgs.builder()
* .name("example")
* .type("LAMBDA")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import VPC Lattice Target Group using the `id`. For example:
*
* ```sh
* $ pulumi import aws:vpclattice/targetGroup:TargetGroup example tg-0c11d4dc16ed96bdb
* ```
*
*/
@ResourceType(type="aws:vpclattice/targetGroup:TargetGroup")
public class TargetGroup extends com.pulumi.resources.CustomResource {
/**
* ARN of the target group.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return ARN of the target group.
*
*/
public Output arn() {
return this.arn;
}
/**
* The target group configuration.
*
*/
@Export(name="config", refs={TargetGroupConfig.class}, tree="[0]")
private Output* @Nullable */ TargetGroupConfig> config;
/**
* @return The target group configuration.
*
*/
public Output> config() {
return Codegen.optional(this.config);
}
/**
* The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
*
*/
public Output name() {
return this.name;
}
/**
* Status of the target group.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
/**
* @return Status of the target group.
*
*/
public Output status() {
return this.status;
}
/**
* Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy