com.pulumi.alicloud.cen.Instance 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.cen;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cen.inputs.InstanceState;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a CEN instance resource. Cloud Enterprise Network (CEN) is a service that allows you to create a global network for rapidly building a distributed business system with a hybrid cloud computing solution. CEN enables you to build a secure, private, and enterprise-class interconnected network between VPCs in different regions and your local data centers. CEN provides enterprise-class scalability that automatically responds to your dynamic computing requirements.
*
* For information about CEN and how to use it, see [What is Cloud Enterprise Network](https://www.alibabacloud.com/help/en/cen/developer-reference/api-cbn-2017-09-12-createcen).
*
* > **NOTE:** Available since v1.15.0.
*
* ## 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.alicloud.cen.Instance;
* import com.pulumi.alicloud.cen.InstanceArgs;
* 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) {
* var example = new Instance("example", InstanceArgs.builder()
* .cenInstanceName("tf_example")
* .description("an example for cen")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* CEN instance can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:cen/instance:Instance example cen-abc123456
* ```
*
*/
@ResourceType(type="alicloud:cen/instance:Instance")
public class Instance extends com.pulumi.resources.CustomResource {
/**
* The name of the CEN instance. Defaults to null. The name must be 2 to 128 characters in length and can contain letters, numbers, periods (.), underscores (_), and hyphens (-). The name must start with a letter, but cannot start with http:// or https://.
*
*/
@Export(name="cenInstanceName", refs={String.class}, tree="[0]")
private Output cenInstanceName;
/**
* @return The name of the CEN instance. Defaults to null. The name must be 2 to 128 characters in length and can contain letters, numbers, periods (.), underscores (_), and hyphens (-). The name must start with a letter, but cannot start with http:// or https://.
*
*/
public Output cenInstanceName() {
return this.cenInstanceName;
}
/**
* The description of the CEN instance. Defaults to null. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output description;
/**
* @return The description of the CEN instance. Defaults to null. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* Field `name` has been deprecated from version 1.98.0. Use `cen_instance_name` instead.
*
* @deprecated
* attribute 'name' has been deprecated from version 1.98.0. Use 'cen_instance_name' instead.
*
*/
@Deprecated /* attribute 'name' has been deprecated from version 1.98.0. Use 'cen_instance_name' instead. */
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Field `name` has been deprecated from version 1.98.0. Use `cen_instance_name` instead.
*
*/
public Output name() {
return this.name;
}
/**
* Indicates the allowed level of CIDR block overlapping. Default value: `REDUCE`: Overlapping CIDR blocks are allowed. However, the overlapping CIDR blocks cannot be identical.
*
*/
@Export(name="protectionLevel", refs={String.class}, tree="[0]")
private Output protectionLevel;
/**
* @return Indicates the allowed level of CIDR block overlapping. Default value: `REDUCE`: Overlapping CIDR blocks are allowed. However, the overlapping CIDR blocks cannot be identical.
*
*/
public Output protectionLevel() {
return this.protectionLevel;
}
/**
* The Cen Instance current status.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
/**
* @return The Cen Instance current status.
*
*/
public Output status() {
return this.status;
}
/**
* A mapping of tags to assign to the resource.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output> tags;
/**
* @return A mapping of tags to assign to the resource.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Instance(java.lang.String name) {
this(name, InstanceArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Instance(java.lang.String name, @Nullable InstanceArgs 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 Instance(java.lang.String name, @Nullable InstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:cen/instance:Instance", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Instance(java.lang.String name, Output id, @Nullable InstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:cen/instance:Instance", name, state, makeResourceOptions(options, id), false);
}
private static InstanceArgs makeArgs(@Nullable InstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? InstanceArgs.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 Instance get(java.lang.String name, Output id, @Nullable InstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Instance(name, id, state, options);
}
}