1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. expressconnect
  5. getGrantRuleToCens
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.expressconnect.getGrantRuleToCens

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:expressconnect:getGrantRuleToCens
          Arguments:
            ids:
              - example_id
            instanceId: your_vbr_instance_id
    outputs:
      expressConnectGrantRuleToCenId0: ${ids.cens[0].id}
    

    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>
    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]
    func GetGrantRuleToCens(ctx *Context, args *GetGrantRuleToCensArgs, opts ...InvokeOption) (*GetGrantRuleToCensResult, error)
    func GetGrantRuleToCensOutput(ctx *Context, args *GetGrantRuleToCensOutputArgs, opts ...InvokeOption) GetGrantRuleToCensResultOutput

    > 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)
    }
    public static CompletableFuture<GetGrantRuleToCensResult> getGrantRuleToCens(GetGrantRuleToCensArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:expressconnect/getGrantRuleToCens:getGrantRuleToCens
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The ID of the VBR.
    Ids 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 string
    The ID of the VBR.
    Ids []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 String
    The ID of the VBR.
    ids 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 string
    The ID of the VBR.
    ids 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 str
    The ID of the VBR.
    ids 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 String
    The ID of the VBR.
    ids 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 string
    The ID of the authorized CEN instance.
    CenOwnerId int
    The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
    CreateTime string
    The time when the instance was created.
    Id string
    The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
    CenId string
    The ID of the authorized CEN instance.
    CenOwnerId int
    The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
    CreateTime string
    The time when the instance was created.
    Id string
    The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
    cenId String
    The ID of the authorized CEN instance.
    cenOwnerId Integer
    The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
    createTime String
    The time when the instance was created.
    id String
    The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
    cenId string
    The ID of the authorized CEN instance.
    cenOwnerId number
    The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
    createTime string
    The time when the instance was created.
    id string
    The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
    cen_id str
    The ID of the authorized CEN instance.
    cen_owner_id int
    The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
    create_time str
    The time when the instance was created.
    id str
    The ID of the Grant Rule To Cen. It formats as <cen_id>:<cen_owner_id>:<instance_id>.
    cenId String
    The ID of the authorized CEN instance.
    cenOwnerId Number
    The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.
    createTime String
    The time when the instance was created.
    id 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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi