1. Packages
  2. Scaleway
  3. API Docs
  4. getContainer
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.getContainer

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    Gets information about the Scaleway Container.

    For more information consult the documentation.

    For more details about the limitation check containers-limitations.

    You can check also our containers guide.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var mainContainerNamespace = new Scaleway.ContainerNamespace("mainContainerNamespace");
    
        var mainContainer = new Scaleway.Container("mainContainer", new()
        {
            NamespaceId = mainContainerNamespace.Id,
        });
    
        var byName = Scaleway.GetContainer.Invoke(new()
        {
            NamespaceId = mainContainerNamespace.Id,
            Name = mainContainer.Name,
        });
    
        var byId = Scaleway.GetContainer.Invoke(new()
        {
            NamespaceId = mainContainerNamespace.Id,
            ContainerId = mainContainer.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		mainContainerNamespace, err := scaleway.NewContainerNamespace(ctx, "mainContainerNamespace", nil)
    		if err != nil {
    			return err
    		}
    		mainContainer, err := scaleway.NewContainer(ctx, "mainContainer", &scaleway.ContainerArgs{
    			NamespaceId: mainContainerNamespace.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_ = scaleway.LookupContainerOutput(ctx, scaleway.GetContainerOutputArgs{
    			NamespaceId: mainContainerNamespace.ID(),
    			Name:        mainContainer.Name,
    		}, nil)
    		_ = scaleway.LookupContainerOutput(ctx, scaleway.GetContainerOutputArgs{
    			NamespaceId: mainContainerNamespace.ID(),
    			ContainerId: mainContainer.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ContainerNamespace;
    import com.pulumi.scaleway.Container;
    import com.pulumi.scaleway.ContainerArgs;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetContainerArgs;
    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 mainContainerNamespace = new ContainerNamespace("mainContainerNamespace");
    
            var mainContainer = new Container("mainContainer", ContainerArgs.builder()        
                .namespaceId(mainContainerNamespace.id())
                .build());
    
            final var byName = ScalewayFunctions.getContainer(GetContainerArgs.builder()
                .namespaceId(mainContainerNamespace.id())
                .name(mainContainer.name())
                .build());
    
            final var byId = ScalewayFunctions.getContainer(GetContainerArgs.builder()
                .namespaceId(mainContainerNamespace.id())
                .containerId(mainContainer.id())
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_scaleway as scaleway
    import pulumi_scaleway as scaleway
    
    main_container_namespace = scaleway.ContainerNamespace("mainContainerNamespace")
    main_container = scaleway.Container("mainContainer", namespace_id=main_container_namespace.id)
    by_name = scaleway.get_container_output(namespace_id=main_container_namespace.id,
        name=main_container.name)
    by_id = scaleway.get_container_output(namespace_id=main_container_namespace.id,
        container_id=main_container.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@lbrlabs/pulumi-scaleway";
    import * as scaleway from "@pulumi/scaleway";
    
    const mainContainerNamespace = new scaleway.ContainerNamespace("mainContainerNamespace", {});
    const mainContainer = new scaleway.Container("mainContainer", {namespaceId: mainContainerNamespace.id});
    const byName = scaleway.getContainerOutput({
        namespaceId: mainContainerNamespace.id,
        name: mainContainer.name,
    });
    const byId = scaleway.getContainerOutput({
        namespaceId: mainContainerNamespace.id,
        containerId: mainContainer.id,
    });
    
    resources:
      mainContainerNamespace:
        type: scaleway:ContainerNamespace
      mainContainer:
        type: scaleway:Container
        properties:
          namespaceId: ${mainContainerNamespace.id}
    variables:
      byName:
        fn::invoke:
          Function: scaleway:getContainer
          Arguments:
            namespaceId: ${mainContainerNamespace.id}
            name: ${mainContainer.name}
      byId:
        fn::invoke:
          Function: scaleway:getContainer
          Arguments:
            namespaceId: ${mainContainerNamespace.id}
            containerId: ${mainContainer.id}
    

    Using getContainer

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getContainer(args: GetContainerArgs, opts?: InvokeOptions): Promise<GetContainerResult>
    function getContainerOutput(args: GetContainerOutputArgs, opts?: InvokeOptions): Output<GetContainerResult>
    def get_container(container_id: Optional[str] = None,
                      name: Optional[str] = None,
                      namespace_id: Optional[str] = None,
                      region: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetContainerResult
    def get_container_output(container_id: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      namespace_id: Optional[pulumi.Input[str]] = None,
                      region: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetContainerResult]
    func LookupContainer(ctx *Context, args *LookupContainerArgs, opts ...InvokeOption) (*LookupContainerResult, error)
    func LookupContainerOutput(ctx *Context, args *LookupContainerOutputArgs, opts ...InvokeOption) LookupContainerResultOutput

    > Note: This function is named LookupContainer in the Go SDK.

    public static class GetContainer 
    {
        public static Task<GetContainerResult> InvokeAsync(GetContainerArgs args, InvokeOptions? opts = null)
        public static Output<GetContainerResult> Invoke(GetContainerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContainerResult> getContainer(GetContainerArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getContainer:getContainer
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NamespaceId string

    The container namespace ID of the container.

    Important Updates to name will recreate the container.

    ContainerId string
    Name string

    The unique name of the container name.

    Region string

    (Defaults to provider region) The region in which the container was created.

    NamespaceId string

    The container namespace ID of the container.

    Important Updates to name will recreate the container.

    ContainerId string
    Name string

    The unique name of the container name.

    Region string

    (Defaults to provider region) The region in which the container was created.

    namespaceId String

    The container namespace ID of the container.

    Important Updates to name will recreate the container.

    containerId String
    name String

    The unique name of the container name.

    region String

    (Defaults to provider region) The region in which the container was created.

    namespaceId string

    The container namespace ID of the container.

    Important Updates to name will recreate the container.

    containerId string
    name string

    The unique name of the container name.

    region string

    (Defaults to provider region) The region in which the container was created.

    namespace_id str

    The container namespace ID of the container.

    Important Updates to name will recreate the container.

    container_id str
    name str

    The unique name of the container name.

    region str

    (Defaults to provider region) The region in which the container was created.

    namespaceId String

    The container namespace ID of the container.

    Important Updates to name will recreate the container.

    containerId String
    name String

    The unique name of the container name.

    region String

    (Defaults to provider region) The region in which the container was created.

    getContainer Result

    The following output properties are available:

    CpuLimit int

    The amount of vCPU computing resources to allocate to each container. Defaults to 70.

    CronStatus string

    The cron status of the container.

    Deploy bool

    Boolean indicating whether the container is on a production environment.

    Description string

    The description of the container.

    DomainName string

    The container domain name.

    EnvironmentVariables Dictionary<string, string>

    The environment variables of the container.

    ErrorMessage string

    The error message of the container.

    HttpOption string
    Id string

    The provider-assigned unique ID for this managed resource.

    MaxConcurrency int

    The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.

    MaxScale int

    The maximum of number of instances this container can scale to. Default to 20.

    MemoryLimit int

    The memory computing resources in MB to allocate to each container. Defaults to 128.

    MinScale int

    The minimum of running container instances continuously. Defaults to 0.

    NamespaceId string
    Port int

    The port to expose the container. Defaults to 8080.

    Privacy string

    The privacy type define the way to authenticate to your container. Please check our dedicated section.

    Protocol string

    The communication protocol http1 or h2c. Defaults to http1.

    RegistryImage string

    The registry image address. e.g: "rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE".

    RegistrySha256 string

    The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.

    SecretEnvironmentVariables Dictionary<string, string>
    Status string

    The container status.

    Timeout int

    The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.

    ContainerId string
    Name string
    Region string

    (Defaults to provider region) The region in which the container was created.

    CpuLimit int

    The amount of vCPU computing resources to allocate to each container. Defaults to 70.

    CronStatus string

    The cron status of the container.

    Deploy bool

    Boolean indicating whether the container is on a production environment.

    Description string

    The description of the container.

    DomainName string

    The container domain name.

    EnvironmentVariables map[string]string

    The environment variables of the container.

    ErrorMessage string

    The error message of the container.

    HttpOption string
    Id string

    The provider-assigned unique ID for this managed resource.

    MaxConcurrency int

    The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.

    MaxScale int

    The maximum of number of instances this container can scale to. Default to 20.

    MemoryLimit int

    The memory computing resources in MB to allocate to each container. Defaults to 128.

    MinScale int

    The minimum of running container instances continuously. Defaults to 0.

    NamespaceId string
    Port int

    The port to expose the container. Defaults to 8080.

    Privacy string

    The privacy type define the way to authenticate to your container. Please check our dedicated section.

    Protocol string

    The communication protocol http1 or h2c. Defaults to http1.

    RegistryImage string

    The registry image address. e.g: "rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE".

    RegistrySha256 string

    The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.

    SecretEnvironmentVariables map[string]string
    Status string

    The container status.

    Timeout int

    The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.

    ContainerId string
    Name string
    Region string

    (Defaults to provider region) The region in which the container was created.

    cpuLimit Integer

    The amount of vCPU computing resources to allocate to each container. Defaults to 70.

    cronStatus String

    The cron status of the container.

    deploy Boolean

    Boolean indicating whether the container is on a production environment.

    description String

    The description of the container.

    domainName String

    The container domain name.

    environmentVariables Map<String,String>

    The environment variables of the container.

    errorMessage String

    The error message of the container.

    httpOption String
    id String

    The provider-assigned unique ID for this managed resource.

    maxConcurrency Integer

    The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.

    maxScale Integer

    The maximum of number of instances this container can scale to. Default to 20.

    memoryLimit Integer

    The memory computing resources in MB to allocate to each container. Defaults to 128.

    minScale Integer

    The minimum of running container instances continuously. Defaults to 0.

    namespaceId String
    port Integer

    The port to expose the container. Defaults to 8080.

    privacy String

    The privacy type define the way to authenticate to your container. Please check our dedicated section.

    protocol String

    The communication protocol http1 or h2c. Defaults to http1.

    registryImage String

    The registry image address. e.g: "rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE".

    registrySha256 String

    The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.

    secretEnvironmentVariables Map<String,String>
    status String

    The container status.

    timeout Integer

    The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.

    containerId String
    name String
    region String

    (Defaults to provider region) The region in which the container was created.

    cpuLimit number

    The amount of vCPU computing resources to allocate to each container. Defaults to 70.

    cronStatus string

    The cron status of the container.

    deploy boolean

    Boolean indicating whether the container is on a production environment.

    description string

    The description of the container.

    domainName string

    The container domain name.

    environmentVariables {[key: string]: string}

    The environment variables of the container.

    errorMessage string

    The error message of the container.

    httpOption string
    id string

    The provider-assigned unique ID for this managed resource.

    maxConcurrency number

    The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.

    maxScale number

    The maximum of number of instances this container can scale to. Default to 20.

    memoryLimit number

    The memory computing resources in MB to allocate to each container. Defaults to 128.

    minScale number

    The minimum of running container instances continuously. Defaults to 0.

    namespaceId string
    port number

    The port to expose the container. Defaults to 8080.

    privacy string

    The privacy type define the way to authenticate to your container. Please check our dedicated section.

    protocol string

    The communication protocol http1 or h2c. Defaults to http1.

    registryImage string

    The registry image address. e.g: "rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE".

    registrySha256 string

    The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.

    secretEnvironmentVariables {[key: string]: string}
    status string

    The container status.

    timeout number

    The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.

    containerId string
    name string
    region string

    (Defaults to provider region) The region in which the container was created.

    cpu_limit int

    The amount of vCPU computing resources to allocate to each container. Defaults to 70.

    cron_status str

    The cron status of the container.

    deploy bool

    Boolean indicating whether the container is on a production environment.

    description str

    The description of the container.

    domain_name str

    The container domain name.

    environment_variables Mapping[str, str]

    The environment variables of the container.

    error_message str

    The error message of the container.

    http_option str
    id str

    The provider-assigned unique ID for this managed resource.

    max_concurrency int

    The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.

    max_scale int

    The maximum of number of instances this container can scale to. Default to 20.

    memory_limit int

    The memory computing resources in MB to allocate to each container. Defaults to 128.

    min_scale int

    The minimum of running container instances continuously. Defaults to 0.

    namespace_id str
    port int

    The port to expose the container. Defaults to 8080.

    privacy str

    The privacy type define the way to authenticate to your container. Please check our dedicated section.

    protocol str

    The communication protocol http1 or h2c. Defaults to http1.

    registry_image str

    The registry image address. e.g: "rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE".

    registry_sha256 str

    The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.

    secret_environment_variables Mapping[str, str]
    status str

    The container status.

    timeout int

    The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.

    container_id str
    name str
    region str

    (Defaults to provider region) The region in which the container was created.

    cpuLimit Number

    The amount of vCPU computing resources to allocate to each container. Defaults to 70.

    cronStatus String

    The cron status of the container.

    deploy Boolean

    Boolean indicating whether the container is on a production environment.

    description String

    The description of the container.

    domainName String

    The container domain name.

    environmentVariables Map<String>

    The environment variables of the container.

    errorMessage String

    The error message of the container.

    httpOption String
    id String

    The provider-assigned unique ID for this managed resource.

    maxConcurrency Number

    The maximum number of simultaneous requests your container can handle at the same time. Defaults to 50.

    maxScale Number

    The maximum of number of instances this container can scale to. Default to 20.

    memoryLimit Number

    The memory computing resources in MB to allocate to each container. Defaults to 128.

    minScale Number

    The minimum of running container instances continuously. Defaults to 0.

    namespaceId String
    port Number

    The port to expose the container. Defaults to 8080.

    privacy String

    The privacy type define the way to authenticate to your container. Please check our dedicated section.

    protocol String

    The communication protocol http1 or h2c. Defaults to http1.

    registryImage String

    The registry image address. e.g: "rg.fr-par.scw.cloud/$NAMESPACE/$IMAGE".

    registrySha256 String

    The sha256 of your source registry image, changing it will re-apply the deployment. Can be any string.

    secretEnvironmentVariables Map<String>
    status String

    The container status.

    timeout Number

    The maximum amount of time in seconds during which your container can process a request before we stop it. Defaults to 300s.

    containerId String
    name String
    region String

    (Defaults to provider region) The region in which the container was created.

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the scaleway Terraform Provider.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs