1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cloudconnect
  5. Network
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.cloudconnect.Network

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

    Provides a cloud connect network resource. Cloud Connect Network (CCN) is another important component of Smart Access Gateway. It is a device access matrix composed of Alibaba Cloud distributed access gateways. You can add multiple Smart Access Gateway (SAG) devices to a CCN instance and then attach the CCN instance to a Cloud Enterprise Network (CEN) instance to connect the local branches to the Alibaba Cloud.

    For information about cloud connect network and how to use it, see What is Cloud Connect Network.

    NOTE: Available since v1.59.0.

    NOTE: Only the following regions support create Cloud Connect Network. [cn-shanghai, cn-shanghai-finance-1, cn-hongkong, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-5, ap-northeast-1, eu-central-1]

    Example Usage

    Basic Usage

    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 @default = new AliCloud.CloudConnect.Network("default", new()
        {
            Description = name,
            CidrBlock = "192.168.0.0/24",
            IsDefault = true,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudconnect"
    	"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
    		}
    		_, err := cloudconnect.NewNetwork(ctx, "default", &cloudconnect.NetworkArgs{
    			Description: pulumi.String(name),
    			CidrBlock:   pulumi.String("192.168.0.0/24"),
    			IsDefault:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cloudconnect.Network;
    import com.pulumi.alicloud.cloudconnect.NetworkArgs;
    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 Network("default", NetworkArgs.builder()        
                .description(name)
                .cidrBlock("192.168.0.0/24")
                .isDefault(true)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.cloudconnect.Network("default",
        description=name,
        cidr_block="192.168.0.0/24",
        is_default=True)
    
    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 _default = new alicloud.cloudconnect.Network("default", {
        description: name,
        cidrBlock: "192.168.0.0/24",
        isDefault: true,
    });
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:cloudconnect:Network
        properties:
          description: ${name}
          cidrBlock: 192.168.0.0/24
          isDefault: true
    

    Create Network Resource

    new Network(name: string, args: NetworkArgs, opts?: CustomResourceOptions);
    @overload
    def Network(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                cidr_block: Optional[str] = None,
                description: Optional[str] = None,
                is_default: Optional[bool] = None,
                name: Optional[str] = None)
    @overload
    def Network(resource_name: str,
                args: NetworkArgs,
                opts: Optional[ResourceOptions] = None)
    func NewNetwork(ctx *Context, name string, args NetworkArgs, opts ...ResourceOption) (*Network, error)
    public Network(string name, NetworkArgs args, CustomResourceOptions? opts = null)
    public Network(String name, NetworkArgs args)
    public Network(String name, NetworkArgs args, CustomResourceOptions options)
    
    type: alicloud:cloudconnect:Network
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args NetworkArgs
    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 NetworkArgs
    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 NetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Network 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 Network resource accepts the following input properties:

    IsDefault bool

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    CidrBlock string

    The CidrBlock of the CCN instance. Defaults to null.

    Description string

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    Name string

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    IsDefault bool

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    CidrBlock string

    The CidrBlock of the CCN instance. Defaults to null.

    Description string

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    Name string

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    isDefault Boolean

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    cidrBlock String

    The CidrBlock of the CCN instance. Defaults to null.

    description String

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    name String

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    isDefault boolean

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    cidrBlock string

    The CidrBlock of the CCN instance. Defaults to null.

    description string

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    name string

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    is_default bool

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    cidr_block str

    The CidrBlock of the CCN instance. Defaults to null.

    description str

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    name str

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    isDefault Boolean

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    cidrBlock String

    The CidrBlock of the CCN instance. Defaults to null.

    description String

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    name String

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Network resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing Network Resource

    Get an existing Network 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?: NetworkState, opts?: CustomResourceOptions): Network
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cidr_block: Optional[str] = None,
            description: Optional[str] = None,
            is_default: Optional[bool] = None,
            name: Optional[str] = None) -> Network
    func GetNetwork(ctx *Context, name string, id IDInput, state *NetworkState, opts ...ResourceOption) (*Network, error)
    public static Network Get(string name, Input<string> id, NetworkState? state, CustomResourceOptions? opts = null)
    public static Network get(String name, Output<String> id, NetworkState 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.
    The following state arguments are supported:
    CidrBlock string

    The CidrBlock of the CCN instance. Defaults to null.

    Description string

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    IsDefault bool

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    Name string

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    CidrBlock string

    The CidrBlock of the CCN instance. Defaults to null.

    Description string

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    IsDefault bool

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    Name string

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    cidrBlock String

    The CidrBlock of the CCN instance. Defaults to null.

    description String

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    isDefault Boolean

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    name String

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    cidrBlock string

    The CidrBlock of the CCN instance. Defaults to null.

    description string

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    isDefault boolean

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    name string

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    cidr_block str

    The CidrBlock of the CCN instance. Defaults to null.

    description str

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    is_default bool

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    name str

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    cidrBlock String

    The CidrBlock of the CCN instance. Defaults to null.

    description String

    The description of the CCN instance. The description can contain 2 to 256 characters. The description must start with English letters, but cannot start with http:// or https://.

    isDefault Boolean

    Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.

    name String

    The name of the CCN instance. The name can contain 2 to 128 characters including a-z, A-Z, 0-9, periods, underlines, and hyphens. The name must start with an English letter, but cannot start with http:// or https://.

    Import

    The cloud connect network instance can be imported using the id, e.g.

     $ pulumi import alicloud:cloudconnect/network:Network example ccn-abc123456
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi