cloudconnect

package
v3.54.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetNetworksArgs

type GetNetworksArgs struct {
	// A list of CCN instances IDs.
	Ids []string `pulumi:"ids"`
	// A regex string to filter CCN instances by name.
	NameRegex  *string `pulumi:"nameRegex"`
	OutputFile *string `pulumi:"outputFile"`
}

A collection of arguments for invoking getNetworks.

type GetNetworksNetwork

type GetNetworksNetwork struct {
	// CidrBlock of the CCN instance.
	CidrBlock   string `pulumi:"cidrBlock"`
	Description string `pulumi:"description"`
	// ID of the CCN instance.
	Id string `pulumi:"id"`
	// IsDefault of the CCN instance.
	IsDefault bool `pulumi:"isDefault"`
	// Name of the CCN instance.
	Name string `pulumi:"name"`
}

type GetNetworksNetworkArgs

type GetNetworksNetworkArgs struct {
	// CidrBlock of the CCN instance.
	CidrBlock   pulumi.StringInput `pulumi:"cidrBlock"`
	Description pulumi.StringInput `pulumi:"description"`
	// ID of the CCN instance.
	Id pulumi.StringInput `pulumi:"id"`
	// IsDefault of the CCN instance.
	IsDefault pulumi.BoolInput `pulumi:"isDefault"`
	// Name of the CCN instance.
	Name pulumi.StringInput `pulumi:"name"`
}

func (GetNetworksNetworkArgs) ElementType

func (GetNetworksNetworkArgs) ElementType() reflect.Type

func (GetNetworksNetworkArgs) ToGetNetworksNetworkOutput

func (i GetNetworksNetworkArgs) ToGetNetworksNetworkOutput() GetNetworksNetworkOutput

func (GetNetworksNetworkArgs) ToGetNetworksNetworkOutputWithContext

func (i GetNetworksNetworkArgs) ToGetNetworksNetworkOutputWithContext(ctx context.Context) GetNetworksNetworkOutput

type GetNetworksNetworkArray

type GetNetworksNetworkArray []GetNetworksNetworkInput

func (GetNetworksNetworkArray) ElementType

func (GetNetworksNetworkArray) ElementType() reflect.Type

func (GetNetworksNetworkArray) ToGetNetworksNetworkArrayOutput

func (i GetNetworksNetworkArray) ToGetNetworksNetworkArrayOutput() GetNetworksNetworkArrayOutput

func (GetNetworksNetworkArray) ToGetNetworksNetworkArrayOutputWithContext

func (i GetNetworksNetworkArray) ToGetNetworksNetworkArrayOutputWithContext(ctx context.Context) GetNetworksNetworkArrayOutput

type GetNetworksNetworkArrayInput

type GetNetworksNetworkArrayInput interface {
	pulumi.Input

	ToGetNetworksNetworkArrayOutput() GetNetworksNetworkArrayOutput
	ToGetNetworksNetworkArrayOutputWithContext(context.Context) GetNetworksNetworkArrayOutput
}

GetNetworksNetworkArrayInput is an input type that accepts GetNetworksNetworkArray and GetNetworksNetworkArrayOutput values. You can construct a concrete instance of `GetNetworksNetworkArrayInput` via:

GetNetworksNetworkArray{ GetNetworksNetworkArgs{...} }

type GetNetworksNetworkArrayOutput

type GetNetworksNetworkArrayOutput struct{ *pulumi.OutputState }

func (GetNetworksNetworkArrayOutput) ElementType

func (GetNetworksNetworkArrayOutput) Index

func (GetNetworksNetworkArrayOutput) ToGetNetworksNetworkArrayOutput

func (o GetNetworksNetworkArrayOutput) ToGetNetworksNetworkArrayOutput() GetNetworksNetworkArrayOutput

func (GetNetworksNetworkArrayOutput) ToGetNetworksNetworkArrayOutputWithContext

func (o GetNetworksNetworkArrayOutput) ToGetNetworksNetworkArrayOutputWithContext(ctx context.Context) GetNetworksNetworkArrayOutput

type GetNetworksNetworkInput

type GetNetworksNetworkInput interface {
	pulumi.Input

	ToGetNetworksNetworkOutput() GetNetworksNetworkOutput
	ToGetNetworksNetworkOutputWithContext(context.Context) GetNetworksNetworkOutput
}

GetNetworksNetworkInput is an input type that accepts GetNetworksNetworkArgs and GetNetworksNetworkOutput values. You can construct a concrete instance of `GetNetworksNetworkInput` via:

GetNetworksNetworkArgs{...}

type GetNetworksNetworkOutput

type GetNetworksNetworkOutput struct{ *pulumi.OutputState }

func (GetNetworksNetworkOutput) CidrBlock

CidrBlock of the CCN instance.

func (GetNetworksNetworkOutput) Description

func (GetNetworksNetworkOutput) ElementType

func (GetNetworksNetworkOutput) ElementType() reflect.Type

func (GetNetworksNetworkOutput) Id

ID of the CCN instance.

func (GetNetworksNetworkOutput) IsDefault

IsDefault of the CCN instance.

func (GetNetworksNetworkOutput) Name

Name of the CCN instance.

func (GetNetworksNetworkOutput) ToGetNetworksNetworkOutput

func (o GetNetworksNetworkOutput) ToGetNetworksNetworkOutput() GetNetworksNetworkOutput

func (GetNetworksNetworkOutput) ToGetNetworksNetworkOutputWithContext

func (o GetNetworksNetworkOutput) ToGetNetworksNetworkOutputWithContext(ctx context.Context) GetNetworksNetworkOutput

type GetNetworksOutputArgs added in v3.9.0

type GetNetworksOutputArgs struct {
	// A list of CCN instances IDs.
	Ids pulumi.StringArrayInput `pulumi:"ids"`
	// A regex string to filter CCN instances by name.
	NameRegex  pulumi.StringPtrInput `pulumi:"nameRegex"`
	OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
}

A collection of arguments for invoking getNetworks.

func (GetNetworksOutputArgs) ElementType added in v3.9.0

func (GetNetworksOutputArgs) ElementType() reflect.Type

type GetNetworksResult

type GetNetworksResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// A list of CCN instances IDs.
	Ids       []string `pulumi:"ids"`
	NameRegex *string  `pulumi:"nameRegex"`
	// A list of CCN instances names.
	Names []string `pulumi:"names"`
	// A list of CCN instances. Each element contains the following attributes:
	Networks   []GetNetworksNetwork `pulumi:"networks"`
	OutputFile *string              `pulumi:"outputFile"`
}

A collection of values returned by getNetworks.

func GetNetworks

func GetNetworks(ctx *pulumi.Context, args *GetNetworksArgs, opts ...pulumi.InvokeOption) (*GetNetworksResult, error)

This data source provides Cloud Connect Networks available to the user.

> **NOTE:** Available in 1.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-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`]

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudconnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

) func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := cloudconnect.GetNetworks(ctx, &cloudconnect.GetNetworksArgs{ Ids: interface{}{ defaultAlicloudCloudConnectNetworks.Id, }, NameRegex: pulumi.StringRef("^tf-testAcc.*"), }, nil); if err != nil { return err } _, err = cloudconnect.NewNetwork(ctx, "default", &cloudconnect.NetworkArgs{ Name: pulumi.String("tf-testAccCloudConnectNetworkName"), Description: pulumi.String("tf-testAccCloudConnectNetworkDescription"), CidrBlock: pulumi.String("192.168.0.0/24"), IsDefault: pulumi.Bool(true), }) if err != nil { return err } return nil }) } ```

type GetNetworksResultOutput added in v3.9.0

type GetNetworksResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getNetworks.

func GetNetworksOutput added in v3.9.0

func GetNetworksOutput(ctx *pulumi.Context, args GetNetworksOutputArgs, opts ...pulumi.InvokeOption) GetNetworksResultOutput

func (GetNetworksResultOutput) ElementType added in v3.9.0

func (GetNetworksResultOutput) ElementType() reflect.Type

func (GetNetworksResultOutput) Id added in v3.9.0

The provider-assigned unique ID for this managed resource.

func (GetNetworksResultOutput) Ids added in v3.9.0

A list of CCN instances IDs.

func (GetNetworksResultOutput) NameRegex added in v3.9.0

func (GetNetworksResultOutput) Names added in v3.9.0

A list of CCN instances names.

func (GetNetworksResultOutput) Networks added in v3.9.0

A list of CCN instances. Each element contains the following attributes:

func (GetNetworksResultOutput) OutputFile added in v3.9.0

func (GetNetworksResultOutput) ToGetNetworksResultOutput added in v3.9.0

func (o GetNetworksResultOutput) ToGetNetworksResultOutput() GetNetworksResultOutput

func (GetNetworksResultOutput) ToGetNetworksResultOutputWithContext added in v3.9.0

func (o GetNetworksResultOutput) ToGetNetworksResultOutputWithContext(ctx context.Context) GetNetworksResultOutput

type Network

type Network struct {
	pulumi.CustomResourceState

	// The CidrBlock of the CCN instance. Defaults to null.
	CidrBlock pulumi.StringPtrOutput `pulumi:"cidrBlock"`
	// 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://.
	Description pulumi.StringPtrOutput `pulumi:"description"`
	// Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.
	IsDefault pulumi.BoolOutput `pulumi:"isDefault"`
	// 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://.
	Name pulumi.StringOutput `pulumi:"name"`
}

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](https://www.alibabacloud.com/help/en/smart-access-gateway/latest/createcloudconnectnetwork).

> **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-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`]

## Example Usage

Basic Usage

```go 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{
			Name:        pulumi.String(name),
			Description: pulumi.String(name),
			CidrBlock:   pulumi.String("192.168.0.0/24"),
			IsDefault:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

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

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

func GetNetwork

func GetNetwork(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *NetworkState, opts ...pulumi.ResourceOption) (*Network, error)

GetNetwork gets an existing Network resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewNetwork

func NewNetwork(ctx *pulumi.Context,
	name string, args *NetworkArgs, opts ...pulumi.ResourceOption) (*Network, error)

NewNetwork registers a new resource with the given unique name, arguments, and options.

func (*Network) ElementType

func (*Network) ElementType() reflect.Type

func (*Network) ToNetworkOutput

func (i *Network) ToNetworkOutput() NetworkOutput

func (*Network) ToNetworkOutputWithContext

func (i *Network) ToNetworkOutputWithContext(ctx context.Context) NetworkOutput

type NetworkArgs

type NetworkArgs struct {
	// The CidrBlock of the CCN instance. Defaults to null.
	CidrBlock pulumi.StringPtrInput
	// 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://.
	Description pulumi.StringPtrInput
	// Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.
	IsDefault pulumi.BoolInput
	// 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://.
	Name pulumi.StringPtrInput
}

The set of arguments for constructing a Network resource.

func (NetworkArgs) ElementType

func (NetworkArgs) ElementType() reflect.Type

type NetworkArray

type NetworkArray []NetworkInput

func (NetworkArray) ElementType

func (NetworkArray) ElementType() reflect.Type

func (NetworkArray) ToNetworkArrayOutput

func (i NetworkArray) ToNetworkArrayOutput() NetworkArrayOutput

func (NetworkArray) ToNetworkArrayOutputWithContext

func (i NetworkArray) ToNetworkArrayOutputWithContext(ctx context.Context) NetworkArrayOutput

type NetworkArrayInput

type NetworkArrayInput interface {
	pulumi.Input

	ToNetworkArrayOutput() NetworkArrayOutput
	ToNetworkArrayOutputWithContext(context.Context) NetworkArrayOutput
}

NetworkArrayInput is an input type that accepts NetworkArray and NetworkArrayOutput values. You can construct a concrete instance of `NetworkArrayInput` via:

NetworkArray{ NetworkArgs{...} }

type NetworkArrayOutput

type NetworkArrayOutput struct{ *pulumi.OutputState }

func (NetworkArrayOutput) ElementType

func (NetworkArrayOutput) ElementType() reflect.Type

func (NetworkArrayOutput) Index

func (NetworkArrayOutput) ToNetworkArrayOutput

func (o NetworkArrayOutput) ToNetworkArrayOutput() NetworkArrayOutput

func (NetworkArrayOutput) ToNetworkArrayOutputWithContext

func (o NetworkArrayOutput) ToNetworkArrayOutputWithContext(ctx context.Context) NetworkArrayOutput

type NetworkAttachment

type NetworkAttachment struct {
	pulumi.CustomResourceState

	// The ID of the CCN instance.
	CcnId pulumi.StringOutput `pulumi:"ccnId"`
	// The ID of the Smart Access Gateway instance.
	SagId pulumi.StringOutput `pulumi:"sagId"`
}

Provides a Cloud Connect Network Attachment resource. This topic describes how to associate a Smart Access Gateway (SAG) instance with a network instance. You must associate an SAG instance with a network instance if you want to connect the SAG to Alibaba Cloud. You can connect an SAG to Alibaba Cloud through a leased line, the Internet, or the active and standby links.

For information about Cloud Connect Network Attachment and how to use it, see [What is Cloud Connect Network Attachment](https://www.alibabacloud.com/help/en/smart-access-gateway/latest/bindsmartaccessgateway).

> **NOTE:** Available since v1.64.0.

> **NOTE:** Only the following regions support. [`cn-shanghai`, `cn-shanghai-finance-1`, `cn-hongkong`, `ap-southeast-1`, `ap-southeast-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`]

## Example Usage

Basic Usage

```go 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 := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		sagId := "sag-9bifkf***"
		if param := cfg.Get("sagId"); param != "" {
			sagId = param
		}
		_, err := cloudconnect.NewNetwork(ctx, "default", &cloudconnect.NetworkArgs{
			Name:        pulumi.String(name),
			Description: pulumi.String(name),
			CidrBlock:   pulumi.String("192.168.0.0/24"),
			IsDefault:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = cloudconnect.NewNetworkAttachment(ctx, "default", &cloudconnect.NetworkAttachmentArgs{
			CcnId: _default.ID(),
			SagId: pulumi.String(sagId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

The Cloud Connect Network Attachment can be imported using the instance_id, e.g.

```sh $ pulumi import alicloud:cloudconnect/networkAttachment:NetworkAttachment example ccn-abc123456:sag-abc123456 ```

func GetNetworkAttachment

func GetNetworkAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *NetworkAttachmentState, opts ...pulumi.ResourceOption) (*NetworkAttachment, error)

GetNetworkAttachment gets an existing NetworkAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewNetworkAttachment

func NewNetworkAttachment(ctx *pulumi.Context,
	name string, args *NetworkAttachmentArgs, opts ...pulumi.ResourceOption) (*NetworkAttachment, error)

NewNetworkAttachment registers a new resource with the given unique name, arguments, and options.

func (*NetworkAttachment) ElementType

func (*NetworkAttachment) ElementType() reflect.Type

func (*NetworkAttachment) ToNetworkAttachmentOutput

func (i *NetworkAttachment) ToNetworkAttachmentOutput() NetworkAttachmentOutput

func (*NetworkAttachment) ToNetworkAttachmentOutputWithContext

func (i *NetworkAttachment) ToNetworkAttachmentOutputWithContext(ctx context.Context) NetworkAttachmentOutput

type NetworkAttachmentArgs

type NetworkAttachmentArgs struct {
	// The ID of the CCN instance.
	CcnId pulumi.StringInput
	// The ID of the Smart Access Gateway instance.
	SagId pulumi.StringInput
}

The set of arguments for constructing a NetworkAttachment resource.

func (NetworkAttachmentArgs) ElementType

func (NetworkAttachmentArgs) ElementType() reflect.Type

type NetworkAttachmentArray

type NetworkAttachmentArray []NetworkAttachmentInput

func (NetworkAttachmentArray) ElementType

func (NetworkAttachmentArray) ElementType() reflect.Type

func (NetworkAttachmentArray) ToNetworkAttachmentArrayOutput

func (i NetworkAttachmentArray) ToNetworkAttachmentArrayOutput() NetworkAttachmentArrayOutput

func (NetworkAttachmentArray) ToNetworkAttachmentArrayOutputWithContext

func (i NetworkAttachmentArray) ToNetworkAttachmentArrayOutputWithContext(ctx context.Context) NetworkAttachmentArrayOutput

type NetworkAttachmentArrayInput

type NetworkAttachmentArrayInput interface {
	pulumi.Input

	ToNetworkAttachmentArrayOutput() NetworkAttachmentArrayOutput
	ToNetworkAttachmentArrayOutputWithContext(context.Context) NetworkAttachmentArrayOutput
}

NetworkAttachmentArrayInput is an input type that accepts NetworkAttachmentArray and NetworkAttachmentArrayOutput values. You can construct a concrete instance of `NetworkAttachmentArrayInput` via:

NetworkAttachmentArray{ NetworkAttachmentArgs{...} }

type NetworkAttachmentArrayOutput

type NetworkAttachmentArrayOutput struct{ *pulumi.OutputState }

func (NetworkAttachmentArrayOutput) ElementType

func (NetworkAttachmentArrayOutput) Index

func (NetworkAttachmentArrayOutput) ToNetworkAttachmentArrayOutput

func (o NetworkAttachmentArrayOutput) ToNetworkAttachmentArrayOutput() NetworkAttachmentArrayOutput

func (NetworkAttachmentArrayOutput) ToNetworkAttachmentArrayOutputWithContext

func (o NetworkAttachmentArrayOutput) ToNetworkAttachmentArrayOutputWithContext(ctx context.Context) NetworkAttachmentArrayOutput

type NetworkAttachmentInput

type NetworkAttachmentInput interface {
	pulumi.Input

	ToNetworkAttachmentOutput() NetworkAttachmentOutput
	ToNetworkAttachmentOutputWithContext(ctx context.Context) NetworkAttachmentOutput
}

type NetworkAttachmentMap

type NetworkAttachmentMap map[string]NetworkAttachmentInput

func (NetworkAttachmentMap) ElementType

func (NetworkAttachmentMap) ElementType() reflect.Type

func (NetworkAttachmentMap) ToNetworkAttachmentMapOutput

func (i NetworkAttachmentMap) ToNetworkAttachmentMapOutput() NetworkAttachmentMapOutput

func (NetworkAttachmentMap) ToNetworkAttachmentMapOutputWithContext

func (i NetworkAttachmentMap) ToNetworkAttachmentMapOutputWithContext(ctx context.Context) NetworkAttachmentMapOutput

type NetworkAttachmentMapInput

type NetworkAttachmentMapInput interface {
	pulumi.Input

	ToNetworkAttachmentMapOutput() NetworkAttachmentMapOutput
	ToNetworkAttachmentMapOutputWithContext(context.Context) NetworkAttachmentMapOutput
}

NetworkAttachmentMapInput is an input type that accepts NetworkAttachmentMap and NetworkAttachmentMapOutput values. You can construct a concrete instance of `NetworkAttachmentMapInput` via:

NetworkAttachmentMap{ "key": NetworkAttachmentArgs{...} }

type NetworkAttachmentMapOutput

type NetworkAttachmentMapOutput struct{ *pulumi.OutputState }

func (NetworkAttachmentMapOutput) ElementType

func (NetworkAttachmentMapOutput) ElementType() reflect.Type

func (NetworkAttachmentMapOutput) MapIndex

func (NetworkAttachmentMapOutput) ToNetworkAttachmentMapOutput

func (o NetworkAttachmentMapOutput) ToNetworkAttachmentMapOutput() NetworkAttachmentMapOutput

func (NetworkAttachmentMapOutput) ToNetworkAttachmentMapOutputWithContext

func (o NetworkAttachmentMapOutput) ToNetworkAttachmentMapOutputWithContext(ctx context.Context) NetworkAttachmentMapOutput

type NetworkAttachmentOutput

type NetworkAttachmentOutput struct{ *pulumi.OutputState }

func (NetworkAttachmentOutput) CcnId added in v3.27.0

The ID of the CCN instance.

func (NetworkAttachmentOutput) ElementType

func (NetworkAttachmentOutput) ElementType() reflect.Type

func (NetworkAttachmentOutput) SagId added in v3.27.0

The ID of the Smart Access Gateway instance.

func (NetworkAttachmentOutput) ToNetworkAttachmentOutput

func (o NetworkAttachmentOutput) ToNetworkAttachmentOutput() NetworkAttachmentOutput

func (NetworkAttachmentOutput) ToNetworkAttachmentOutputWithContext

func (o NetworkAttachmentOutput) ToNetworkAttachmentOutputWithContext(ctx context.Context) NetworkAttachmentOutput

type NetworkAttachmentState

type NetworkAttachmentState struct {
	// The ID of the CCN instance.
	CcnId pulumi.StringPtrInput
	// The ID of the Smart Access Gateway instance.
	SagId pulumi.StringPtrInput
}

func (NetworkAttachmentState) ElementType

func (NetworkAttachmentState) ElementType() reflect.Type

type NetworkGrant

type NetworkGrant struct {
	pulumi.CustomResourceState

	// The ID of the CCN instance.
	CcnId pulumi.StringOutput `pulumi:"ccnId"`
	// The ID of the CEN instance.
	CenId pulumi.StringOutput `pulumi:"cenId"`
	// The ID of the account to which the CEN instance belongs.
	CenUid pulumi.StringOutput `pulumi:"cenUid"`
}

Provides a Cloud Connect Network Grant resource. If the CEN instance to be attached belongs to another account, authorization by the CEN instance is required.

For information about Cloud Connect Network Grant and how to use it, see [What is Cloud Connect Network Grant](https://www.alibabacloud.com/help/en/smart-access-gateway/latest/grantinstancetocbn).

> **NOTE:** Available since v1.63.0.

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

## Example Usage

Basic Usage

```go package main

import (

"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
"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 := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		cenUid := float64(123456789)
		if param := cfg.GetFloat64("cenUid"); param != 0 {
			cenUid = param
		}
		// Method 2: Use the target cen account's access_key, secret_key
		//
		//	provider "alicloud" {
		//	  region     = "cn-hangzhou"
		//	  access_key = "access_key"
		//	  secret_key = "secret_key"
		//	  alias      = "cen_account"
		//	}
		_, err := cloudconnect.NewNetwork(ctx, "default", &cloudconnect.NetworkArgs{
			Name:        pulumi.String(name),
			Description: pulumi.String(name),
			CidrBlock:   pulumi.String("192.168.0.0/24"),
			IsDefault:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		cen, err := cen.NewInstance(ctx, "cen", &cen.InstanceArgs{
			CenInstanceName: pulumi.String(name),
		})
		if err != nil {
			return err
		}
		_, err = cloudconnect.NewNetworkGrant(ctx, "default", &cloudconnect.NetworkGrantArgs{
			CcnId:  _default.ID(),
			CenId:  cen.ID(),
			CenUid: pulumi.Float64(cenUid),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

The Cloud Connect Network Grant can be imported using the instance_id, e.g.

```sh $ pulumi import alicloud:cloudconnect/networkGrant:NetworkGrant example ccn-abc123456:cen-abc123456 ```

func GetNetworkGrant

func GetNetworkGrant(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *NetworkGrantState, opts ...pulumi.ResourceOption) (*NetworkGrant, error)

GetNetworkGrant gets an existing NetworkGrant resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewNetworkGrant

func NewNetworkGrant(ctx *pulumi.Context,
	name string, args *NetworkGrantArgs, opts ...pulumi.ResourceOption) (*NetworkGrant, error)

NewNetworkGrant registers a new resource with the given unique name, arguments, and options.

func (*NetworkGrant) ElementType

func (*NetworkGrant) ElementType() reflect.Type

func (*NetworkGrant) ToNetworkGrantOutput

func (i *NetworkGrant) ToNetworkGrantOutput() NetworkGrantOutput

func (*NetworkGrant) ToNetworkGrantOutputWithContext

func (i *NetworkGrant) ToNetworkGrantOutputWithContext(ctx context.Context) NetworkGrantOutput

type NetworkGrantArgs

type NetworkGrantArgs struct {
	// The ID of the CCN instance.
	CcnId pulumi.StringInput
	// The ID of the CEN instance.
	CenId pulumi.StringInput
	// The ID of the account to which the CEN instance belongs.
	CenUid pulumi.StringInput
}

The set of arguments for constructing a NetworkGrant resource.

func (NetworkGrantArgs) ElementType

func (NetworkGrantArgs) ElementType() reflect.Type

type NetworkGrantArray

type NetworkGrantArray []NetworkGrantInput

func (NetworkGrantArray) ElementType

func (NetworkGrantArray) ElementType() reflect.Type

func (NetworkGrantArray) ToNetworkGrantArrayOutput

func (i NetworkGrantArray) ToNetworkGrantArrayOutput() NetworkGrantArrayOutput

func (NetworkGrantArray) ToNetworkGrantArrayOutputWithContext

func (i NetworkGrantArray) ToNetworkGrantArrayOutputWithContext(ctx context.Context) NetworkGrantArrayOutput

type NetworkGrantArrayInput

type NetworkGrantArrayInput interface {
	pulumi.Input

	ToNetworkGrantArrayOutput() NetworkGrantArrayOutput
	ToNetworkGrantArrayOutputWithContext(context.Context) NetworkGrantArrayOutput
}

NetworkGrantArrayInput is an input type that accepts NetworkGrantArray and NetworkGrantArrayOutput values. You can construct a concrete instance of `NetworkGrantArrayInput` via:

NetworkGrantArray{ NetworkGrantArgs{...} }

type NetworkGrantArrayOutput

type NetworkGrantArrayOutput struct{ *pulumi.OutputState }

func (NetworkGrantArrayOutput) ElementType

func (NetworkGrantArrayOutput) ElementType() reflect.Type

func (NetworkGrantArrayOutput) Index

func (NetworkGrantArrayOutput) ToNetworkGrantArrayOutput

func (o NetworkGrantArrayOutput) ToNetworkGrantArrayOutput() NetworkGrantArrayOutput

func (NetworkGrantArrayOutput) ToNetworkGrantArrayOutputWithContext

func (o NetworkGrantArrayOutput) ToNetworkGrantArrayOutputWithContext(ctx context.Context) NetworkGrantArrayOutput

type NetworkGrantInput

type NetworkGrantInput interface {
	pulumi.Input

	ToNetworkGrantOutput() NetworkGrantOutput
	ToNetworkGrantOutputWithContext(ctx context.Context) NetworkGrantOutput
}

type NetworkGrantMap

type NetworkGrantMap map[string]NetworkGrantInput

func (NetworkGrantMap) ElementType

func (NetworkGrantMap) ElementType() reflect.Type

func (NetworkGrantMap) ToNetworkGrantMapOutput

func (i NetworkGrantMap) ToNetworkGrantMapOutput() NetworkGrantMapOutput

func (NetworkGrantMap) ToNetworkGrantMapOutputWithContext

func (i NetworkGrantMap) ToNetworkGrantMapOutputWithContext(ctx context.Context) NetworkGrantMapOutput

type NetworkGrantMapInput

type NetworkGrantMapInput interface {
	pulumi.Input

	ToNetworkGrantMapOutput() NetworkGrantMapOutput
	ToNetworkGrantMapOutputWithContext(context.Context) NetworkGrantMapOutput
}

NetworkGrantMapInput is an input type that accepts NetworkGrantMap and NetworkGrantMapOutput values. You can construct a concrete instance of `NetworkGrantMapInput` via:

NetworkGrantMap{ "key": NetworkGrantArgs{...} }

type NetworkGrantMapOutput

type NetworkGrantMapOutput struct{ *pulumi.OutputState }

func (NetworkGrantMapOutput) ElementType

func (NetworkGrantMapOutput) ElementType() reflect.Type

func (NetworkGrantMapOutput) MapIndex

func (NetworkGrantMapOutput) ToNetworkGrantMapOutput

func (o NetworkGrantMapOutput) ToNetworkGrantMapOutput() NetworkGrantMapOutput

func (NetworkGrantMapOutput) ToNetworkGrantMapOutputWithContext

func (o NetworkGrantMapOutput) ToNetworkGrantMapOutputWithContext(ctx context.Context) NetworkGrantMapOutput

type NetworkGrantOutput

type NetworkGrantOutput struct{ *pulumi.OutputState }

func (NetworkGrantOutput) CcnId added in v3.27.0

The ID of the CCN instance.

func (NetworkGrantOutput) CenId added in v3.27.0

The ID of the CEN instance.

func (NetworkGrantOutput) CenUid added in v3.27.0

The ID of the account to which the CEN instance belongs.

func (NetworkGrantOutput) ElementType

func (NetworkGrantOutput) ElementType() reflect.Type

func (NetworkGrantOutput) ToNetworkGrantOutput

func (o NetworkGrantOutput) ToNetworkGrantOutput() NetworkGrantOutput

func (NetworkGrantOutput) ToNetworkGrantOutputWithContext

func (o NetworkGrantOutput) ToNetworkGrantOutputWithContext(ctx context.Context) NetworkGrantOutput

type NetworkGrantState

type NetworkGrantState struct {
	// The ID of the CCN instance.
	CcnId pulumi.StringPtrInput
	// The ID of the CEN instance.
	CenId pulumi.StringPtrInput
	// The ID of the account to which the CEN instance belongs.
	CenUid pulumi.StringPtrInput
}

func (NetworkGrantState) ElementType

func (NetworkGrantState) ElementType() reflect.Type

type NetworkInput

type NetworkInput interface {
	pulumi.Input

	ToNetworkOutput() NetworkOutput
	ToNetworkOutputWithContext(ctx context.Context) NetworkOutput
}

type NetworkMap

type NetworkMap map[string]NetworkInput

func (NetworkMap) ElementType

func (NetworkMap) ElementType() reflect.Type

func (NetworkMap) ToNetworkMapOutput

func (i NetworkMap) ToNetworkMapOutput() NetworkMapOutput

func (NetworkMap) ToNetworkMapOutputWithContext

func (i NetworkMap) ToNetworkMapOutputWithContext(ctx context.Context) NetworkMapOutput

type NetworkMapInput

type NetworkMapInput interface {
	pulumi.Input

	ToNetworkMapOutput() NetworkMapOutput
	ToNetworkMapOutputWithContext(context.Context) NetworkMapOutput
}

NetworkMapInput is an input type that accepts NetworkMap and NetworkMapOutput values. You can construct a concrete instance of `NetworkMapInput` via:

NetworkMap{ "key": NetworkArgs{...} }

type NetworkMapOutput

type NetworkMapOutput struct{ *pulumi.OutputState }

func (NetworkMapOutput) ElementType

func (NetworkMapOutput) ElementType() reflect.Type

func (NetworkMapOutput) MapIndex

func (NetworkMapOutput) ToNetworkMapOutput

func (o NetworkMapOutput) ToNetworkMapOutput() NetworkMapOutput

func (NetworkMapOutput) ToNetworkMapOutputWithContext

func (o NetworkMapOutput) ToNetworkMapOutputWithContext(ctx context.Context) NetworkMapOutput

type NetworkOutput

type NetworkOutput struct{ *pulumi.OutputState }

func (NetworkOutput) CidrBlock added in v3.27.0

func (o NetworkOutput) CidrBlock() pulumi.StringPtrOutput

The CidrBlock of the CCN instance. Defaults to null.

func (NetworkOutput) Description added in v3.27.0

func (o NetworkOutput) Description() pulumi.StringPtrOutput

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://.

func (NetworkOutput) ElementType

func (NetworkOutput) ElementType() reflect.Type

func (NetworkOutput) IsDefault added in v3.27.0

func (o NetworkOutput) IsDefault() pulumi.BoolOutput

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

func (NetworkOutput) Name added in v3.27.0

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://.

func (NetworkOutput) ToNetworkOutput

func (o NetworkOutput) ToNetworkOutput() NetworkOutput

func (NetworkOutput) ToNetworkOutputWithContext

func (o NetworkOutput) ToNetworkOutputWithContext(ctx context.Context) NetworkOutput

type NetworkState

type NetworkState struct {
	// The CidrBlock of the CCN instance. Defaults to null.
	CidrBlock pulumi.StringPtrInput
	// 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://.
	Description pulumi.StringPtrInput
	// Created by default. If the client does not have ccn in the binding, it will create a ccn for the user to replace.
	IsDefault pulumi.BoolPtrInput
	// 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://.
	Name pulumi.StringPtrInput
}

func (NetworkState) ElementType

func (NetworkState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL