com.pulumi.alicloud.vpc.Subnet 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.vpc;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.vpc.SubnetArgs;
import com.pulumi.alicloud.vpc.inputs.SubnetState;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* @deprecated
* This resource has been deprecated and replaced by the Switch resource.
*
*/
@Deprecated /* This resource has been deprecated and replaced by the Switch resource. */
@ResourceType(type="alicloud:vpc/subnet:Subnet")
public class Subnet extends com.pulumi.resources.CustomResource {
/**
* @deprecated
* Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.
*
*/
@Deprecated /* Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead. */
@Export(name="availabilityZone", refs={String.class}, tree="[0]")
private Output availabilityZone;
public Output availabilityZone() {
return this.availabilityZone;
}
@Export(name="cidrBlock", refs={String.class}, tree="[0]")
private Output cidrBlock;
public Output cidrBlock() {
return this.cidrBlock;
}
@Export(name="createTime", refs={String.class}, tree="[0]")
private Output createTime;
public Output createTime() {
return this.createTime;
}
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
public Output> description() {
return Codegen.optional(this.description);
}
@Export(name="enableIpv6", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enableIpv6;
public Output> enableIpv6() {
return Codegen.optional(this.enableIpv6);
}
@Export(name="ipv6CidrBlock", refs={String.class}, tree="[0]")
private Output ipv6CidrBlock;
public Output ipv6CidrBlock() {
return this.ipv6CidrBlock;
}
@Export(name="ipv6CidrBlockMask", refs={Integer.class}, tree="[0]")
private Output ipv6CidrBlockMask;
public Output ipv6CidrBlockMask() {
return this.ipv6CidrBlockMask;
}
/**
* @deprecated
* Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.
*
*/
@Deprecated /* Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead. */
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
public Output name() {
return this.name;
}
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
public Output status() {
return this.status;
}
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
public Output>> tags() {
return Codegen.optional(this.tags);
}
@Export(name="vpcId", refs={String.class}, tree="[0]")
private Output vpcId;
public Output vpcId() {
return this.vpcId;
}
@Export(name="vswitchName", refs={String.class}, tree="[0]")
private Output vswitchName;
public Output vswitchName() {
return this.vswitchName;
}
@Export(name="zoneId", refs={String.class}, tree="[0]")
private Output zoneId;
public Output zoneId() {
return this.zoneId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Subnet(java.lang.String name) {
this(name, SubnetArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Subnet(java.lang.String name, SubnetArgs 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 Subnet(java.lang.String name, SubnetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:vpc/subnet:Subnet", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Subnet(java.lang.String name, Output id, @Nullable SubnetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:vpc/subnet:Subnet", name, state, makeResourceOptions(options, id), false);
}
private static SubnetArgs makeArgs(SubnetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SubnetArgs.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 Subnet get(java.lang.String name, Output id, @Nullable SubnetState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Subnet(name, id, state, options);
}
}