Class NetworkGrant
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.
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
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var ccnAccount = new AliCloud.Provider("ccnAccount", new AliCloud.ProviderArgs
{
});
var cenAccount = new AliCloud.Provider("cenAccount", new AliCloud.ProviderArgs
{
AccessKey = "xxxxxx",
Region = "cn-hangzhou",
SecretKey = "xxxxxx",
});
var cen = new AliCloud.Cen.Instance("cen", new AliCloud.Cen.InstanceArgs
{
});
var ccn = new AliCloud.CloudConnect.Network("ccn", new AliCloud.CloudConnect.NetworkArgs
{
IsDefault = "true",
});
var @default = new AliCloud.CloudConnect.NetworkGrant("default", new AliCloud.CloudConnect.NetworkGrantArgs
{
CcnId = ccn.Id,
CenId = cen.Id,
CenUid = "xxxxxx",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.CloudConnect
Assembly: Pulumi.AliCloud.dll
Syntax
public class NetworkGrant : CustomResource
Constructors
View SourceNetworkGrant(String, NetworkGrantArgs, CustomResourceOptions)
Create a NetworkGrant resource with the given unique name, arguments, and options.
Declaration
public NetworkGrant(string name, NetworkGrantArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NetworkGrantArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCcnId
The ID of the CCN instance.
Declaration
public Output<string> CcnId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CenId
The ID of the CEN instance.
Declaration
public Output<string> CenId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CenUid
The ID of the account to which the CEN instance belongs.
Declaration
public Output<string> CenUid { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, NetworkGrantState, CustomResourceOptions)
Get an existing NetworkGrant resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static NetworkGrant Get(string name, Input<string> id, NetworkGrantState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NetworkGrantState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| NetworkGrant |