digitalocean.getContainerRegistry
Explore with Pulumi AI
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:
- Created
At 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
- Server
Url string - The domain of the container registry. Ex:
registry.digitalocean.com
- Storage
Usage intBytes - The amount of storage used in the registry in bytes.
- Subscription
Tier stringSlug - The slug identifier for the subscription tier
- Created
At 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
- Server
Url string - The domain of the container registry. Ex:
registry.digitalocean.com
- Storage
Usage intBytes - The amount of storage used in the registry in bytes.
- Subscription
Tier stringSlug - The slug identifier for the subscription tier
- created
At 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
- server
Url String - The domain of the container registry. Ex:
registry.digitalocean.com
- storage
Usage IntegerBytes - The amount of storage used in the registry in bytes.
- subscription
Tier StringSlug - The slug identifier for the subscription tier
- created
At 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
- server
Url string - The domain of the container registry. Ex:
registry.digitalocean.com
- storage
Usage numberBytes - The amount of storage used in the registry in bytes.
- subscription
Tier stringSlug - 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_ intbytes - The amount of storage used in the registry in bytes.
- subscription_
tier_ strslug - The slug identifier for the subscription tier
- created
At 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
- server
Url String - The domain of the container registry. Ex:
registry.digitalocean.com
- storage
Usage NumberBytes - The amount of storage used in the registry in bytes.
- subscription
Tier StringSlug - 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.