1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCcnInstances
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getCcnInstances

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of CCN instances.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const main = new tencentcloud.Ccn("main", {
        description: "ci-temp-test-ccn-des",
        qos: "AG",
    });
    const idInstances = tencentcloud.getCcnInstancesOutput({
        ccnId: main.ccnId,
    });
    const nameInstances = tencentcloud.getCcnInstancesOutput({
        name: main.name,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    main = tencentcloud.Ccn("main",
        description="ci-temp-test-ccn-des",
        qos="AG")
    id_instances = tencentcloud.get_ccn_instances_output(ccn_id=main.ccn_id)
    name_instances = tencentcloud.get_ccn_instances_output(name=main.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := tencentcloud.NewCcn(ctx, "main", &tencentcloud.CcnArgs{
    			Description: pulumi.String("ci-temp-test-ccn-des"),
    			Qos:         pulumi.String("AG"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = tencentcloud.GetCcnInstancesOutput(ctx, tencentcloud.GetCcnInstancesOutputArgs{
    			CcnId: main.CcnId,
    		}, nil)
    		_ = tencentcloud.GetCcnInstancesOutput(ctx, tencentcloud.GetCcnInstancesOutputArgs{
    			Name: main.Name,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Tencentcloud.Ccn("main", new()
        {
            Description = "ci-temp-test-ccn-des",
            Qos = "AG",
        });
    
        var idInstances = Tencentcloud.GetCcnInstances.Invoke(new()
        {
            CcnId = main.CcnId,
        });
    
        var nameInstances = Tencentcloud.GetCcnInstances.Invoke(new()
        {
            Name = main.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.Ccn;
    import com.pulumi.tencentcloud.CcnArgs;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetCcnInstancesArgs;
    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) {
            var main = new Ccn("main", CcnArgs.builder()
                .description("ci-temp-test-ccn-des")
                .qos("AG")
                .build());
    
            final var idInstances = TencentcloudFunctions.getCcnInstances(GetCcnInstancesArgs.builder()
                .ccnId(main.ccnId())
                .build());
    
            final var nameInstances = TencentcloudFunctions.getCcnInstances(GetCcnInstancesArgs.builder()
                .name(main.name())
                .build());
    
        }
    }
    
    resources:
      main:
        type: tencentcloud:Ccn
        properties:
          description: ci-temp-test-ccn-des
          qos: AG
    variables:
      idInstances:
        fn::invoke:
          function: tencentcloud:getCcnInstances
          arguments:
            ccnId: ${main.ccnId}
      nameInstances:
        fn::invoke:
          function: tencentcloud:getCcnInstances
          arguments:
            name: ${main.name}
    

    Using getCcnInstances

    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 getCcnInstances(args: GetCcnInstancesArgs, opts?: InvokeOptions): Promise<GetCcnInstancesResult>
    function getCcnInstancesOutput(args: GetCcnInstancesOutputArgs, opts?: InvokeOptions): Output<GetCcnInstancesResult>
    def get_ccn_instances(ccn_id: Optional[str] = None,
                          id: Optional[str] = None,
                          name: Optional[str] = None,
                          result_output_file: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCcnInstancesResult
    def get_ccn_instances_output(ccn_id: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          result_output_file: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCcnInstancesResult]
    func GetCcnInstances(ctx *Context, args *GetCcnInstancesArgs, opts ...InvokeOption) (*GetCcnInstancesResult, error)
    func GetCcnInstancesOutput(ctx *Context, args *GetCcnInstancesOutputArgs, opts ...InvokeOption) GetCcnInstancesResultOutput

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

    public static class GetCcnInstances 
    {
        public static Task<GetCcnInstancesResult> InvokeAsync(GetCcnInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetCcnInstancesResult> Invoke(GetCcnInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCcnInstancesResult> getCcnInstances(GetCcnInstancesArgs args, InvokeOptions options)
    public static Output<GetCcnInstancesResult> getCcnInstances(GetCcnInstancesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCcnInstances:getCcnInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CcnId string
    ID of the CCN to be queried.
    Id string
    Name string
    Name of the CCN to be queried.
    ResultOutputFile string
    Used to save results.
    CcnId string
    ID of the CCN to be queried.
    Id string
    Name string
    Name of the CCN to be queried.
    ResultOutputFile string
    Used to save results.
    ccnId String
    ID of the CCN to be queried.
    id String
    name String
    Name of the CCN to be queried.
    resultOutputFile String
    Used to save results.
    ccnId string
    ID of the CCN to be queried.
    id string
    name string
    Name of the CCN to be queried.
    resultOutputFile string
    Used to save results.
    ccn_id str
    ID of the CCN to be queried.
    id str
    name str
    Name of the CCN to be queried.
    result_output_file str
    Used to save results.
    ccnId String
    ID of the CCN to be queried.
    id String
    name String
    Name of the CCN to be queried.
    resultOutputFile String
    Used to save results.

    getCcnInstances Result

    The following output properties are available:

    Id string
    InstanceLists List<GetCcnInstancesInstanceList>
    Information list of CCN.
    CcnId string
    ID of the CCN.
    Name string
    Name of the CCN.
    ResultOutputFile string
    Id string
    InstanceLists []GetCcnInstancesInstanceList
    Information list of CCN.
    CcnId string
    ID of the CCN.
    Name string
    Name of the CCN.
    ResultOutputFile string
    id String
    instanceLists List<GetCcnInstancesInstanceList>
    Information list of CCN.
    ccnId String
    ID of the CCN.
    name String
    Name of the CCN.
    resultOutputFile String
    id string
    instanceLists GetCcnInstancesInstanceList[]
    Information list of CCN.
    ccnId string
    ID of the CCN.
    name string
    Name of the CCN.
    resultOutputFile string
    id str
    instance_lists Sequence[GetCcnInstancesInstanceList]
    Information list of CCN.
    ccn_id str
    ID of the CCN.
    name str
    Name of the CCN.
    result_output_file str
    id String
    instanceLists List<Property Map>
    Information list of CCN.
    ccnId String
    ID of the CCN.
    name String
    Name of the CCN.
    resultOutputFile String

    Supporting Types

    GetCcnInstancesInstanceList

    AttachmentLists List<GetCcnInstancesInstanceListAttachmentList>
    Information list of instance is attached.
    BandwidthLimitType string
    The speed limit type.
    CcnId string
    ID of the CCN to be queried.
    ChargeType string
    Billing mode.
    CreateTime string
    Creation time of resource.
    Description string
    Description of the CCN.
    Name string
    Name of the CCN to be queried.
    Qos string
    Service quality of CCN, and the available value include 'PT', 'AU', 'AG'. The default is 'AU'.
    State string
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    AttachmentLists []GetCcnInstancesInstanceListAttachmentList
    Information list of instance is attached.
    BandwidthLimitType string
    The speed limit type.
    CcnId string
    ID of the CCN to be queried.
    ChargeType string
    Billing mode.
    CreateTime string
    Creation time of resource.
    Description string
    Description of the CCN.
    Name string
    Name of the CCN to be queried.
    Qos string
    Service quality of CCN, and the available value include 'PT', 'AU', 'AG'. The default is 'AU'.
    State string
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attachmentLists List<GetCcnInstancesInstanceListAttachmentList>
    Information list of instance is attached.
    bandwidthLimitType String
    The speed limit type.
    ccnId String
    ID of the CCN to be queried.
    chargeType String
    Billing mode.
    createTime String
    Creation time of resource.
    description String
    Description of the CCN.
    name String
    Name of the CCN to be queried.
    qos String
    Service quality of CCN, and the available value include 'PT', 'AU', 'AG'. The default is 'AU'.
    state String
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attachmentLists GetCcnInstancesInstanceListAttachmentList[]
    Information list of instance is attached.
    bandwidthLimitType string
    The speed limit type.
    ccnId string
    ID of the CCN to be queried.
    chargeType string
    Billing mode.
    createTime string
    Creation time of resource.
    description string
    Description of the CCN.
    name string
    Name of the CCN to be queried.
    qos string
    Service quality of CCN, and the available value include 'PT', 'AU', 'AG'. The default is 'AU'.
    state string
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attachment_lists Sequence[GetCcnInstancesInstanceListAttachmentList]
    Information list of instance is attached.
    bandwidth_limit_type str
    The speed limit type.
    ccn_id str
    ID of the CCN to be queried.
    charge_type str
    Billing mode.
    create_time str
    Creation time of resource.
    description str
    Description of the CCN.
    name str
    Name of the CCN to be queried.
    qos str
    Service quality of CCN, and the available value include 'PT', 'AU', 'AG'. The default is 'AU'.
    state str
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attachmentLists List<Property Map>
    Information list of instance is attached.
    bandwidthLimitType String
    The speed limit type.
    ccnId String
    ID of the CCN to be queried.
    chargeType String
    Billing mode.
    createTime String
    Creation time of resource.
    description String
    Description of the CCN.
    name String
    Name of the CCN to be queried.
    qos String
    Service quality of CCN, and the available value include 'PT', 'AU', 'AG'. The default is 'AU'.
    state String
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.

    GetCcnInstancesInstanceListAttachmentList

    AttachedTime string
    Time of attaching.
    CidrBlocks List<string>
    A network address block of the instance that is attached.
    InstanceId string
    ID of instance is attached.
    InstanceRegion string
    The region that the instance locates at.
    InstanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.
    State string
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    AttachedTime string
    Time of attaching.
    CidrBlocks []string
    A network address block of the instance that is attached.
    InstanceId string
    ID of instance is attached.
    InstanceRegion string
    The region that the instance locates at.
    InstanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.
    State string
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attachedTime String
    Time of attaching.
    cidrBlocks List<String>
    A network address block of the instance that is attached.
    instanceId String
    ID of instance is attached.
    instanceRegion String
    The region that the instance locates at.
    instanceType String
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.
    state String
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attachedTime string
    Time of attaching.
    cidrBlocks string[]
    A network address block of the instance that is attached.
    instanceId string
    ID of instance is attached.
    instanceRegion string
    The region that the instance locates at.
    instanceType string
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.
    state string
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attached_time str
    Time of attaching.
    cidr_blocks Sequence[str]
    A network address block of the instance that is attached.
    instance_id str
    ID of instance is attached.
    instance_region str
    The region that the instance locates at.
    instance_type str
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.
    state str
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.
    attachedTime String
    Time of attaching.
    cidrBlocks List<String>
    A network address block of the instance that is attached.
    instanceId String
    ID of instance is attached.
    instanceRegion String
    The region that the instance locates at.
    instanceType String
    Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.
    state String
    States of instance. The available value include 'ISOLATED'(arrears) and 'AVAILABLE'.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack