cloudconnect

package
v2.38.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 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 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-2`, `ap-southeast-3`, `ap-southeast-5`, `ap-northeast-1`, `eu-central-1`]

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/doc-detail/93667.htm).

> **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-2`, `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/v2/go/alicloud/cloudconnect"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudconnect.NewNetwork(ctx, "_default", &cloudconnect.NetworkArgs{
			CidrBlock:   pulumi.String("192.168.0.0/24"),
			Description: pulumi.String("tf-testAccCloudConnectNetworkDescription"),
			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 added in v2.25.1

func (*Network) ElementType() reflect.Type

func (*Network) ToNetworkOutput added in v2.25.1

func (i *Network) ToNetworkOutput() NetworkOutput

func (*Network) ToNetworkOutputWithContext added in v2.25.1

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

func (*Network) ToNetworkPtrOutput added in v2.35.1

func (i *Network) ToNetworkPtrOutput() NetworkPtrOutput

func (*Network) ToNetworkPtrOutputWithContext added in v2.35.1

func (i *Network) ToNetworkPtrOutputWithContext(ctx context.Context) NetworkPtrOutput

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 added in v2.35.1

type NetworkArray []NetworkInput

func (NetworkArray) ElementType added in v2.35.1

func (NetworkArray) ElementType() reflect.Type

func (NetworkArray) ToNetworkArrayOutput added in v2.35.1

func (i NetworkArray) ToNetworkArrayOutput() NetworkArrayOutput

func (NetworkArray) ToNetworkArrayOutputWithContext added in v2.35.1

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

type NetworkArrayInput added in v2.35.1

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 added in v2.35.1

type NetworkArrayOutput struct{ *pulumi.OutputState }

func (NetworkArrayOutput) ElementType added in v2.35.1

func (NetworkArrayOutput) ElementType() reflect.Type

func (NetworkArrayOutput) Index added in v2.35.1

func (NetworkArrayOutput) ToNetworkArrayOutput added in v2.35.1

func (o NetworkArrayOutput) ToNetworkArrayOutput() NetworkArrayOutput

func (NetworkArrayOutput) ToNetworkArrayOutputWithContext added in v2.35.1

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/doc-detail/124230.htm).

> **NOTE:** Available in 1.64.0+

> **NOTE:** Only the following regions support. [`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

```go package main

import (

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

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ccn, err := cloudconnect.NewNetwork(ctx, "ccn", &cloudconnect.NetworkArgs{
			IsDefault: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = cloudconnect.NewNetworkAttachment(ctx, "_default", &cloudconnect.NetworkAttachmentArgs{
			CcnId: ccn.ID(),
			SagId: pulumi.String("sag-xxxxx"),
		}, pulumi.DependsOn([]pulumi.Resource{
			ccn,
		}))
		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 added in v2.25.1

func (*NetworkAttachment) ElementType() reflect.Type

func (*NetworkAttachment) ToNetworkAttachmentOutput added in v2.25.1

func (i *NetworkAttachment) ToNetworkAttachmentOutput() NetworkAttachmentOutput

func (*NetworkAttachment) ToNetworkAttachmentOutputWithContext added in v2.25.1

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

func (*NetworkAttachment) ToNetworkAttachmentPtrOutput added in v2.35.1

func (i *NetworkAttachment) ToNetworkAttachmentPtrOutput() NetworkAttachmentPtrOutput

func (*NetworkAttachment) ToNetworkAttachmentPtrOutputWithContext added in v2.35.1

func (i *NetworkAttachment) ToNetworkAttachmentPtrOutputWithContext(ctx context.Context) NetworkAttachmentPtrOutput

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 added in v2.35.1

type NetworkAttachmentArray []NetworkAttachmentInput

func (NetworkAttachmentArray) ElementType added in v2.35.1

func (NetworkAttachmentArray) ElementType() reflect.Type

func (NetworkAttachmentArray) ToNetworkAttachmentArrayOutput added in v2.35.1

func (i NetworkAttachmentArray) ToNetworkAttachmentArrayOutput() NetworkAttachmentArrayOutput

func (NetworkAttachmentArray) ToNetworkAttachmentArrayOutputWithContext added in v2.35.1

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

type NetworkAttachmentArrayInput added in v2.35.1

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 added in v2.35.1

type NetworkAttachmentArrayOutput struct{ *pulumi.OutputState }

func (NetworkAttachmentArrayOutput) ElementType added in v2.35.1

func (NetworkAttachmentArrayOutput) Index added in v2.35.1

func (NetworkAttachmentArrayOutput) ToNetworkAttachmentArrayOutput added in v2.35.1

func (o NetworkAttachmentArrayOutput) ToNetworkAttachmentArrayOutput() NetworkAttachmentArrayOutput

func (NetworkAttachmentArrayOutput) ToNetworkAttachmentArrayOutputWithContext added in v2.35.1

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

type NetworkAttachmentInput added in v2.25.1

type NetworkAttachmentInput interface {
	pulumi.Input

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

type NetworkAttachmentMap added in v2.35.1

type NetworkAttachmentMap map[string]NetworkAttachmentInput

func (NetworkAttachmentMap) ElementType added in v2.35.1

func (NetworkAttachmentMap) ElementType() reflect.Type

func (NetworkAttachmentMap) ToNetworkAttachmentMapOutput added in v2.35.1

func (i NetworkAttachmentMap) ToNetworkAttachmentMapOutput() NetworkAttachmentMapOutput

func (NetworkAttachmentMap) ToNetworkAttachmentMapOutputWithContext added in v2.35.1

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

type NetworkAttachmentMapInput added in v2.35.1

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 added in v2.35.1

type NetworkAttachmentMapOutput struct{ *pulumi.OutputState }

func (NetworkAttachmentMapOutput) ElementType added in v2.35.1

func (NetworkAttachmentMapOutput) ElementType() reflect.Type

func (NetworkAttachmentMapOutput) MapIndex added in v2.35.1

func (NetworkAttachmentMapOutput) ToNetworkAttachmentMapOutput added in v2.35.1

func (o NetworkAttachmentMapOutput) ToNetworkAttachmentMapOutput() NetworkAttachmentMapOutput

func (NetworkAttachmentMapOutput) ToNetworkAttachmentMapOutputWithContext added in v2.35.1

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

type NetworkAttachmentOutput added in v2.25.1

type NetworkAttachmentOutput struct {
	*pulumi.OutputState
}

func (NetworkAttachmentOutput) ElementType added in v2.25.1

func (NetworkAttachmentOutput) ElementType() reflect.Type

func (NetworkAttachmentOutput) ToNetworkAttachmentOutput added in v2.25.1

func (o NetworkAttachmentOutput) ToNetworkAttachmentOutput() NetworkAttachmentOutput

func (NetworkAttachmentOutput) ToNetworkAttachmentOutputWithContext added in v2.25.1

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

func (NetworkAttachmentOutput) ToNetworkAttachmentPtrOutput added in v2.35.1

func (o NetworkAttachmentOutput) ToNetworkAttachmentPtrOutput() NetworkAttachmentPtrOutput

func (NetworkAttachmentOutput) ToNetworkAttachmentPtrOutputWithContext added in v2.35.1

func (o NetworkAttachmentOutput) ToNetworkAttachmentPtrOutputWithContext(ctx context.Context) NetworkAttachmentPtrOutput

type NetworkAttachmentPtrInput added in v2.35.1

type NetworkAttachmentPtrInput interface {
	pulumi.Input

	ToNetworkAttachmentPtrOutput() NetworkAttachmentPtrOutput
	ToNetworkAttachmentPtrOutputWithContext(ctx context.Context) NetworkAttachmentPtrOutput
}

type NetworkAttachmentPtrOutput added in v2.35.1

type NetworkAttachmentPtrOutput struct {
	*pulumi.OutputState
}

func (NetworkAttachmentPtrOutput) ElementType added in v2.35.1

func (NetworkAttachmentPtrOutput) ElementType() reflect.Type

func (NetworkAttachmentPtrOutput) ToNetworkAttachmentPtrOutput added in v2.35.1

func (o NetworkAttachmentPtrOutput) ToNetworkAttachmentPtrOutput() NetworkAttachmentPtrOutput

func (NetworkAttachmentPtrOutput) ToNetworkAttachmentPtrOutputWithContext added in v2.35.1

func (o NetworkAttachmentPtrOutput) ToNetworkAttachmentPtrOutputWithContext(ctx context.Context) NetworkAttachmentPtrOutput

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/doc-detail/94543.htm).

> **NOTE:** Available in 1.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-2`, `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/v2/go/alicloud/cen"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/cloudconnect"
"github.com/pulumi/pulumi-alicloud/sdk/v2/go/alicloud/providers"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := providers.Newalicloud(ctx, "ccnAccount", nil)
		if err != nil {
			return err
		}
		_, err = providers.Newalicloud(ctx, "cenAccount", &providers.alicloudArgs{
			Region:    pulumi.String("cn-hangzhou"),
			AccessKey: pulumi.String("xxxxxx"),
			SecretKey: pulumi.String("xxxxxx"),
		})
		if err != nil {
			return err
		}
		cen, err := cen.NewInstance(ctx, "cen", nil, pulumi.Provider(alicloud.Cen_account))
		if err != nil {
			return err
		}
		ccn, err := cloudconnect.NewNetwork(ctx, "ccn", &cloudconnect.NetworkArgs{
			IsDefault: pulumi.Bool(true),
		}, pulumi.Provider(alicloud.Ccn_account))
		if err != nil {
			return err
		}
		_, err = cloudconnect.NewNetworkGrant(ctx, "_default", &cloudconnect.NetworkGrantArgs{
			CcnId:  ccn.ID(),
			CenId:  cen.ID(),
			CenUid: pulumi.String("xxxxxx"),
		}, pulumi.DependsOn([]pulumi.Resource{
			ccn,
			cen,
		}))
		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 added in v2.25.1

func (*NetworkGrant) ElementType() reflect.Type

func (*NetworkGrant) ToNetworkGrantOutput added in v2.25.1

func (i *NetworkGrant) ToNetworkGrantOutput() NetworkGrantOutput

func (*NetworkGrant) ToNetworkGrantOutputWithContext added in v2.25.1

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

func (*NetworkGrant) ToNetworkGrantPtrOutput added in v2.35.1

func (i *NetworkGrant) ToNetworkGrantPtrOutput() NetworkGrantPtrOutput

func (*NetworkGrant) ToNetworkGrantPtrOutputWithContext added in v2.35.1

func (i *NetworkGrant) ToNetworkGrantPtrOutputWithContext(ctx context.Context) NetworkGrantPtrOutput

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 added in v2.35.1

type NetworkGrantArray []NetworkGrantInput

func (NetworkGrantArray) ElementType added in v2.35.1

func (NetworkGrantArray) ElementType() reflect.Type

func (NetworkGrantArray) ToNetworkGrantArrayOutput added in v2.35.1

func (i NetworkGrantArray) ToNetworkGrantArrayOutput() NetworkGrantArrayOutput

func (NetworkGrantArray) ToNetworkGrantArrayOutputWithContext added in v2.35.1

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

type NetworkGrantArrayInput added in v2.35.1

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 added in v2.35.1

type NetworkGrantArrayOutput struct{ *pulumi.OutputState }

func (NetworkGrantArrayOutput) ElementType added in v2.35.1

func (NetworkGrantArrayOutput) ElementType() reflect.Type

func (NetworkGrantArrayOutput) Index added in v2.35.1

func (NetworkGrantArrayOutput) ToNetworkGrantArrayOutput added in v2.35.1

func (o NetworkGrantArrayOutput) ToNetworkGrantArrayOutput() NetworkGrantArrayOutput

func (NetworkGrantArrayOutput) ToNetworkGrantArrayOutputWithContext added in v2.35.1

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

type NetworkGrantInput added in v2.25.1

type NetworkGrantInput interface {
	pulumi.Input

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

type NetworkGrantMap added in v2.35.1

type NetworkGrantMap map[string]NetworkGrantInput

func (NetworkGrantMap) ElementType added in v2.35.1

func (NetworkGrantMap) ElementType() reflect.Type

func (NetworkGrantMap) ToNetworkGrantMapOutput added in v2.35.1

func (i NetworkGrantMap) ToNetworkGrantMapOutput() NetworkGrantMapOutput

func (NetworkGrantMap) ToNetworkGrantMapOutputWithContext added in v2.35.1

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

type NetworkGrantMapInput added in v2.35.1

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 added in v2.35.1

type NetworkGrantMapOutput struct{ *pulumi.OutputState }

func (NetworkGrantMapOutput) ElementType added in v2.35.1

func (NetworkGrantMapOutput) ElementType() reflect.Type

func (NetworkGrantMapOutput) MapIndex added in v2.35.1

func (NetworkGrantMapOutput) ToNetworkGrantMapOutput added in v2.35.1

func (o NetworkGrantMapOutput) ToNetworkGrantMapOutput() NetworkGrantMapOutput

func (NetworkGrantMapOutput) ToNetworkGrantMapOutputWithContext added in v2.35.1

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

type NetworkGrantOutput added in v2.25.1

type NetworkGrantOutput struct {
	*pulumi.OutputState
}

func (NetworkGrantOutput) ElementType added in v2.25.1

func (NetworkGrantOutput) ElementType() reflect.Type

func (NetworkGrantOutput) ToNetworkGrantOutput added in v2.25.1

func (o NetworkGrantOutput) ToNetworkGrantOutput() NetworkGrantOutput

func (NetworkGrantOutput) ToNetworkGrantOutputWithContext added in v2.25.1

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

func (NetworkGrantOutput) ToNetworkGrantPtrOutput added in v2.35.1

func (o NetworkGrantOutput) ToNetworkGrantPtrOutput() NetworkGrantPtrOutput

func (NetworkGrantOutput) ToNetworkGrantPtrOutputWithContext added in v2.35.1

func (o NetworkGrantOutput) ToNetworkGrantPtrOutputWithContext(ctx context.Context) NetworkGrantPtrOutput

type NetworkGrantPtrInput added in v2.35.1

type NetworkGrantPtrInput interface {
	pulumi.Input

	ToNetworkGrantPtrOutput() NetworkGrantPtrOutput
	ToNetworkGrantPtrOutputWithContext(ctx context.Context) NetworkGrantPtrOutput
}

type NetworkGrantPtrOutput added in v2.35.1

type NetworkGrantPtrOutput struct {
	*pulumi.OutputState
}

func (NetworkGrantPtrOutput) ElementType added in v2.35.1

func (NetworkGrantPtrOutput) ElementType() reflect.Type

func (NetworkGrantPtrOutput) ToNetworkGrantPtrOutput added in v2.35.1

func (o NetworkGrantPtrOutput) ToNetworkGrantPtrOutput() NetworkGrantPtrOutput

func (NetworkGrantPtrOutput) ToNetworkGrantPtrOutputWithContext added in v2.35.1

func (o NetworkGrantPtrOutput) ToNetworkGrantPtrOutputWithContext(ctx context.Context) NetworkGrantPtrOutput

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 added in v2.25.1

type NetworkInput interface {
	pulumi.Input

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

type NetworkMap added in v2.35.1

type NetworkMap map[string]NetworkInput

func (NetworkMap) ElementType added in v2.35.1

func (NetworkMap) ElementType() reflect.Type

func (NetworkMap) ToNetworkMapOutput added in v2.35.1

func (i NetworkMap) ToNetworkMapOutput() NetworkMapOutput

func (NetworkMap) ToNetworkMapOutputWithContext added in v2.35.1

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

type NetworkMapInput added in v2.35.1

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 added in v2.35.1

type NetworkMapOutput struct{ *pulumi.OutputState }

func (NetworkMapOutput) ElementType added in v2.35.1

func (NetworkMapOutput) ElementType() reflect.Type

func (NetworkMapOutput) MapIndex added in v2.35.1

func (NetworkMapOutput) ToNetworkMapOutput added in v2.35.1

func (o NetworkMapOutput) ToNetworkMapOutput() NetworkMapOutput

func (NetworkMapOutput) ToNetworkMapOutputWithContext added in v2.35.1

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

type NetworkOutput added in v2.25.1

type NetworkOutput struct {
	*pulumi.OutputState
}

func (NetworkOutput) ElementType added in v2.25.1

func (NetworkOutput) ElementType() reflect.Type

func (NetworkOutput) ToNetworkOutput added in v2.25.1

func (o NetworkOutput) ToNetworkOutput() NetworkOutput

func (NetworkOutput) ToNetworkOutputWithContext added in v2.25.1

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

func (NetworkOutput) ToNetworkPtrOutput added in v2.35.1

func (o NetworkOutput) ToNetworkPtrOutput() NetworkPtrOutput

func (NetworkOutput) ToNetworkPtrOutputWithContext added in v2.35.1

func (o NetworkOutput) ToNetworkPtrOutputWithContext(ctx context.Context) NetworkPtrOutput

type NetworkPtrInput added in v2.35.1

type NetworkPtrInput interface {
	pulumi.Input

	ToNetworkPtrOutput() NetworkPtrOutput
	ToNetworkPtrOutputWithContext(ctx context.Context) NetworkPtrOutput
}

type NetworkPtrOutput added in v2.35.1

type NetworkPtrOutput struct {
	*pulumi.OutputState
}

func (NetworkPtrOutput) ElementType added in v2.35.1

func (NetworkPtrOutput) ElementType() reflect.Type

func (NetworkPtrOutput) ToNetworkPtrOutput added in v2.35.1

func (o NetworkPtrOutput) ToNetworkPtrOutput() NetworkPtrOutput

func (NetworkPtrOutput) ToNetworkPtrOutputWithContext added in v2.35.1

func (o NetworkPtrOutput) ToNetworkPtrOutputWithContext(ctx context.Context) NetworkPtrOutput

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