1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. expressconnect
  5. getGrantRuleToCens
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.expressconnect.getGrantRuleToCens

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the Express Connect Grant Rule To Cens of the current Alibaba Cloud user.

NOTE: Available in v1.196.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.expressconnect.getGrantRuleToCens({
    ids: ["example_id"],
    instanceId: "your_vbr_instance_id",
});
export const expressConnectGrantRuleToCenId0 = ids.then(ids => ids.cens?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.expressconnect.get_grant_rule_to_cens(ids=["example_id"],
    instance_id="your_vbr_instance_id")
pulumi.export("expressConnectGrantRuleToCenId0", ids.cens[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/expressconnect"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := expressconnect.GetGrantRuleToCens(ctx, &expressconnect.GetGrantRuleToCensArgs{
			Ids: []string{
				"example_id",
			},
			InstanceId: "your_vbr_instance_id",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("expressConnectGrantRuleToCenId0", ids.Cens[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.ExpressConnect.GetGrantRuleToCens.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
        InstanceId = "your_vbr_instance_id",
    });

    return new Dictionary<string, object?>
    {
        ["expressConnectGrantRuleToCenId0"] = ids.Apply(getGrantRuleToCensResult => getGrantRuleToCensResult.Cens[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions;
import com.pulumi.alicloud.expressconnect.inputs.GetGrantRuleToCensArgs;
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 ids = ExpressconnectFunctions.getGrantRuleToCens(GetGrantRuleToCensArgs.builder()
            .ids("example_id")
            .instanceId("your_vbr_instance_id")
            .build());

        ctx.export("expressConnectGrantRuleToCenId0", ids.applyValue(getGrantRuleToCensResult -> getGrantRuleToCensResult.cens()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:expressconnect:getGrantRuleToCens
      arguments:
        ids:
          - example_id
        instanceId: your_vbr_instance_id
outputs:
  expressConnectGrantRuleToCenId0: ${ids.cens[0].id}
Copy

Using getGrantRuleToCens

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getGrantRuleToCens(args: GetGrantRuleToCensArgs, opts?: InvokeOptions): Promise<GetGrantRuleToCensResult>
function getGrantRuleToCensOutput(args: GetGrantRuleToCensOutputArgs, opts?: InvokeOptions): Output<GetGrantRuleToCensResult>
Copy
def get_grant_rule_to_cens(ids: Optional[Sequence[str]] = None,
                           instance_id: Optional[str] = None,
                           output_file: Optional[str] = None,
                           page_number: Optional[int] = None,
                           page_size: Optional[int] = None,
                           opts: Optional[InvokeOptions] = None) -> GetGrantRuleToCensResult
def get_grant_rule_to_cens_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           instance_id: Optional[pulumi.Input[str]] = None,
                           output_file: Optional[pulumi.Input[str]] = None,
                           page_number: Optional[pulumi.Input[int]] = None,
                           page_size: Optional[pulumi.Input[int]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetGrantRuleToCensResult]
Copy
func GetGrantRuleToCens(ctx *Context, args *GetGrantRuleToCensArgs, opts ...InvokeOption) (*GetGrantRuleToCensResult, error)
func GetGrantRuleToCensOutput(ctx *Context, args *GetGrantRuleToCensOutputArgs, opts ...InvokeOption) GetGrantRuleToCensResultOutput
Copy

> Note: This function is named GetGrantRuleToCens in the Go SDK.

public static class GetGrantRuleToCens 
{
    public static Task<GetGrantRuleToCensResult> InvokeAsync(GetGrantRuleToCensArgs args, InvokeOptions? opts = null)
    public static Output<GetGrantRuleToCensResult> Invoke(GetGrantRuleToCensInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGrantRuleToCensResult> getGrantRuleToCens(GetGrantRuleToCensArgs args, InvokeOptions options)
public static Output<GetGrantRuleToCensResult> getGrantRuleToCens(GetGrantRuleToCensArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:expressconnect/getGrantRuleToCens:getGrantRuleToCens
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the VBR.
Ids Changes to this property will trigger replacement. List<string>
A list of Grant Rule To Cen IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the VBR.
Ids Changes to this property will trigger replacement. []string
A list of Grant Rule To Cen IDs.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the VBR.
ids Changes to this property will trigger replacement. List<String>
A list of Grant Rule To Cen IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Integer
pageSize Integer
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the VBR.
ids Changes to this property will trigger replacement. string[]
A list of Grant Rule To Cen IDs.
outputFile string
File name where to save data source results (after running pulumi preview).
pageNumber number
pageSize number
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the VBR.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Grant Rule To Cen IDs.
output_file str
File name where to save data source results (after running pulumi preview).
page_number int
page_size int
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the VBR.
ids Changes to this property will trigger replacement. List<String>
A list of Grant Rule To Cen IDs.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Number
pageSize Number

getGrantRuleToCens Result

The following output properties are available:

Cens List<Pulumi.AliCloud.ExpressConnect.Outputs.GetGrantRuleToCensCen>
A list of Express Connect Grant Rule To Cens. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
InstanceId string
OutputFile string
PageNumber int
PageSize int
Cens []GetGrantRuleToCensCen
A list of Express Connect Grant Rule To Cens. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
InstanceId string
OutputFile string
PageNumber int
PageSize int
cens List<GetGrantRuleToCensCen>
A list of Express Connect Grant Rule To Cens. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
instanceId String
outputFile String
pageNumber Integer
pageSize Integer
cens GetGrantRuleToCensCen[]
A list of Express Connect Grant Rule To Cens. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
instanceId string
outputFile string
pageNumber number
pageSize number
cens Sequence[GetGrantRuleToCensCen]
A list of Express Connect Grant Rule To Cens. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
instance_id str
output_file str
page_number int
page_size int
cens List<Property Map>
A list of Express Connect Grant Rule To Cens. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
instanceId String
outputFile String
pageNumber Number
pageSize Number

Supporting Types

GetGrantRuleToCensCen

CenId This property is required. string
The ID of the authorized CEN instance.
CenOwnerId This property is required. int
The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
CreateTime This property is required. string
The time when the instance was created.
Id This property is required. string
The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
CenId This property is required. string
The ID of the authorized CEN instance.
CenOwnerId This property is required. int
The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
CreateTime This property is required. string
The time when the instance was created.
Id This property is required. string
The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
cenId This property is required. String
The ID of the authorized CEN instance.
cenOwnerId This property is required. Integer
The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
createTime This property is required. String
The time when the instance was created.
id This property is required. String
The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
cenId This property is required. string
The ID of the authorized CEN instance.
cenOwnerId This property is required. number
The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
createTime This property is required. string
The time when the instance was created.
id This property is required. string
The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
cen_id This property is required. str
The ID of the authorized CEN instance.
cen_owner_id This property is required. int
The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
create_time This property is required. str
The time when the instance was created.
id This property is required. str
The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
cenId This property is required. String
The ID of the authorized CEN instance.
cenOwnerId This property is required. Number
The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
createTime This property is required. String
The time when the instance was created.
id This property is required. String
The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi