Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi
This data source provides the Express Connect Router Grant Association of the current Alibaba Cloud user.
NOTE: Available since v1.291.0.
Example Usage
Basic Usage
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 vpcId = config.get("vpcId") || "vpc-xxx";
const ecrOwnerUid = config.get("ecrOwnerUid") || "18xxx";
const ecrId = config.get("ecrId") || "ecr-xxx";
const region = config.get("region") || "cn-hangzhou";
const _default = new alicloud.expressconnect.RouterGrantAssociation("default", {
ecrId: ecrId,
instanceRegionId: region,
instanceId: vpcId,
ecrOwnerAliUid: Number(ecrOwnerUid),
instanceType: "VPC",
});
const ids = alicloud.expressconnect.getRouterGrantAssociationsOutput({
ids: [_default.id],
ecrId: _default.ecrId,
});
export const expressConnectRouterGrantAssociationsId0 = ids.apply(ids => ids.associations?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
vpc_id = config.get("vpcId")
if vpc_id is None:
vpc_id = "vpc-xxx"
ecr_owner_uid = config.get("ecrOwnerUid")
if ecr_owner_uid is None:
ecr_owner_uid = "18xxx"
ecr_id = config.get("ecrId")
if ecr_id is None:
ecr_id = "ecr-xxx"
region = config.get("region")
if region is None:
region = "cn-hangzhou"
default = alicloud.expressconnect.RouterGrantAssociation("default",
ecr_id=ecr_id,
instance_region_id=region,
instance_id=vpc_id,
ecr_owner_ali_uid=int(ecr_owner_uid),
instance_type="VPC")
ids = alicloud.expressconnect.get_router_grant_associations_output(ids=[default.id],
ecr_id=default.ecr_id)
pulumi.export("expressConnectRouterGrantAssociationsId0", ids.associations[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/expressconnect"
"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
}
vpcId := "vpc-xxx"
if param := cfg.Get("vpcId"); param != "" {
vpcId = param
}
ecrOwnerUid := "18xxx"
if param := cfg.Get("ecrOwnerUid"); param != "" {
ecrOwnerUid = param
}
ecrId := "ecr-xxx"
if param := cfg.Get("ecrId"); param != "" {
ecrId = param
}
region := "cn-hangzhou"
if param := cfg.Get("region"); param != "" {
region = param
}
_default, err := expressconnect.NewRouterGrantAssociation(ctx, "default", &expressconnect.RouterGrantAssociationArgs{
EcrId: pulumi.String(ecrId),
InstanceRegionId: pulumi.String(region),
InstanceId: pulumi.String(vpcId),
EcrOwnerAliUid: pulumi.String(ecrOwnerUid),
InstanceType: pulumi.String("VPC"),
})
if err != nil {
return err
}
ids := expressconnect.GetRouterGrantAssociationsOutput(ctx, expressconnect.GetRouterGrantAssociationsOutputArgs{
Ids: pulumi.StringArray{
_default.ID().ToIDOutput().ToStringOutput(),
},
EcrId: _default.EcrId,
}, nil)
ctx.Export("expressConnectRouterGrantAssociationsId0", ids.ApplyT(func(ids expressconnect.GetRouterGrantAssociationsResult) (*string, error) {
return ids.Associations[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
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 vpcId = config.Get("vpcId") ?? "vpc-xxx";
var ecrOwnerUid = config.Get("ecrOwnerUid") ?? "18xxx";
var ecrId = config.Get("ecrId") ?? "ecr-xxx";
var region = config.Get("region") ?? "cn-hangzhou";
var @default = new AliCloud.ExpressConnect.RouterGrantAssociation("default", new()
{
EcrId = ecrId,
InstanceRegionId = region,
InstanceId = vpcId,
EcrOwnerAliUid = ecrOwnerUid,
InstanceType = "VPC",
});
var ids = AliCloud.ExpressConnect.GetRouterGrantAssociations.Invoke(new()
{
Ids = new[]
{
@default.Id,
},
EcrId = @default.EcrId,
});
return new Dictionary<string, object?>
{
["expressConnectRouterGrantAssociationsId0"] = ids.Apply(getRouterGrantAssociationsResult => getRouterGrantAssociationsResult.Associations[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.expressconnect.RouterGrantAssociation;
import com.pulumi.alicloud.expressconnect.RouterGrantAssociationArgs;
import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions;
import com.pulumi.alicloud.expressconnect.inputs.GetRouterGrantAssociationsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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");
final var vpcId = config.get("vpcId").orElse("vpc-xxx");
final var ecrOwnerUid = config.get("ecrOwnerUid").orElse("18xxx");
final var ecrId = config.get("ecrId").orElse("ecr-xxx");
final var region = config.get("region").orElse("cn-hangzhou");
var default_ = new RouterGrantAssociation("default", RouterGrantAssociationArgs.builder()
.ecrId(ecrId)
.instanceRegionId(region)
.instanceId(vpcId)
.ecrOwnerAliUid(ecrOwnerUid)
.instanceType("VPC")
.build());
final var ids = ExpressconnectFunctions.getRouterGrantAssociations(GetRouterGrantAssociationsArgs.builder()
.ids(default_.id())
.ecrId(default_.ecrId())
.build());
ctx.export("expressConnectRouterGrantAssociationsId0", ids.applyValue(_ids -> _ids.associations()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
vpcId:
type: string
default: vpc-xxx
ecrOwnerUid:
type: string
default: 18xxx
ecrId:
type: string
default: ecr-xxx
region:
type: string
default: cn-hangzhou
resources:
default:
type: alicloud:expressconnect:RouterGrantAssociation
properties:
ecrId: ${ecrId}
instanceRegionId: ${region}
instanceId: ${vpcId}
ecrOwnerAliUid: ${ecrOwnerUid}
instanceType: VPC
variables:
ids:
fn::invoke:
function: alicloud:expressconnect:getRouterGrantAssociations
arguments:
ids:
- ${default.id}
ecrId: ${default.ecrId}
outputs:
expressConnectRouterGrantAssociationsId0: ${ids.associations[0].id}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_expressconnect_getroutergrantassociations" "ids" {
ids = [alicloud_expressconnect_routergrantassociation.default.id]
ecr_id = alicloud_expressconnect_routergrantassociation.default.ecr_id
}
resource "alicloud_expressconnect_routergrantassociation" "default" {
ecr_id = var.ecrId
instance_region_id = var.region
instance_id = var.vpcId
ecr_owner_ali_uid = var.ecrOwnerUid
instance_type = "VPC"
}
variable "name" {
type = string
default = "terraform-example"
}
variable "vpcId" {
type = string
default = "vpc-xxx"
}
variable "ecrOwnerUid" {
type = string
default = "18xxx"
}
variable "ecrId" {
type = string
default = "ecr-xxx"
}
variable "region" {
type = string
default = "cn-hangzhou"
}
output "expressConnectRouterGrantAssociationsId0" {
value = data.alicloud_expressconnect_getroutergrantassociations.ids.associations[0].id
}
Using getRouterGrantAssociations
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 getRouterGrantAssociations(args: GetRouterGrantAssociationsArgs, opts?: InvokeOptions): Promise<GetRouterGrantAssociationsResult>
function getRouterGrantAssociationsOutput(args: GetRouterGrantAssociationsOutputArgs, opts?: InvokeOutputOptions): Output<GetRouterGrantAssociationsResult>def get_router_grant_associations(caller_type: Optional[str] = None,
ecr_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
instance_region_id: Optional[str] = None,
instance_type: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRouterGrantAssociationsResult
def get_router_grant_associations_output(caller_type: pulumi.Input[Optional[str]] = None,
ecr_id: pulumi.Input[Optional[str]] = None,
ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
instance_id: pulumi.Input[Optional[str]] = None,
instance_region_id: pulumi.Input[Optional[str]] = None,
instance_type: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetRouterGrantAssociationsResult]func GetRouterGrantAssociations(ctx *Context, args *GetRouterGrantAssociationsArgs, opts ...InvokeOption) (*GetRouterGrantAssociationsResult, error)
func GetRouterGrantAssociationsOutput(ctx *Context, args *GetRouterGrantAssociationsOutputArgs, opts ...InvokeOption) GetRouterGrantAssociationsResultOutput> Note: This function is named GetRouterGrantAssociations in the Go SDK.
public static class GetRouterGrantAssociations
{
public static Task<GetRouterGrantAssociationsResult> InvokeAsync(GetRouterGrantAssociationsArgs args, InvokeOptions? opts = null)
public static Output<GetRouterGrantAssociationsResult> Invoke(GetRouterGrantAssociationsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetRouterGrantAssociationsResult> Invoke(GetRouterGrantAssociationsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetRouterGrantAssociationsResult> getRouterGrantAssociations(GetRouterGrantAssociationsArgs args, InvokeOptions options)
public static Output<GetRouterGrantAssociationsResult> getRouterGrantAssociations(GetRouterGrantAssociationsArgs args, InvokeOptions options)
public static Output<GetRouterGrantAssociationsResult> getRouterGrantAssociations(GetRouterGrantAssociationsArgs args, InvokeOutputOptions options)
fn::invoke:
function: alicloud:expressconnect/getRouterGrantAssociations:getRouterGrantAssociations
arguments:
# arguments dictionarydata "alicloud_expressconnect_get_router_grant_associations" "name" {
# arguments
}The following arguments are supported:
- Ecr
Id string - The ID of the Express Connect Router instance.
- Caller
Type string - The type of the caller. Default value:
ECR. Valid values:ECR,OTHER. - Ids List<string>
- A list of Tr Association IDs.
- Instance
Id string - The ID of the authorized instance.
- Instance
Region stringId - The region where the authorized network instance is located.
- Instance
Type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Ecr
Id string - The ID of the Express Connect Router instance.
- Caller
Type string - The type of the caller. Default value:
ECR. Valid values:ECR,OTHER. - Ids []string
- A list of Tr Association IDs.
- Instance
Id string - The ID of the authorized instance.
- Instance
Region stringId - The region where the authorized network instance is located.
- Instance
Type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- Output
File string - File name where to save data source results (after running
pulumi preview).
- ecr_
id string - The ID of the Express Connect Router instance.
- caller_
type string - The type of the caller. Default value:
ECR. Valid values:ECR,OTHER. - ids list(string)
- A list of Tr Association IDs.
- instance_
id string - The ID of the authorized instance.
- instance_
region_ stringid - The region where the authorized network instance is located.
- instance_
type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- output_
file string - File name where to save data source results (after running
pulumi preview).
- ecr
Id String - The ID of the Express Connect Router instance.
- caller
Type String - The type of the caller. Default value:
ECR. Valid values:ECR,OTHER. - ids List<String>
- A list of Tr Association IDs.
- instance
Id String - The ID of the authorized instance.
- instance
Region StringId - The region where the authorized network instance is located.
- instance
Type String - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- output
File String - File name where to save data source results (after running
pulumi preview).
- ecr
Id string - The ID of the Express Connect Router instance.
- caller
Type string - The type of the caller. Default value:
ECR. Valid values:ECR,OTHER. - ids string[]
- A list of Tr Association IDs.
- instance
Id string - The ID of the authorized instance.
- instance
Region stringId - The region where the authorized network instance is located.
- instance
Type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- output
File string - File name where to save data source results (after running
pulumi preview).
- ecr_
id str - The ID of the Express Connect Router instance.
- caller_
type str - The type of the caller. Default value:
ECR. Valid values:ECR,OTHER. - ids Sequence[str]
- A list of Tr Association IDs.
- instance_
id str - The ID of the authorized instance.
- instance_
region_ strid - The region where the authorized network instance is located.
- instance_
type str - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- output_
file str - File name where to save data source results (after running
pulumi preview).
- ecr
Id String - The ID of the Express Connect Router instance.
- caller
Type String - The type of the caller. Default value:
ECR. Valid values:ECR,OTHER. - ids List<String>
- A list of Tr Association IDs.
- instance
Id String - The ID of the authorized instance.
- instance
Region StringId - The region where the authorized network instance is located.
- instance
Type String - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- output
File String - File name where to save data source results (after running
pulumi preview).
getRouterGrantAssociations Result
The following output properties are available:
- Associations
List<Pulumi.
Ali Cloud. Express Connect. Outputs. Get Router Grant Associations Association> - A list of Grant Associations. Each element contains the following attributes:
- Ecr
Id string - The ID of the Express Connect Router instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Caller
Type string - Instance
Id string - The ID of the authorized instance.
- Instance
Region stringId - The ID of the region to which the authorized instance belongs.
- Instance
Type string - The type of the network instance.
- Output
File string
- Associations
[]Get
Router Grant Associations Association - A list of Grant Associations. Each element contains the following attributes:
- Ecr
Id string - The ID of the Express Connect Router instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Caller
Type string - Instance
Id string - The ID of the authorized instance.
- Instance
Region stringId - The ID of the region to which the authorized instance belongs.
- Instance
Type string - The type of the network instance.
- Output
File string
- associations list(object)
- A list of Grant Associations. Each element contains the following attributes:
- ecr_
id string - The ID of the Express Connect Router instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- caller_
type string - instance_
id string - The ID of the authorized instance.
- instance_
region_ stringid - The ID of the region to which the authorized instance belongs.
- instance_
type string - The type of the network instance.
- output_
file string
- associations
List<Get
Router Grant Associations Association> - A list of Grant Associations. Each element contains the following attributes:
- ecr
Id String - The ID of the Express Connect Router instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- caller
Type String - instance
Id String - The ID of the authorized instance.
- instance
Region StringId - The ID of the region to which the authorized instance belongs.
- instance
Type String - The type of the network instance.
- output
File String
- associations
Get
Router Grant Associations Association[] - A list of Grant Associations. Each element contains the following attributes:
- ecr
Id string - The ID of the Express Connect Router instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- caller
Type string - instance
Id string - The ID of the authorized instance.
- instance
Region stringId - The ID of the region to which the authorized instance belongs.
- instance
Type string - The type of the network instance.
- output
File string
- associations
Sequence[Get
Router Grant Associations Association] - A list of Grant Associations. Each element contains the following attributes:
- ecr_
id str - The ID of the Express Connect Router instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- caller_
type str - instance_
id str - The ID of the authorized instance.
- instance_
region_ strid - The ID of the region to which the authorized instance belongs.
- instance_
type str - The type of the network instance.
- output_
file str
- associations List<Property Map>
- A list of Grant Associations. Each element contains the following attributes:
- ecr
Id String - The ID of the Express Connect Router instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- caller
Type String - instance
Id String - The ID of the authorized instance.
- instance
Region StringId - The ID of the region to which the authorized instance belongs.
- instance
Type String - The type of the network instance.
- output
File String
Supporting Types
GetRouterGrantAssociationsAssociation
- Create
Time string - The time when the instance was created.
- Ecr
Id string - The ID of the Express Connect Router instance.
- Grant
Id string - The authorization ID.
- Id string
- The ID of the Grant Association.
- Instance
Id string - The ID of the authorized instance.
- Instance
Owner stringBid - The ID of the enterprise account to which the instance belongs.
- Instance
Owner stringId - The ID of the Alibaba Cloud account to which the instance belongs.
- Instance
Region stringId - The region where the authorized network instance is located.
- Instance
Type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- Modify
Time string - The time when the instance was modified.
- Owner
Id string - The ID of the Alibaba Cloud account that owns the Express Connect Router instance.
- Status string
- The status of the authorized network instance.
- Create
Time string - The time when the instance was created.
- Ecr
Id string - The ID of the Express Connect Router instance.
- Grant
Id string - The authorization ID.
- Id string
- The ID of the Grant Association.
- Instance
Id string - The ID of the authorized instance.
- Instance
Owner stringBid - The ID of the enterprise account to which the instance belongs.
- Instance
Owner stringId - The ID of the Alibaba Cloud account to which the instance belongs.
- Instance
Region stringId - The region where the authorized network instance is located.
- Instance
Type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- Modify
Time string - The time when the instance was modified.
- Owner
Id string - The ID of the Alibaba Cloud account that owns the Express Connect Router instance.
- Status string
- The status of the authorized network instance.
- create_
time string - The time when the instance was created.
- ecr_
id string - The ID of the Express Connect Router instance.
- grant_
id string - The authorization ID.
- id string
- The ID of the Grant Association.
- instance_
id string - The ID of the authorized instance.
- instance_
owner_ stringbid - The ID of the enterprise account to which the instance belongs.
- instance_
owner_ stringid - The ID of the Alibaba Cloud account to which the instance belongs.
- instance_
region_ stringid - The region where the authorized network instance is located.
- instance_
type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- modify_
time string - The time when the instance was modified.
- owner_
id string - The ID of the Alibaba Cloud account that owns the Express Connect Router instance.
- status string
- The status of the authorized network instance.
- create
Time String - The time when the instance was created.
- ecr
Id String - The ID of the Express Connect Router instance.
- grant
Id String - The authorization ID.
- id String
- The ID of the Grant Association.
- instance
Id String - The ID of the authorized instance.
- instance
Owner StringBid - The ID of the enterprise account to which the instance belongs.
- instance
Owner StringId - The ID of the Alibaba Cloud account to which the instance belongs.
- instance
Region StringId - The region where the authorized network instance is located.
- instance
Type String - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- modify
Time String - The time when the instance was modified.
- owner
Id String - The ID of the Alibaba Cloud account that owns the Express Connect Router instance.
- status String
- The status of the authorized network instance.
- create
Time string - The time when the instance was created.
- ecr
Id string - The ID of the Express Connect Router instance.
- grant
Id string - The authorization ID.
- id string
- The ID of the Grant Association.
- instance
Id string - The ID of the authorized instance.
- instance
Owner stringBid - The ID of the enterprise account to which the instance belongs.
- instance
Owner stringId - The ID of the Alibaba Cloud account to which the instance belongs.
- instance
Region stringId - The region where the authorized network instance is located.
- instance
Type string - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- modify
Time string - The time when the instance was modified.
- owner
Id string - The ID of the Alibaba Cloud account that owns the Express Connect Router instance.
- status string
- The status of the authorized network instance.
- create_
time str - The time when the instance was created.
- ecr_
id str - The ID of the Express Connect Router instance.
- grant_
id str - The authorization ID.
- id str
- The ID of the Grant Association.
- instance_
id str - The ID of the authorized instance.
- instance_
owner_ strbid - The ID of the enterprise account to which the instance belongs.
- instance_
owner_ strid - The ID of the Alibaba Cloud account to which the instance belongs.
- instance_
region_ strid - The region where the authorized network instance is located.
- instance_
type str - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- modify_
time str - The time when the instance was modified.
- owner_
id str - The ID of the Alibaba Cloud account that owns the Express Connect Router instance.
- status str
- The status of the authorized network instance.
- create
Time String - The time when the instance was created.
- ecr
Id String - The ID of the Express Connect Router instance.
- grant
Id String - The authorization ID.
- id String
- The ID of the Grant Association.
- instance
Id String - The ID of the authorized instance.
- instance
Owner StringBid - The ID of the enterprise account to which the instance belongs.
- instance
Owner StringId - The ID of the Alibaba Cloud account to which the instance belongs.
- instance
Region StringId - The region where the authorized network instance is located.
- instance
Type String - The type of the network instance. Valid values:
VBR: virtual border router (VBR).VPC: virtual private cloud (VPC).
- modify
Time String - The time when the instance was modified.
- owner
Id String - The ID of the Alibaba Cloud account that owns the Express Connect Router instance.
- status String
- The status of the authorized network instance.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Viewing docs for Alibaba Cloud v3.108.0
published on Thursday, Sep 17, 2026 by Pulumi
published on Thursday, Sep 17, 2026 by Pulumi