Class ContainerServiceDeploymentVersion


  • public class ContainerServiceDeploymentVersion
    extends com.pulumi.resources.CustomResource
    Manages a Lightsail container service deployment version. Use this resource to deploy containerized applications to your Lightsail container service with specific container configurations and settings. > **NOTE:** The Amazon Lightsail container service must be enabled to create a deployment. > **NOTE:** This resource allows you to manage an Amazon Lightsail container service deployment version but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile. ## Example Usage ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.lightsail.ContainerServiceDeploymentVersion;
     import com.pulumi.aws.lightsail.ContainerServiceDeploymentVersionArgs;
     import com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointArgs;
     import com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs;
     import com.pulumi.aws.lightsail.inputs.ContainerServiceDeploymentVersionContainerArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 ContainerServiceDeploymentVersion("example", ContainerServiceDeploymentVersionArgs.builder()
                 .publicEndpoint(ContainerServiceDeploymentVersionPublicEndpointArgs.builder()
                     .healthCheck(ContainerServiceDeploymentVersionPublicEndpointHealthCheckArgs.builder()
                         .healthyThreshold(2)
                         .unhealthyThreshold(2)
                         .timeoutSeconds(2)
                         .intervalSeconds(5)
                         .path("/")
                         .successCodes("200-499")
                         .build())
                     .containerName("hello-world")
                     .containerPort(80)
                     .build())
                 .containers(ContainerServiceDeploymentVersionContainerArgs.builder()
                     .containerName("hello-world")
                     .image("amazon/amazon-lightsail:hello-world")
                     .commands()
                     .environment(Map.of("MY_ENVIRONMENT_VARIABLE", "my_value"))
                     .ports(Map.of("80", "HTTP"))
                     .build())
                 .serviceName(exampleAwsLightsailContainerService.name())
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import Lightsail Container Service Deployment Version using the `serviceName` and `version` separated by a slash (`/`). For example: ```sh $ pulumi import aws:lightsail/containerServiceDeploymentVersion:ContainerServiceDeploymentVersion example container-service-1/1 ```
    • Constructor Detail

      • ContainerServiceDeploymentVersion

        public ContainerServiceDeploymentVersion​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • ContainerServiceDeploymentVersion

        public ContainerServiceDeploymentVersion​(java.lang.String name,
                                                 ContainerServiceDeploymentVersionArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • ContainerServiceDeploymentVersion

        public ContainerServiceDeploymentVersion​(java.lang.String name,
                                                 ContainerServiceDeploymentVersionArgs args,
                                                 @Nullable
                                                 com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • containers

        public com.pulumi.core.Output<java.util.List<ContainerServiceDeploymentVersionContainer>> containers()
        Returns:
        Set of configuration blocks that describe the settings of the containers that will be launched on the container service. Maximum of 53. See below.
      • createdAt

        public com.pulumi.core.Output<java.lang.String> createdAt()
        Returns:
        Date and time when the deployment was created.
      • publicEndpoint

        public com.pulumi.core.Output<java.util.Optional<ContainerServiceDeploymentVersionPublicEndpoint>> publicEndpoint()
        Returns:
        Configuration block that describes the settings of the public endpoint for the container service. See below.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • serviceName

        public com.pulumi.core.Output<java.lang.String> serviceName()
        Returns:
        Name of the container service. The following arguments are optional:
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        Current state of the container service.
      • version

        public com.pulumi.core.Output<java.lang.Integer> version()
        Returns:
        Version number of the deployment.
      • get

        public static ContainerServiceDeploymentVersion get​(java.lang.String name,
                                                            com.pulumi.core.Output<java.lang.String> id,
                                                            @Nullable
                                                            ContainerServiceDeploymentVersionState state,
                                                            @Nullable
                                                            com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.