1. Packages
  2. Digitalocean Provider
  3. API Docs
  4. getContainerRegistry
DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi

digitalocean.getContainerRegistry

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Get information on a container registry. This data source provides the name as configured on your DigitalOcean account. This is useful if the container registry name in question is not managed by this provider or you need validate if the container registry exists in the account.

    An error is triggered if the provided container registry name does not exist.

    Example Usage

    Basic Example

    Get the container registry:

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example = digitalocean.getContainerRegistry({
        name: "example",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example = digitalocean.get_container_registry(name="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.LookupContainerRegistry(ctx, &digitalocean.LookupContainerRegistryArgs{
    			Name: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example = DigitalOcean.GetContainerRegistry.Invoke(new()
        {
            Name = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DigitaloceanFunctions;
    import com.pulumi.digitalocean.inputs.GetContainerRegistryArgs;
    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 example = DigitaloceanFunctions.getContainerRegistry(GetContainerRegistryArgs.builder()
                .name("example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: digitalocean:getContainerRegistry
          Arguments:
            name: example
    

    Using getContainerRegistry

    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 getContainerRegistry(args: GetContainerRegistryArgs, opts?: InvokeOptions): Promise<GetContainerRegistryResult>
    function getContainerRegistryOutput(args: GetContainerRegistryOutputArgs, opts?: InvokeOptions): Output<GetContainerRegistryResult>
    def get_container_registry(name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetContainerRegistryResult
    def get_container_registry_output(name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetContainerRegistryResult]
    func LookupContainerRegistry(ctx *Context, args *LookupContainerRegistryArgs, opts ...InvokeOption) (*LookupContainerRegistryResult, error)
    func LookupContainerRegistryOutput(ctx *Context, args *LookupContainerRegistryOutputArgs, opts ...InvokeOption) LookupContainerRegistryResultOutput

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

    public static class GetContainerRegistry 
    {
        public static Task<GetContainerRegistryResult> InvokeAsync(GetContainerRegistryArgs args, InvokeOptions? opts = null)
        public static Output<GetContainerRegistryResult> Invoke(GetContainerRegistryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContainerRegistryResult> getContainerRegistry(GetContainerRegistryArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: digitalocean:index/getContainerRegistry:getContainerRegistry
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the container registry.
    Name string
    The name of the container registry.
    name String
    The name of the container registry.
    name string
    The name of the container registry.
    name str
    The name of the container registry.
    name String
    The name of the container registry.

    getContainerRegistry Result

    The following output properties are available:

    CreatedAt string
    The date and time when the registry was created
    Endpoint string
    The URL endpoint of the container registry. Ex: registry.digitalocean.com/my_registry
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the container registry
    Region string
    The slug identifier for the region
    ServerUrl string
    The domain of the container registry. Ex: registry.digitalocean.com
    StorageUsageBytes int
    The amount of storage used in the registry in bytes.
    SubscriptionTierSlug string
    The slug identifier for the subscription tier
    CreatedAt string
    The date and time when the registry was created
    Endpoint string
    The URL endpoint of the container registry. Ex: registry.digitalocean.com/my_registry
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the container registry
    Region string
    The slug identifier for the region
    ServerUrl string
    The domain of the container registry. Ex: registry.digitalocean.com
    StorageUsageBytes int
    The amount of storage used in the registry in bytes.
    SubscriptionTierSlug string
    The slug identifier for the subscription tier
    createdAt String
    The date and time when the registry was created
    endpoint String
    The URL endpoint of the container registry. Ex: registry.digitalocean.com/my_registry
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the container registry
    region String
    The slug identifier for the region
    serverUrl String
    The domain of the container registry. Ex: registry.digitalocean.com
    storageUsageBytes Integer
    The amount of storage used in the registry in bytes.
    subscriptionTierSlug String
    The slug identifier for the subscription tier
    createdAt string
    The date and time when the registry was created
    endpoint string
    The URL endpoint of the container registry. Ex: registry.digitalocean.com/my_registry
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the container registry
    region string
    The slug identifier for the region
    serverUrl string
    The domain of the container registry. Ex: registry.digitalocean.com
    storageUsageBytes number
    The amount of storage used in the registry in bytes.
    subscriptionTierSlug string
    The slug identifier for the subscription tier
    created_at str
    The date and time when the registry was created
    endpoint str
    The URL endpoint of the container registry. Ex: registry.digitalocean.com/my_registry
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the container registry
    region str
    The slug identifier for the region
    server_url str
    The domain of the container registry. Ex: registry.digitalocean.com
    storage_usage_bytes int
    The amount of storage used in the registry in bytes.
    subscription_tier_slug str
    The slug identifier for the subscription tier
    createdAt String
    The date and time when the registry was created
    endpoint String
    The URL endpoint of the container registry. Ex: registry.digitalocean.com/my_registry
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the container registry
    region String
    The slug identifier for the region
    serverUrl String
    The domain of the container registry. Ex: registry.digitalocean.com
    storageUsageBytes Number
    The amount of storage used in the registry in bytes.
    subscriptionTierSlug String
    The slug identifier for the subscription tier

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.35.0 published on Tuesday, Nov 19, 2024 by Pulumi