1. Packages
  2. Volcengine
  3. API Docs
  4. cen
  5. getGrantInstances
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.cen.getGrantInstances

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Use this data source to query detailed information of cen grant instances

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const foo = volcengine.cen.getGrantInstances({
        instanceId: "vpc-2bysvq1xx543k2dx0eeul****",
        instanceRegionId: "cn-beijing",
        instanceType: "VPC",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.cen.get_grant_instances(instance_id="vpc-2bysvq1xx543k2dx0eeul****",
        instance_region_id="cn-beijing",
        instance_type="VPC")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cen"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cen.GetGrantInstances(ctx, &cen.GetGrantInstancesArgs{
    			InstanceId:       pulumi.StringRef("vpc-2bysvq1xx543k2dx0eeul****"),
    			InstanceRegionId: pulumi.StringRef("cn-beijing"),
    			InstanceType:     pulumi.StringRef("VPC"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Volcengine.Cen.GetGrantInstances.Invoke(new()
        {
            InstanceId = "vpc-2bysvq1xx543k2dx0eeul****",
            InstanceRegionId = "cn-beijing",
            InstanceType = "VPC",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.cen.CenFunctions;
    import com.pulumi.volcengine.cen.inputs.GetGrantInstancesArgs;
    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 foo = CenFunctions.getGrantInstances(GetGrantInstancesArgs.builder()
                .instanceId("vpc-2bysvq1xx543k2dx0eeul****")
                .instanceRegionId("cn-beijing")
                .instanceType("VPC")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: volcengine:cen:getGrantInstances
          Arguments:
            instanceId: vpc-2bysvq1xx543k2dx0eeul****
            instanceRegionId: cn-beijing
            instanceType: VPC
    

    Using getGrantInstances

    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 getGrantInstances(args: GetGrantInstancesArgs, opts?: InvokeOptions): Promise<GetGrantInstancesResult>
    function getGrantInstancesOutput(args: GetGrantInstancesOutputArgs, opts?: InvokeOptions): Output<GetGrantInstancesResult>
    def get_grant_instances(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) -> GetGrantInstancesResult
    def get_grant_instances_output(instance_id: Optional[pulumi.Input[str]] = None,
                            instance_region_id: Optional[pulumi.Input[str]] = None,
                            instance_type: Optional[pulumi.Input[str]] = None,
                            output_file: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetGrantInstancesResult]
    func GetGrantInstances(ctx *Context, args *GetGrantInstancesArgs, opts ...InvokeOption) (*GetGrantInstancesResult, error)
    func GetGrantInstancesOutput(ctx *Context, args *GetGrantInstancesOutputArgs, opts ...InvokeOption) GetGrantInstancesResultOutput

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

    public static class GetGrantInstances 
    {
        public static Task<GetGrantInstancesResult> InvokeAsync(GetGrantInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetGrantInstancesResult> Invoke(GetGrantInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGrantInstancesResult> getGrantInstances(GetGrantInstancesArgs args, InvokeOptions options)
    public static Output<GetGrantInstancesResult> getGrantInstances(GetGrantInstancesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:cen/getGrantInstances:getGrantInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance. Valid values: VPC, DCGW.
    OutputFile string
    File name where to save data source results.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance. Valid values: VPC, DCGW.
    OutputFile string
    File name where to save data source results.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance. Valid values: VPC, DCGW.
    outputFile String
    File name where to save data source results.
    instanceId string
    The ID of the instance.
    instanceRegionId string
    The region ID of the instance.
    instanceType string
    The type of the instance. Valid values: VPC, DCGW.
    outputFile string
    File name where to save data source results.
    instance_id str
    The ID of the instance.
    instance_region_id str
    The region ID of the instance.
    instance_type str
    The type of the instance. Valid values: VPC, DCGW.
    output_file str
    File name where to save data source results.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance. Valid values: VPC, DCGW.
    outputFile String
    File name where to save data source results.

    getGrantInstances Result

    The following output properties are available:

    GrantRules List<GetGrantInstancesGrantRule>
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance.
    OutputFile string
    GrantRules []GetGrantInstancesGrantRule
    The collection of query.
    Id string
    The provider-assigned unique ID for this managed resource.
    TotalCount int
    The total count of query.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance.
    OutputFile string
    grantRules List<GetGrantInstancesGrantRule>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Integer
    The total count of query.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance.
    outputFile String
    grantRules GetGrantInstancesGrantRule[]
    The collection of query.
    id string
    The provider-assigned unique ID for this managed resource.
    totalCount number
    The total count of query.
    instanceId string
    The ID of the instance.
    instanceRegionId string
    The region ID of the instance.
    instanceType string
    The type of the instance.
    outputFile string
    grant_rules Sequence[GetGrantInstancesGrantRule]
    The collection of query.
    id str
    The provider-assigned unique ID for this managed resource.
    total_count int
    The total count of query.
    instance_id str
    The ID of the instance.
    instance_region_id str
    The region ID of the instance.
    instance_type str
    The type of the instance.
    output_file str
    grantRules List<Property Map>
    The collection of query.
    id String
    The provider-assigned unique ID for this managed resource.
    totalCount Number
    The total count of query.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance.
    outputFile String

    Supporting Types

    GetGrantInstancesGrantRule

    CenId string
    The ID of the cen.
    CenOwnerId string
    The owner ID of the cen.
    CreationTime string
    The creation time of the grant rule.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance. Valid values: VPC, DCGW.
    CenId string
    The ID of the cen.
    CenOwnerId string
    The owner ID of the cen.
    CreationTime string
    The creation time of the grant rule.
    InstanceId string
    The ID of the instance.
    InstanceRegionId string
    The region ID of the instance.
    InstanceType string
    The type of the instance. Valid values: VPC, DCGW.
    cenId String
    The ID of the cen.
    cenOwnerId String
    The owner ID of the cen.
    creationTime String
    The creation time of the grant rule.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance. Valid values: VPC, DCGW.
    cenId string
    The ID of the cen.
    cenOwnerId string
    The owner ID of the cen.
    creationTime string
    The creation time of the grant rule.
    instanceId string
    The ID of the instance.
    instanceRegionId string
    The region ID of the instance.
    instanceType string
    The type of the instance. Valid values: VPC, DCGW.
    cen_id str
    The ID of the cen.
    cen_owner_id str
    The owner ID of the cen.
    creation_time str
    The creation time of the grant rule.
    instance_id str
    The ID of the instance.
    instance_region_id str
    The region ID of the instance.
    instance_type str
    The type of the instance. Valid values: VPC, DCGW.
    cenId String
    The ID of the cen.
    cenOwnerId String
    The owner ID of the cen.
    creationTime String
    The creation time of the grant rule.
    instanceId String
    The ID of the instance.
    instanceRegionId String
    The region ID of the instance.
    instanceType String
    The type of the instance. Valid values: VPC, DCGW.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine