1. Packages
  2. Yandex
  3. API Docs
  4. ContainerRegistry
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.ContainerRegistry

Explore with Pulumi AI

Creates a new container registry. For more information, see the official documentation

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new Yandex.ContainerRegistry("default", new Yandex.ContainerRegistryArgs
        {
            FolderId = "test_folder_id",
            Labels = 
            {
                { "my-label", "my-label-value" },
            },
        });
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewContainerRegistry(ctx, "default", &yandex.ContainerRegistryArgs{
			FolderId: pulumi.String("test_folder_id"),
			Labels: pulumi.StringMap{
				"my-label": pulumi.String("my-label-value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const defaultContainerRegistry = new yandex.ContainerRegistry("default", {
    folderId: "test_folder_id",
    labels: {
        "my-label": "my-label-value",
    },
});
Copy
import pulumi
import pulumi_yandex as yandex

default = yandex.ContainerRegistry("default",
    folder_id="test_folder_id",
    labels={
        "my-label": "my-label-value",
    })
Copy

Coming soon!

Create ContainerRegistry Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ContainerRegistry(name: string, args?: ContainerRegistryArgs, opts?: CustomResourceOptions);
@overload
def ContainerRegistry(resource_name: str,
                      args: Optional[ContainerRegistryArgs] = None,
                      opts: Optional[ResourceOptions] = None)

@overload
def ContainerRegistry(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      folder_id: Optional[str] = None,
                      labels: Optional[Mapping[str, str]] = None,
                      name: Optional[str] = None)
func NewContainerRegistry(ctx *Context, name string, args *ContainerRegistryArgs, opts ...ResourceOption) (*ContainerRegistry, error)
public ContainerRegistry(string name, ContainerRegistryArgs? args = null, CustomResourceOptions? opts = null)
public ContainerRegistry(String name, ContainerRegistryArgs args)
public ContainerRegistry(String name, ContainerRegistryArgs args, CustomResourceOptions options)
type: yandex:ContainerRegistry
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ContainerRegistryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ContainerRegistryArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ContainerRegistryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ContainerRegistryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ContainerRegistryArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var containerRegistryResource = new Yandex.ContainerRegistry("containerRegistryResource", new()
{
    FolderId = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Name = "string",
});
Copy
example, err := yandex.NewContainerRegistry(ctx, "containerRegistryResource", &yandex.ContainerRegistryArgs{
	FolderId: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
})
Copy
var containerRegistryResource = new ContainerRegistry("containerRegistryResource", ContainerRegistryArgs.builder()
    .folderId("string")
    .labels(Map.of("string", "string"))
    .name("string")
    .build());
Copy
container_registry_resource = yandex.ContainerRegistry("containerRegistryResource",
    folder_id="string",
    labels={
        "string": "string",
    },
    name="string")
Copy
const containerRegistryResource = new yandex.ContainerRegistry("containerRegistryResource", {
    folderId: "string",
    labels: {
        string: "string",
    },
    name: "string",
});
Copy
type: yandex:ContainerRegistry
properties:
    folderId: string
    labels:
        string: string
    name: string
Copy

ContainerRegistry Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ContainerRegistry resource accepts the following input properties:

FolderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
Labels Dictionary<string, string>
A set of key/value label pairs to assign to the registry.
Name string
A name of the registry.
FolderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
Labels map[string]string
A set of key/value label pairs to assign to the registry.
Name string
A name of the registry.
folderId String
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels Map<String,String>
A set of key/value label pairs to assign to the registry.
name String
A name of the registry.
folderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels {[key: string]: string}
A set of key/value label pairs to assign to the registry.
name string
A name of the registry.
folder_id str
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels Mapping[str, str]
A set of key/value label pairs to assign to the registry.
name str
A name of the registry.
folderId String
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels Map<String>
A set of key/value label pairs to assign to the registry.
name String
A name of the registry.

Outputs

All input properties are implicitly available as output properties. Additionally, the ContainerRegistry resource produces the following output properties:

CreatedAt string
Creation timestamp of the registry.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Status of the registry.
CreatedAt string
Creation timestamp of the registry.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Status of the registry.
createdAt String
Creation timestamp of the registry.
id String
The provider-assigned unique ID for this managed resource.
status String
Status of the registry.
createdAt string
Creation timestamp of the registry.
id string
The provider-assigned unique ID for this managed resource.
status string
Status of the registry.
created_at str
Creation timestamp of the registry.
id str
The provider-assigned unique ID for this managed resource.
status str
Status of the registry.
createdAt String
Creation timestamp of the registry.
id String
The provider-assigned unique ID for this managed resource.
status String
Status of the registry.

Look up Existing ContainerRegistry Resource

Get an existing ContainerRegistry resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ContainerRegistryState, opts?: CustomResourceOptions): ContainerRegistry
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        folder_id: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        status: Optional[str] = None) -> ContainerRegistry
func GetContainerRegistry(ctx *Context, name string, id IDInput, state *ContainerRegistryState, opts ...ResourceOption) (*ContainerRegistry, error)
public static ContainerRegistry Get(string name, Input<string> id, ContainerRegistryState? state, CustomResourceOptions? opts = null)
public static ContainerRegistry get(String name, Output<String> id, ContainerRegistryState state, CustomResourceOptions options)
resources:  _:    type: yandex:ContainerRegistry    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreatedAt string
Creation timestamp of the registry.
FolderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
Labels Dictionary<string, string>
A set of key/value label pairs to assign to the registry.
Name string
A name of the registry.
Status string
Status of the registry.
CreatedAt string
Creation timestamp of the registry.
FolderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
Labels map[string]string
A set of key/value label pairs to assign to the registry.
Name string
A name of the registry.
Status string
Status of the registry.
createdAt String
Creation timestamp of the registry.
folderId String
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels Map<String,String>
A set of key/value label pairs to assign to the registry.
name String
A name of the registry.
status String
Status of the registry.
createdAt string
Creation timestamp of the registry.
folderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels {[key: string]: string}
A set of key/value label pairs to assign to the registry.
name string
A name of the registry.
status string
Status of the registry.
created_at str
Creation timestamp of the registry.
folder_id str
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels Mapping[str, str]
A set of key/value label pairs to assign to the registry.
name str
A name of the registry.
status str
Status of the registry.
createdAt String
Creation timestamp of the registry.
folderId String
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
labels Map<String>
A set of key/value label pairs to assign to the registry.
name String
A name of the registry.
status String
Status of the registry.

Import

A registry can be imported using the id of the resource, e.g.

 $ pulumi import yandex:index/containerRegistry:ContainerRegistry default registry_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Yandex pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.