Module cr

This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-alicloud repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-alicloud repo.

Resources

Functions

Others

Resources

Resource Namespace

class Namespace extends CustomResource

This resource will help you to manager Container Registry namespaces.

NOTE: Available in v1.34.0+.

NOTE: You need to set your registry password in Container Registry console before use this resource.

Example Usage

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

const myNamespace = new alicloud.cr.Namespace("my-namespace", {
    autoCreate: false,
    defaultVisibility: "PUBLIC",
});

constructor

new Namespace(name: string, args: NamespaceArgs, opts?: pulumi.CustomResourceOptions)

Create a Namespace resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NamespaceState, opts?: pulumi.CustomResourceOptions): Namespace

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Namespace

Returns true if the given object is an instance of Namespace. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoCreate

public autoCreate: pulumi.Output<boolean>;

Boolean, when it set to true, repositories are automatically created when pushing new images. If it set to false, you create repository for images before pushing.

property defaultVisibility

public defaultVisibility: pulumi.Output<string>;

PUBLIC or PRIVATE, default repository visibility in this namespace.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

Name of Container Registry namespace.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Repo

class Repo extends CustomResource

This resource will help you to manager Container Registry repositories.

NOTE: Available in v1.35.0+.

NOTE: You need to set your registry password in Container Registry console before use this resource.

Example Usage

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

const myNamespace = new alicloud.cr.Namespace("my-namespace", {
    autoCreate: false,
    defaultVisibility: "PUBLIC",
});
const myRepo = new alicloud.cr.Repo("my-repo", {
    detail: "this is a public repo",
    namespace: my_namespace.name,
    repoType: "PUBLIC",
    summary: "this is summary of my new repo",
});

constructor

new Repo(name: string, args: RepoArgs, opts?: pulumi.CustomResourceOptions)

Create a Repo resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepoState, opts?: pulumi.CustomResourceOptions): Repo

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Repo

Returns true if the given object is an instance of Repo. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property detail

public detail: pulumi.Output<string | undefined>;

The repository specific information. MarkDown format is supported, and the length limit is 2000.

property domainList

public domainList: pulumi.Output<RepoDomainList>;

The repository domain list.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

Name of container registry repository.

property namespace

public namespace: pulumi.Output<string>;

Name of container registry namespace where repository is located.

property repoType

public repoType: pulumi.Output<string>;

PUBLIC or PRIVATE, repo’s visibility.

property summary

public summary: pulumi.Output<string>;

The repository general information. It can contain 1 to 80 characters.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Functions

Function getNamespaces

getNamespaces(args?: GetNamespacesArgs, opts?: pulumi.InvokeOptions): Promise<GetNamespacesResult>

This data source provides a list Container Registry namespaces on Alibaba Cloud.

NOTE: Available in v1.35.0+

Example Usage

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

// Declare the data source
const myNamespaces = pulumi.output(alicloud.cr.getNamespaces({
    nameRegex: "my-namespace",
    outputFile: "my-namespace-json",
}, { async: true }));

export const output = myNamespaces.namespaces;

Function getRepos

getRepos(args?: GetReposArgs, opts?: pulumi.InvokeOptions): Promise<GetReposResult>

This data source provides a list Container Registry repositories on Alibaba Cloud.

NOTE: Available in v1.35.0+

Example Usage

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

// Declare the data source
const myRepos = pulumi.output(alicloud.cr.getRepos({
    nameRegex: "my-repos",
    outputFile: "my-repo-json",
}, { async: true }));

export const output = myRepos.repos;

Others

interface GetNamespacesArgs

interface GetNamespacesArgs

A collection of arguments for invoking getNamespaces.

property nameRegex

nameRegex?: undefined | string;

A regex string to filter results by namespace name.

property outputFile

outputFile?: undefined | string;

interface GetNamespacesResult

interface GetNamespacesResult

A collection of values returned by getNamespaces.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of matched Container Registry namespaces. Its element is a namespace name.

property nameRegex

nameRegex?: undefined | string;

property names

names: string[];

A list of namespace names.

property namespaces

namespaces: GetNamespacesNamespace[];

A list of matched Container Registry namespaces. Each element contains the following attributes:

property outputFile

outputFile?: undefined | string;

interface GetReposArgs

interface GetReposArgs

A collection of arguments for invoking getRepos.

property enableDetails

enableDetails?: undefined | false | true;

Boolean, false by default, only repository attributes are exported. Set to true if domain list and tags belong to this repository are needed. See tags in attributes.

property nameRegex

nameRegex?: undefined | string;

A regex string to filter results by repository name.

property namespace

namespace?: undefined | string;

Name of container registry namespace where the repositories are located in.

property outputFile

outputFile?: undefined | string;

interface GetReposResult

interface GetReposResult

A collection of values returned by getRepos.

property enableDetails

enableDetails?: undefined | false | true;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ids

ids: string[];

A list of matched Container Registry Repositories. Its element is set to names.

property nameRegex

nameRegex?: undefined | string;

property names

names: string[];

A list of repository names.

property namespace

namespace?: undefined | string;

Name of container registry namespace where repo is located.

property outputFile

outputFile?: undefined | string;

property repos

repos: GetReposRepo[];

A list of matched Container Registry Namespaces. Each element contains the following attributes:

interface NamespaceArgs

interface NamespaceArgs

The set of arguments for constructing a Namespace resource.

property autoCreate

autoCreate: pulumi.Input<boolean>;

Boolean, when it set to true, repositories are automatically created when pushing new images. If it set to false, you create repository for images before pushing.

property defaultVisibility

defaultVisibility: pulumi.Input<string>;

PUBLIC or PRIVATE, default repository visibility in this namespace.

property name

name?: pulumi.Input<string>;

Name of Container Registry namespace.

interface NamespaceState

interface NamespaceState

Input properties used for looking up and filtering Namespace resources.

property autoCreate

autoCreate?: pulumi.Input<boolean>;

Boolean, when it set to true, repositories are automatically created when pushing new images. If it set to false, you create repository for images before pushing.

property defaultVisibility

defaultVisibility?: pulumi.Input<string>;

PUBLIC or PRIVATE, default repository visibility in this namespace.

property name

name?: pulumi.Input<string>;

Name of Container Registry namespace.

interface RepoArgs

interface RepoArgs

The set of arguments for constructing a Repo resource.

property detail

detail?: pulumi.Input<string>;

The repository specific information. MarkDown format is supported, and the length limit is 2000.

property name

name?: pulumi.Input<string>;

Name of container registry repository.

property namespace

namespace: pulumi.Input<string>;

Name of container registry namespace where repository is located.

property repoType

repoType: pulumi.Input<string>;

PUBLIC or PRIVATE, repo’s visibility.

property summary

summary: pulumi.Input<string>;

The repository general information. It can contain 1 to 80 characters.

interface RepoState

interface RepoState

Input properties used for looking up and filtering Repo resources.

property detail

detail?: pulumi.Input<string>;

The repository specific information. MarkDown format is supported, and the length limit is 2000.

property domainList

domainList?: pulumi.Input<RepoDomainList>;

The repository domain list.

property name

name?: pulumi.Input<string>;

Name of container registry repository.

property namespace

namespace?: pulumi.Input<string>;

Name of container registry namespace where repository is located.

property repoType

repoType?: pulumi.Input<string>;

PUBLIC or PRIVATE, repo’s visibility.

property summary

summary?: pulumi.Input<string>;

The repository general information. It can contain 1 to 80 characters.