alicloud.cs.RegistryEnterpriseRepo
Explore with Pulumi AI
This resource will help you to manager Container Registry Enterprise Edition repositories.
For information about Container Registry Enterprise Edition repository and how to use it, see Create a Repository
NOTE: Available since v1.86.0.
NOTE: You need to set your registry password in Container Registry Enterprise Edition console before use this resource.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const example = new alicloud.cr.RegistryEnterpriseInstance("example", {
paymentType: "Subscription",
period: 1,
renewPeriod: 0,
renewalStatus: "ManualRenewal",
instanceType: "Advanced",
instanceName: name,
});
const exampleRegistryEnterpriseNamespace = new alicloud.cs.RegistryEnterpriseNamespace("example", {
instanceId: example.id,
name: name,
autoCreate: false,
defaultVisibility: "PUBLIC",
});
const exampleRegistryEnterpriseRepo = new alicloud.cs.RegistryEnterpriseRepo("example", {
instanceId: example.id,
namespace: exampleRegistryEnterpriseNamespace.name,
name: name,
summary: "this is summary of my new repo",
repoType: "PUBLIC",
detail: "this is a public repo",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
example = alicloud.cr.RegistryEnterpriseInstance("example",
payment_type="Subscription",
period=1,
renew_period=0,
renewal_status="ManualRenewal",
instance_type="Advanced",
instance_name=name)
example_registry_enterprise_namespace = alicloud.cs.RegistryEnterpriseNamespace("example",
instance_id=example.id,
name=name,
auto_create=False,
default_visibility="PUBLIC")
example_registry_enterprise_repo = alicloud.cs.RegistryEnterpriseRepo("example",
instance_id=example.id,
namespace=example_registry_enterprise_namespace.name,
name=name,
summary="this is summary of my new repo",
repo_type="PUBLIC",
detail="this is a public repo")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
example, err := cr.NewRegistryEnterpriseInstance(ctx, "example", &cr.RegistryEnterpriseInstanceArgs{
PaymentType: pulumi.String("Subscription"),
Period: pulumi.Int(1),
RenewPeriod: pulumi.Int(0),
RenewalStatus: pulumi.String("ManualRenewal"),
InstanceType: pulumi.String("Advanced"),
InstanceName: pulumi.String(name),
})
if err != nil {
return err
}
exampleRegistryEnterpriseNamespace, err := cs.NewRegistryEnterpriseNamespace(ctx, "example", &cs.RegistryEnterpriseNamespaceArgs{
InstanceId: example.ID(),
Name: pulumi.String(name),
AutoCreate: pulumi.Bool(false),
DefaultVisibility: pulumi.String("PUBLIC"),
})
if err != nil {
return err
}
_, err = cs.NewRegistryEnterpriseRepo(ctx, "example", &cs.RegistryEnterpriseRepoArgs{
InstanceId: example.ID(),
Namespace: exampleRegistryEnterpriseNamespace.Name,
Name: pulumi.String(name),
Summary: pulumi.String("this is summary of my new repo"),
RepoType: pulumi.String("PUBLIC"),
Detail: pulumi.String("this is a public repo"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var example = new AliCloud.CR.RegistryEnterpriseInstance("example", new()
{
PaymentType = "Subscription",
Period = 1,
RenewPeriod = 0,
RenewalStatus = "ManualRenewal",
InstanceType = "Advanced",
InstanceName = name,
});
var exampleRegistryEnterpriseNamespace = new AliCloud.CS.RegistryEnterpriseNamespace("example", new()
{
InstanceId = example.Id,
Name = name,
AutoCreate = false,
DefaultVisibility = "PUBLIC",
});
var exampleRegistryEnterpriseRepo = new AliCloud.CS.RegistryEnterpriseRepo("example", new()
{
InstanceId = example.Id,
Namespace = exampleRegistryEnterpriseNamespace.Name,
Name = name,
Summary = "this is summary of my new repo",
RepoType = "PUBLIC",
Detail = "this is a public repo",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cr.RegistryEnterpriseInstance;
import com.pulumi.alicloud.cr.RegistryEnterpriseInstanceArgs;
import com.pulumi.alicloud.cs.RegistryEnterpriseNamespace;
import com.pulumi.alicloud.cs.RegistryEnterpriseNamespaceArgs;
import com.pulumi.alicloud.cs.RegistryEnterpriseRepo;
import com.pulumi.alicloud.cs.RegistryEnterpriseRepoArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var example = new RegistryEnterpriseInstance("example", RegistryEnterpriseInstanceArgs.builder()
.paymentType("Subscription")
.period(1)
.renewPeriod(0)
.renewalStatus("ManualRenewal")
.instanceType("Advanced")
.instanceName(name)
.build());
var exampleRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("exampleRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
.instanceId(example.id())
.name(name)
.autoCreate(false)
.defaultVisibility("PUBLIC")
.build());
var exampleRegistryEnterpriseRepo = new RegistryEnterpriseRepo("exampleRegistryEnterpriseRepo", RegistryEnterpriseRepoArgs.builder()
.instanceId(example.id())
.namespace(exampleRegistryEnterpriseNamespace.name())
.name(name)
.summary("this is summary of my new repo")
.repoType("PUBLIC")
.detail("this is a public repo")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
example:
type: alicloud:cr:RegistryEnterpriseInstance
properties:
paymentType: Subscription
period: 1
renewPeriod: 0
renewalStatus: ManualRenewal
instanceType: Advanced
instanceName: ${name}
exampleRegistryEnterpriseNamespace:
type: alicloud:cs:RegistryEnterpriseNamespace
name: example
properties:
instanceId: ${example.id}
name: ${name}
autoCreate: false
defaultVisibility: PUBLIC
exampleRegistryEnterpriseRepo:
type: alicloud:cs:RegistryEnterpriseRepo
name: example
properties:
instanceId: ${example.id}
namespace: ${exampleRegistryEnterpriseNamespace.name}
name: ${name}
summary: this is summary of my new repo
repoType: PUBLIC
detail: this is a public repo
Create RegistryEnterpriseRepo Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RegistryEnterpriseRepo(name: string, args: RegistryEnterpriseRepoArgs, opts?: CustomResourceOptions);
@overload
def RegistryEnterpriseRepo(resource_name: str,
args: RegistryEnterpriseRepoArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RegistryEnterpriseRepo(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
namespace: Optional[str] = None,
repo_type: Optional[str] = None,
summary: Optional[str] = None,
detail: Optional[str] = None,
name: Optional[str] = None)
func NewRegistryEnterpriseRepo(ctx *Context, name string, args RegistryEnterpriseRepoArgs, opts ...ResourceOption) (*RegistryEnterpriseRepo, error)
public RegistryEnterpriseRepo(string name, RegistryEnterpriseRepoArgs args, CustomResourceOptions? opts = null)
public RegistryEnterpriseRepo(String name, RegistryEnterpriseRepoArgs args)
public RegistryEnterpriseRepo(String name, RegistryEnterpriseRepoArgs args, CustomResourceOptions options)
type: alicloud:cs:RegistryEnterpriseRepo
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RegistryEnterpriseRepoArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RegistryEnterpriseRepoArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RegistryEnterpriseRepoArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegistryEnterpriseRepoArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegistryEnterpriseRepoArgs
- 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 registryEnterpriseRepoResource = new AliCloud.CS.RegistryEnterpriseRepo("registryEnterpriseRepoResource", new()
{
InstanceId = "string",
Namespace = "string",
RepoType = "string",
Summary = "string",
Detail = "string",
Name = "string",
});
example, err := cs.NewRegistryEnterpriseRepo(ctx, "registryEnterpriseRepoResource", &cs.RegistryEnterpriseRepoArgs{
InstanceId: pulumi.String("string"),
Namespace: pulumi.String("string"),
RepoType: pulumi.String("string"),
Summary: pulumi.String("string"),
Detail: pulumi.String("string"),
Name: pulumi.String("string"),
})
var registryEnterpriseRepoResource = new RegistryEnterpriseRepo("registryEnterpriseRepoResource", RegistryEnterpriseRepoArgs.builder()
.instanceId("string")
.namespace("string")
.repoType("string")
.summary("string")
.detail("string")
.name("string")
.build());
registry_enterprise_repo_resource = alicloud.cs.RegistryEnterpriseRepo("registryEnterpriseRepoResource",
instance_id="string",
namespace="string",
repo_type="string",
summary="string",
detail="string",
name="string")
const registryEnterpriseRepoResource = new alicloud.cs.RegistryEnterpriseRepo("registryEnterpriseRepoResource", {
instanceId: "string",
namespace: "string",
repoType: "string",
summary: "string",
detail: "string",
name: "string",
});
type: alicloud:cs:RegistryEnterpriseRepo
properties:
detail: string
instanceId: string
name: string
namespace: string
repoType: string
summary: string
RegistryEnterpriseRepo Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The RegistryEnterpriseRepo resource accepts the following input properties:
- Instance
Id string - ID of Container Registry Enterprise Edition instance.
- Namespace string
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- Repo
Type string PUBLIC
orPRIVATE
, repo's visibility.- Summary string
- The repository general information. It can contain 1 to 100 characters.
- Detail string
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- Name string
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- Instance
Id string - ID of Container Registry Enterprise Edition instance.
- Namespace string
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- Repo
Type string PUBLIC
orPRIVATE
, repo's visibility.- Summary string
- The repository general information. It can contain 1 to 100 characters.
- Detail string
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- Name string
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- instance
Id String - ID of Container Registry Enterprise Edition instance.
- namespace String
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo
Type String PUBLIC
orPRIVATE
, repo's visibility.- summary String
- The repository general information. It can contain 1 to 100 characters.
- detail String
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- name String
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- instance
Id string - ID of Container Registry Enterprise Edition instance.
- namespace string
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo
Type string PUBLIC
orPRIVATE
, repo's visibility.- summary string
- The repository general information. It can contain 1 to 100 characters.
- detail string
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- name string
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- instance_
id str - ID of Container Registry Enterprise Edition instance.
- namespace str
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo_
type str PUBLIC
orPRIVATE
, repo's visibility.- summary str
- The repository general information. It can contain 1 to 100 characters.
- detail str
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- name str
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- instance
Id String - ID of Container Registry Enterprise Edition instance.
- namespace String
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo
Type String PUBLIC
orPRIVATE
, repo's visibility.- summary String
- The repository general information. It can contain 1 to 100 characters.
- detail String
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- name String
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
Outputs
All input properties are implicitly available as output properties. Additionally, the RegistryEnterpriseRepo resource produces the following output properties:
Look up Existing RegistryEnterpriseRepo Resource
Get an existing RegistryEnterpriseRepo 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?: RegistryEnterpriseRepoState, opts?: CustomResourceOptions): RegistryEnterpriseRepo
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
detail: Optional[str] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
repo_id: Optional[str] = None,
repo_type: Optional[str] = None,
summary: Optional[str] = None) -> RegistryEnterpriseRepo
func GetRegistryEnterpriseRepo(ctx *Context, name string, id IDInput, state *RegistryEnterpriseRepoState, opts ...ResourceOption) (*RegistryEnterpriseRepo, error)
public static RegistryEnterpriseRepo Get(string name, Input<string> id, RegistryEnterpriseRepoState? state, CustomResourceOptions? opts = null)
public static RegistryEnterpriseRepo get(String name, Output<String> id, RegistryEnterpriseRepoState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Detail string
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- Instance
Id string - ID of Container Registry Enterprise Edition instance.
- Name string
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- Namespace string
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- Repo
Id string - The uuid of Container Registry Enterprise Edition repository.
- Repo
Type string PUBLIC
orPRIVATE
, repo's visibility.- Summary string
- The repository general information. It can contain 1 to 100 characters.
- Detail string
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- Instance
Id string - ID of Container Registry Enterprise Edition instance.
- Name string
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- Namespace string
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- Repo
Id string - The uuid of Container Registry Enterprise Edition repository.
- Repo
Type string PUBLIC
orPRIVATE
, repo's visibility.- Summary string
- The repository general information. It can contain 1 to 100 characters.
- detail String
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- instance
Id String - ID of Container Registry Enterprise Edition instance.
- name String
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- namespace String
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo
Id String - The uuid of Container Registry Enterprise Edition repository.
- repo
Type String PUBLIC
orPRIVATE
, repo's visibility.- summary String
- The repository general information. It can contain 1 to 100 characters.
- detail string
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- instance
Id string - ID of Container Registry Enterprise Edition instance.
- name string
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- namespace string
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo
Id string - The uuid of Container Registry Enterprise Edition repository.
- repo
Type string PUBLIC
orPRIVATE
, repo's visibility.- summary string
- The repository general information. It can contain 1 to 100 characters.
- detail str
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- instance_
id str - ID of Container Registry Enterprise Edition instance.
- name str
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- namespace str
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo_
id str - The uuid of Container Registry Enterprise Edition repository.
- repo_
type str PUBLIC
orPRIVATE
, repo's visibility.- summary str
- The repository general information. It can contain 1 to 100 characters.
- detail String
- The repository specific information. MarkDown format is supported, and the length limit is 2000.
- instance
Id String - ID of Container Registry Enterprise Edition instance.
- name String
- Name of Container Registry Enterprise Edition repository. It can contain 2 to 64 characters.
- namespace String
- Name of Container Registry Enterprise Edition namespace where repository is located. It can contain 2 to 30 characters.
- repo
Id String - The uuid of Container Registry Enterprise Edition repository.
- repo
Type String PUBLIC
orPRIVATE
, repo's visibility.- summary String
- The repository general information. It can contain 1 to 100 characters.
Import
Container Registry Enterprise Edition repository can be imported using the {instance_id}:{namespace}:{repository}
, e.g.
$ pulumi import alicloud:cs/registryEnterpriseRepo:RegistryEnterpriseRepo default `cri-xxx:my-namespace:my-repo`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.