com.pulumi.alicloud.cs.RegistryEnterpriseRepo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.alicloud.cs;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cs.RegistryEnterpriseRepoArgs;
import com.pulumi.alicloud.cs.inputs.RegistryEnterpriseRepoState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a Container Registry Enterprise Edition Repository resource.
*
* For information about Container Registry Enterprise Edition Repository and how to use it, see [What is Repository](https://www.alibabacloud.com/help/en/acr/developer-reference/api-cr-2018-12-01-createrepository)
*
* > **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
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.random.integer;
* import com.pulumi.random.IntegerArgs;
* 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 default_ = new Integer("default", IntegerArgs.builder()
* .min(10000000)
* .max(99999999)
* .build());
*
* var defaultRegistryEnterpriseInstance = new RegistryEnterpriseInstance("defaultRegistryEnterpriseInstance", RegistryEnterpriseInstanceArgs.builder()
* .paymentType("Subscription")
* .period(1)
* .renewPeriod(0)
* .renewalStatus("ManualRenewal")
* .instanceType("Advanced")
* .instanceName(String.format("%s-%s", name,default_.result()))
* .build());
*
* var defaultRegistryEnterpriseNamespace = new RegistryEnterpriseNamespace("defaultRegistryEnterpriseNamespace", RegistryEnterpriseNamespaceArgs.builder()
* .instanceId(defaultRegistryEnterpriseInstance.id())
* .name(String.format("%s-%s", name,default_.result()))
* .autoCreate(false)
* .defaultVisibility("PUBLIC")
* .build());
*
* var example = new RegistryEnterpriseRepo("example", RegistryEnterpriseRepoArgs.builder()
* .instanceId(defaultRegistryEnterpriseInstance.id())
* .namespace(defaultRegistryEnterpriseNamespace.name())
* .name(String.format("%s-%s", name,default_.result()))
* .repoType("PUBLIC")
* .summary("this is summary of my new repo")
* .detail("this is a public repo")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Container Registry Enterprise Edition Repository can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:cs/registryEnterpriseRepo:RegistryEnterpriseRepo example <instance_id>:<namespace>:<name>
* ```
*
*/
@ResourceType(type="alicloud:cs/registryEnterpriseRepo:RegistryEnterpriseRepo")
public class RegistryEnterpriseRepo extends com.pulumi.resources.CustomResource {
/**
* The description of the repository.
*
*/
@Export(name="detail", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> detail;
/**
* @return The description of the repository.
*
*/
public Output> detail() {
return Codegen.optional(this.detail);
}
/**
* The ID of the Container Registry Enterprise Edition instance.
*
*/
@Export(name="instanceId", refs={String.class}, tree="[0]")
private Output instanceId;
/**
* @return The ID of the Container Registry Enterprise Edition instance.
*
*/
public Output instanceId() {
return this.instanceId;
}
/**
* The name of the image repository.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the image repository.
*
*/
public Output name() {
return this.name;
}
/**
* The name of the namespace to which the image repository belongs.
*
*/
@Export(name="namespace", refs={String.class}, tree="[0]")
private Output namespace;
/**
* @return The name of the namespace to which the image repository belongs.
*
*/
public Output namespace() {
return this.namespace;
}
/**
* The ID of the repository.
*
*/
@Export(name="repoId", refs={String.class}, tree="[0]")
private Output repoId;
/**
* @return The ID of the repository.
*
*/
public Output repoId() {
return this.repoId;
}
/**
* The type of the repository. Valid values:
* - `PUBLIC`: The repository is a public repository.
* - `PRIVATE`: The repository is a private repository.
*
*/
@Export(name="repoType", refs={String.class}, tree="[0]")
private Output repoType;
/**
* @return The type of the repository. Valid values:
* - `PUBLIC`: The repository is a public repository.
* - `PRIVATE`: The repository is a private repository.
*
*/
public Output repoType() {
return this.repoType;
}
/**
* The summary about the repository.
*
*/
@Export(name="summary", refs={String.class}, tree="[0]")
private Output summary;
/**
* @return The summary about the repository.
*
*/
public Output summary() {
return this.summary;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public RegistryEnterpriseRepo(java.lang.String name) {
this(name, RegistryEnterpriseRepoArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public RegistryEnterpriseRepo(java.lang.String name, RegistryEnterpriseRepoArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public RegistryEnterpriseRepo(java.lang.String name, RegistryEnterpriseRepoArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:cs/registryEnterpriseRepo:RegistryEnterpriseRepo", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private RegistryEnterpriseRepo(java.lang.String name, Output id, @Nullable RegistryEnterpriseRepoState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:cs/registryEnterpriseRepo:RegistryEnterpriseRepo", name, state, makeResourceOptions(options, id), false);
}
private static RegistryEnterpriseRepoArgs makeArgs(RegistryEnterpriseRepoArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? RegistryEnterpriseRepoArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static RegistryEnterpriseRepo get(java.lang.String name, Output id, @Nullable RegistryEnterpriseRepoState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new RegistryEnterpriseRepo(name, id, state, options);
}
}