ionoscloud.creg.getRegistry
Explore with Pulumi AI
The Container Registry data source can be used to search for and return an existing Container Registry. You can provide a string for the name parameter which will be compared with provisioned Container Registry. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search and make sure that your resources have unique names.
Example Usage
By Id
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.creg.getRegistry({
id: "registry_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.creg.get_registry(id="registry_id")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/creg"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := creg.LookupRegistry(ctx, &creg.LookupRegistryArgs{
Id: pulumi.StringRef("registry_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Creg.GetRegistry.Invoke(new()
{
Id = "registry_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.creg.CregFunctions;
import com.pulumi.ionoscloud.creg.inputs.GetRegistryArgs;
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 = CregFunctions.getRegistry(GetRegistryArgs.builder()
.id("registry_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:creg:getRegistry
arguments:
id: registry_id
By Name
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.creg.getRegistry({
name: "container-registry-example",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.creg.get_registry(name="container-registry-example")
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/creg"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := creg.LookupRegistry(ctx, &creg.LookupRegistryArgs{
Name: pulumi.StringRef("container-registry-example"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Creg.GetRegistry.Invoke(new()
{
Name = "container-registry-example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.creg.CregFunctions;
import com.pulumi.ionoscloud.creg.inputs.GetRegistryArgs;
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 = CregFunctions.getRegistry(GetRegistryArgs.builder()
.name("container-registry-example")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:creg:getRegistry
arguments:
name: container-registry-example
By Name with Partial Match
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.creg.getRegistry({
name: "-example",
partialMatch: true,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.creg.get_registry(name="-example",
partial_match=True)
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/creg"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := creg.LookupRegistry(ctx, &creg.LookupRegistryArgs{
Name: pulumi.StringRef("-example"),
PartialMatch: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.Creg.GetRegistry.Invoke(new()
{
Name = "-example",
PartialMatch = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.creg.CregFunctions;
import com.pulumi.ionoscloud.creg.inputs.GetRegistryArgs;
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 = CregFunctions.getRegistry(GetRegistryArgs.builder()
.name("-example")
.partialMatch(true)
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:creg:getRegistry
arguments:
name: -example
partialMatch: true
Using getRegistry
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 getRegistry(args: GetRegistryArgs, opts?: InvokeOptions): Promise<GetRegistryResult>
function getRegistryOutput(args: GetRegistryOutputArgs, opts?: InvokeOptions): Output<GetRegistryResult>
def get_registry(id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
partial_match: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetRegistryResult
def get_registry_output(id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
partial_match: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRegistryResult]
func LookupRegistry(ctx *Context, args *LookupRegistryArgs, opts ...InvokeOption) (*LookupRegistryResult, error)
func LookupRegistryOutput(ctx *Context, args *LookupRegistryOutputArgs, opts ...InvokeOption) LookupRegistryResultOutput
> Note: This function is named LookupRegistry
in the Go SDK.
public static class GetRegistry
{
public static Task<GetRegistryResult> InvokeAsync(GetRegistryArgs args, InvokeOptions? opts = null)
public static Output<GetRegistryResult> Invoke(GetRegistryInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRegistryResult> getRegistry(GetRegistryArgs args, InvokeOptions options)
public static Output<GetRegistryResult> getRegistry(GetRegistryArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:creg/getRegistry:getRegistry
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- ID of the container registry you want to search for.
- Location string
- Name string
- Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- Id string
- ID of the container registry you want to search for.
- Location string
- Name string
- Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - Partial
Match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- id String
- ID of the container registry you want to search for.
- location String
- name String
- Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- id string
- ID of the container registry you want to search for.
- location string
- name string
- Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- id str
- ID of the container registry you want to search for.
- location str
- name str
- Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial_
match bool Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
- id String
- ID of the container registry you want to search for.
- location String
- name String
- Name of an existing container registry that you want to search for. Search by name is case-insensitive. The whole resource name is required if
partial_match
parameter is not set to true. - partial
Match Boolean Whether partial matching is allowed or not when using name argument. Default value is false.
Either
name
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.
getRegistry Result
The following output properties are available:
- Api
Subnet List<string>Allow Lists - The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
- Features
List<Ionoscloud.
Get Registry Feature> - Garbage
Collection List<Ionoscloud.Schedules Get Registry Garbage Collection Schedule> - Hostname string
- Id string
- Id of the container registry.
- Maintenance
Windows List<Ionoscloud.Get Registry Maintenance Window> - Name string
- The name of the container registry.
- Storage
Usages List<Ionoscloud.Get Registry Storage Usage> - Location string
- Partial
Match bool
- Api
Subnet []stringAllow Lists - The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
- Features
[]Get
Registry Feature - Garbage
Collection []GetSchedules Registry Garbage Collection Schedule - Hostname string
- Id string
- Id of the container registry.
- Maintenance
Windows []GetRegistry Maintenance Window - Name string
- The name of the container registry.
- Storage
Usages []GetRegistry Storage Usage - Location string
- Partial
Match bool
- api
Subnet List<String>Allow Lists - The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
- features
List<Get
Registry Feature> - garbage
Collection List<GetSchedules Registry Garbage Collection Schedule> - hostname String
- id String
- Id of the container registry.
- maintenance
Windows List<GetRegistry Maintenance Window> - name String
- The name of the container registry.
- storage
Usages List<GetRegistry Storage Usage> - location String
- partial
Match Boolean
- api
Subnet string[]Allow Lists - The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
- features
Get
Registry Feature[] - garbage
Collection GetSchedules Registry Garbage Collection Schedule[] - hostname string
- id string
- Id of the container registry.
- maintenance
Windows GetRegistry Maintenance Window[] - name string
- The name of the container registry.
- storage
Usages GetRegistry Storage Usage[] - location string
- partial
Match boolean
- api_
subnet_ Sequence[str]allow_ lists - The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
- features
Sequence[Get
Registry Feature] - garbage_
collection_ Sequence[Getschedules Registry Garbage Collection Schedule] - hostname str
- id str
- Id of the container registry.
- maintenance_
windows Sequence[GetRegistry Maintenance Window] - name str
- The name of the container registry.
- storage_
usages Sequence[GetRegistry Storage Usage] - location str
- partial_
match bool
- api
Subnet List<String>Allow Lists - The subnet CIDRs that are allowed to connect to the registry. Specify "a.b.c.d/32" for an individual IP address. Note: If this list is empty or not set, there are no restrictions.
- features List<Property Map>
- garbage
Collection List<Property Map>Schedules - hostname String
- id String
- Id of the container registry.
- maintenance
Windows List<Property Map> - name String
- The name of the container registry.
- storage
Usages List<Property Map> - location String
- partial
Match Boolean
Supporting Types
GetRegistryFeature
- vulnerability
Scanning Boolean
- vulnerability
Scanning boolean
- vulnerability
Scanning Boolean
GetRegistryGarbageCollectionSchedule
GetRegistryMaintenanceWindow
GetRegistryStorageUsage
- bytes int
- updated_
at str
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.