1. Packages
  2. Hsdp Provider
  3. API Docs
  4. getDockerRepository
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.getDockerRepository

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Retrieves information on a HSDP Docker repository

    This resource only works when HSDP_UAA_USERNAME and HSDP_UAA_PASSWORD values matching provider arguments are set

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const apps = hsdp.getDockerNamespace({
        name: "apps",
    });
    const caddy = apps.then(apps => hsdp.getDockerRepository({
        namespaceId: apps.id,
        name: "caddy",
    }));
    export const tags = caddy.then(caddy => caddy.tags);
    export const caddyLatestImage = Promise.all([caddy, caddy]).then(([caddy, caddy1]) => `${caddy.fullName}:${caddy1.latestTag}`);
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    apps = hsdp.get_docker_namespace(name="apps")
    caddy = hsdp.get_docker_repository(namespace_id=apps.id,
        name="caddy")
    pulumi.export("tags", caddy.tags)
    pulumi.export("caddyLatestImage", f"{caddy.full_name}:{caddy.latest_tag}")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		apps, err := hsdp.LookupDockerNamespace(ctx, &hsdp.LookupDockerNamespaceArgs{
    			Name: "apps",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		caddy, err := hsdp.LookupDockerRepository(ctx, &hsdp.LookupDockerRepositoryArgs{
    			NamespaceId: apps.Id,
    			Name:        "caddy",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("tags", caddy.Tags)
    		ctx.Export("caddyLatestImage", pulumi.Sprintf("%v:%v", caddy.FullName, caddy.LatestTag))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var apps = Hsdp.GetDockerNamespace.Invoke(new()
        {
            Name = "apps",
        });
    
        var caddy = Hsdp.GetDockerRepository.Invoke(new()
        {
            NamespaceId = apps.Apply(getDockerNamespaceResult => getDockerNamespaceResult.Id),
            Name = "caddy",
        });
    
        return new Dictionary<string, object?>
        {
            ["tags"] = caddy.Apply(getDockerRepositoryResult => getDockerRepositoryResult.Tags),
            ["caddyLatestImage"] = Output.Tuple(caddy, caddy).Apply(values =>
            {
                var caddy = values.Item1;
                var caddy1 = values.Item2;
                return $"{caddy.Apply(getDockerRepositoryResult => getDockerRepositoryResult.FullName)}:{caddy1.LatestTag}";
            }),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.HsdpFunctions;
    import com.pulumi.hsdp.inputs.GetDockerNamespaceArgs;
    import com.pulumi.hsdp.inputs.GetDockerRepositoryArgs;
    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) {
            final var apps = HsdpFunctions.getDockerNamespace(GetDockerNamespaceArgs.builder()
                .name("apps")
                .build());
    
            final var caddy = HsdpFunctions.getDockerRepository(GetDockerRepositoryArgs.builder()
                .namespaceId(apps.applyValue(getDockerNamespaceResult -> getDockerNamespaceResult.id()))
                .name("caddy")
                .build());
    
            ctx.export("tags", caddy.applyValue(getDockerRepositoryResult -> getDockerRepositoryResult.tags()));
            ctx.export("caddyLatestImage", String.format("%s:%s", caddy.applyValue(getDockerRepositoryResult -> getDockerRepositoryResult.fullName()),caddy.applyValue(getDockerRepositoryResult -> getDockerRepositoryResult.latestTag())));
        }
    }
    
    variables:
      apps:
        fn::invoke:
          function: hsdp:getDockerNamespace
          arguments:
            name: apps
      caddy:
        fn::invoke:
          function: hsdp:getDockerRepository
          arguments:
            namespaceId: ${apps.id}
            name: caddy
    outputs:
      tags: ${caddy.tags}
      caddyLatestImage: ${caddy.fullName}:${caddy.latestTag}
    

    Using getDockerRepository

    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 getDockerRepository(args: GetDockerRepositoryArgs, opts?: InvokeOptions): Promise<GetDockerRepositoryResult>
    function getDockerRepositoryOutput(args: GetDockerRepositoryOutputArgs, opts?: InvokeOptions): Output<GetDockerRepositoryResult>
    def get_docker_repository(id: Optional[str] = None,
                              name: Optional[str] = None,
                              namespace_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetDockerRepositoryResult
    def get_docker_repository_output(id: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              namespace_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetDockerRepositoryResult]
    func LookupDockerRepository(ctx *Context, args *LookupDockerRepositoryArgs, opts ...InvokeOption) (*LookupDockerRepositoryResult, error)
    func LookupDockerRepositoryOutput(ctx *Context, args *LookupDockerRepositoryOutputArgs, opts ...InvokeOption) LookupDockerRepositoryResultOutput

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

    public static class GetDockerRepository 
    {
        public static Task<GetDockerRepositoryResult> InvokeAsync(GetDockerRepositoryArgs args, InvokeOptions? opts = null)
        public static Output<GetDockerRepositoryResult> Invoke(GetDockerRepositoryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDockerRepositoryResult> getDockerRepository(GetDockerRepositoryArgs args, InvokeOptions options)
    public static Output<GetDockerRepositoryResult> getDockerRepository(GetDockerRepositoryArgs args, InvokeOptions options)
    
    fn::invoke:
      function: hsdp:index/getDockerRepository:getDockerRepository
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Filter users on verified email state
    NamespaceId string
    The organization users should belong to
    Id string
    Name string
    Filter users on verified email state
    NamespaceId string
    The organization users should belong to
    Id string
    name String
    Filter users on verified email state
    namespaceId String
    The organization users should belong to
    id String
    name string
    Filter users on verified email state
    namespaceId string
    The organization users should belong to
    id string
    name str
    Filter users on verified email state
    namespace_id str
    The organization users should belong to
    id str
    name String
    Filter users on verified email state
    namespaceId String
    The organization users should belong to
    id String

    getDockerRepository Result

    The following output properties are available:

    CompressedSizes List<double>
    The compressed size
    FullDescription string
    A longer description, supporting markdown
    FullName string
    The full name to use to pull and push images, includes Docker host and namespace
    Id string
    Ids List<double>
    The ids of the tags
    ImageDigests List<string>
    The SHA256 image digest
    ImageIds List<string>
    The image ids
    LatestTag string
    The latest tag, if available, based on the updated field
    Name string
    NamespaceId string
    NumPulls List<double>
    The pulls per tag
    ShortDescription string
    A short description of the repository
    Tags List<string>
    The list of tags names
    TotalPulls double
    The total number of pulls for this repo
    TotalTags double
    UpdatedAts List<string>
    The update timestamp
    CompressedSizes []float64
    The compressed size
    FullDescription string
    A longer description, supporting markdown
    FullName string
    The full name to use to pull and push images, includes Docker host and namespace
    Id string
    Ids []float64
    The ids of the tags
    ImageDigests []string
    The SHA256 image digest
    ImageIds []string
    The image ids
    LatestTag string
    The latest tag, if available, based on the updated field
    Name string
    NamespaceId string
    NumPulls []float64
    The pulls per tag
    ShortDescription string
    A short description of the repository
    Tags []string
    The list of tags names
    TotalPulls float64
    The total number of pulls for this repo
    TotalTags float64
    UpdatedAts []string
    The update timestamp
    compressedSizes List<Double>
    The compressed size
    fullDescription String
    A longer description, supporting markdown
    fullName String
    The full name to use to pull and push images, includes Docker host and namespace
    id String
    ids List<Double>
    The ids of the tags
    imageDigests List<String>
    The SHA256 image digest
    imageIds List<String>
    The image ids
    latestTag String
    The latest tag, if available, based on the updated field
    name String
    namespaceId String
    numPulls List<Double>
    The pulls per tag
    shortDescription String
    A short description of the repository
    tags List<String>
    The list of tags names
    totalPulls Double
    The total number of pulls for this repo
    totalTags Double
    updatedAts List<String>
    The update timestamp
    compressedSizes number[]
    The compressed size
    fullDescription string
    A longer description, supporting markdown
    fullName string
    The full name to use to pull and push images, includes Docker host and namespace
    id string
    ids number[]
    The ids of the tags
    imageDigests string[]
    The SHA256 image digest
    imageIds string[]
    The image ids
    latestTag string
    The latest tag, if available, based on the updated field
    name string
    namespaceId string
    numPulls number[]
    The pulls per tag
    shortDescription string
    A short description of the repository
    tags string[]
    The list of tags names
    totalPulls number
    The total number of pulls for this repo
    totalTags number
    updatedAts string[]
    The update timestamp
    compressed_sizes Sequence[float]
    The compressed size
    full_description str
    A longer description, supporting markdown
    full_name str
    The full name to use to pull and push images, includes Docker host and namespace
    id str
    ids Sequence[float]
    The ids of the tags
    image_digests Sequence[str]
    The SHA256 image digest
    image_ids Sequence[str]
    The image ids
    latest_tag str
    The latest tag, if available, based on the updated field
    name str
    namespace_id str
    num_pulls Sequence[float]
    The pulls per tag
    short_description str
    A short description of the repository
    tags Sequence[str]
    The list of tags names
    total_pulls float
    The total number of pulls for this repo
    total_tags float
    updated_ats Sequence[str]
    The update timestamp
    compressedSizes List<Number>
    The compressed size
    fullDescription String
    A longer description, supporting markdown
    fullName String
    The full name to use to pull and push images, includes Docker host and namespace
    id String
    ids List<Number>
    The ids of the tags
    imageDigests List<String>
    The SHA256 image digest
    imageIds List<String>
    The image ids
    latestTag String
    The latest tag, if available, based on the updated field
    name String
    namespaceId String
    numPulls List<Number>
    The pulls per tag
    shortDescription String
    A short description of the repository
    tags List<String>
    The list of tags names
    totalPulls Number
    The total number of pulls for this repo
    totalTags Number
    updatedAts List<String>
    The update timestamp

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software