Class Subnet


  • public class Subnet
    extends com.pulumi.resources.CustomResource
    Provides a Eflo Subnet resource. For information about Eflo Subnet and how to use it, see [What is Subnet](https://www.alibabacloud.com/help/en/pai/user-guide/overview-of-intelligent-computing-lingjun). > **NOTE:** Available since v1.204.0. ## Example Usage Basic Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.alicloud.AlicloudFunctions; import com.pulumi.alicloud.inputs.GetZonesArgs; import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions; import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs; import com.pulumi.alicloud.eflo.Vpd; import com.pulumi.alicloud.eflo.VpdArgs; import com.pulumi.alicloud.eflo.Subnet; import com.pulumi.alicloud.eflo.SubnetArgs; 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("tf-example"); final var defaultZones = AlicloudFunctions.getZones(); final var defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups(); var defaultVpd = new Vpd("defaultVpd", VpdArgs.builder() .cidr("10.0.0.0/8") .vpdName(name) .resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.groups()[0].id())) .build()); var defaultSubnet = new Subnet("defaultSubnet", SubnetArgs.builder() .subnetName(name) .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id())) .cidr("10.0.0.0/16") .vpdId(defaultVpd.id()) .build()); } } ``` ## Import Eflo Subnet can be imported using the id, e.g. ```sh $ pulumi import alicloud:eflo/subnet:Subnet example <vpd_id>:<subnet_id> ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Subnet​(java.lang.String name)  
      Subnet​(java.lang.String name, SubnetArgs args)  
      Subnet​(java.lang.String name, SubnetArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> cidr()  
      com.pulumi.core.Output<java.lang.String> createTime()  
      static Subnet get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SubnetState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> gmtModified()  
      com.pulumi.core.Output<java.lang.String> message()  
      com.pulumi.core.Output<java.lang.String> resourceGroupId()  
      com.pulumi.core.Output<java.lang.String> status()  
      com.pulumi.core.Output<java.lang.String> subnetId()  
      com.pulumi.core.Output<java.lang.String> subnetName()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> type()  
      com.pulumi.core.Output<java.lang.String> vpdId()  
      com.pulumi.core.Output<java.lang.String> zoneId()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Subnet

        public Subnet​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Subnet

        public Subnet​(java.lang.String name,
                      SubnetArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Subnet

        public Subnet​(java.lang.String name,
                      SubnetArgs args,
                      @Nullable
                      com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • cidr

        public com.pulumi.core.Output<java.lang.String> cidr()
        Returns:
        CIDR network segment.
      • createTime

        public com.pulumi.core.Output<java.lang.String> createTime()
        Returns:
        The creation time of the resource.
      • gmtModified

        public com.pulumi.core.Output<java.lang.String> gmtModified()
        Returns:
        Modification time.
      • message

        public com.pulumi.core.Output<java.lang.String> message()
        Returns:
        Error message.
      • resourceGroupId

        public com.pulumi.core.Output<java.lang.String> resourceGroupId()
        Returns:
        Resource Group ID.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        The status of the resource.
      • subnetId

        public com.pulumi.core.Output<java.lang.String> subnetId()
        Returns:
        The id of the subnet.
      • subnetName

        public com.pulumi.core.Output<java.lang.String> subnetName()
        Returns:
        The Subnet name.
      • type

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> type()
        Returns:
        Eflo subnet usage type. optional value: - General type is not filled in - OOB:OOB type - LB: LB type
      • vpdId

        public com.pulumi.core.Output<java.lang.String> vpdId()
        Returns:
        The Eflo VPD ID.
      • zoneId

        public com.pulumi.core.Output<java.lang.String> zoneId()
        Returns:
        The zone ID of the resource.
      • get

        public static Subnet get​(java.lang.String name,
                                 com.pulumi.core.Output<java.lang.String> id,
                                 @Nullable
                                 SubnetState state,
                                 @Nullable
                                 com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.