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

tencentcloud.getMongodbInstanceCurrentOp

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 mongodb instance_current_op

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const instanceCurrentOp = tencentcloud.getMongodbInstanceCurrentOp({
        instanceId: "cmgo-b43i3wkj",
        op: "command",
        orderByType: "desc",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    instance_current_op = tencentcloud.get_mongodb_instance_current_op(instance_id="cmgo-b43i3wkj",
        op="command",
        order_by_type="desc")
    
    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 {
    		_, err := tencentcloud.GetMongodbInstanceCurrentOp(ctx, &tencentcloud.GetMongodbInstanceCurrentOpArgs{
    			InstanceId:  "cmgo-b43i3wkj",
    			Op:          pulumi.StringRef("command"),
    			OrderByType: pulumi.StringRef("desc"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instanceCurrentOp = Tencentcloud.GetMongodbInstanceCurrentOp.Invoke(new()
        {
            InstanceId = "cmgo-b43i3wkj",
            Op = "command",
            OrderByType = "desc",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetMongodbInstanceCurrentOpArgs;
    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 instanceCurrentOp = TencentcloudFunctions.getMongodbInstanceCurrentOp(GetMongodbInstanceCurrentOpArgs.builder()
                .instanceId("cmgo-b43i3wkj")
                .op("command")
                .orderByType("desc")
                .build());
    
        }
    }
    
    variables:
      instanceCurrentOp:
        fn::invoke:
          function: tencentcloud:getMongodbInstanceCurrentOp
          arguments:
            instanceId: cmgo-b43i3wkj
            op: command
            orderByType: desc
    

    Using getMongodbInstanceCurrentOp

    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 getMongodbInstanceCurrentOp(args: GetMongodbInstanceCurrentOpArgs, opts?: InvokeOptions): Promise<GetMongodbInstanceCurrentOpResult>
    function getMongodbInstanceCurrentOpOutput(args: GetMongodbInstanceCurrentOpOutputArgs, opts?: InvokeOptions): Output<GetMongodbInstanceCurrentOpResult>
    def get_mongodb_instance_current_op(id: Optional[str] = None,
                                        instance_id: Optional[str] = None,
                                        millisecond_running: Optional[float] = None,
                                        ns: Optional[str] = None,
                                        op: Optional[str] = None,
                                        order_by: Optional[str] = None,
                                        order_by_type: Optional[str] = None,
                                        replica_set_name: Optional[str] = None,
                                        result_output_file: Optional[str] = None,
                                        state: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetMongodbInstanceCurrentOpResult
    def get_mongodb_instance_current_op_output(id: Optional[pulumi.Input[str]] = None,
                                        instance_id: Optional[pulumi.Input[str]] = None,
                                        millisecond_running: Optional[pulumi.Input[float]] = None,
                                        ns: Optional[pulumi.Input[str]] = None,
                                        op: Optional[pulumi.Input[str]] = None,
                                        order_by: Optional[pulumi.Input[str]] = None,
                                        order_by_type: Optional[pulumi.Input[str]] = None,
                                        replica_set_name: Optional[pulumi.Input[str]] = None,
                                        result_output_file: Optional[pulumi.Input[str]] = None,
                                        state: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetMongodbInstanceCurrentOpResult]
    func GetMongodbInstanceCurrentOp(ctx *Context, args *GetMongodbInstanceCurrentOpArgs, opts ...InvokeOption) (*GetMongodbInstanceCurrentOpResult, error)
    func GetMongodbInstanceCurrentOpOutput(ctx *Context, args *GetMongodbInstanceCurrentOpOutputArgs, opts ...InvokeOption) GetMongodbInstanceCurrentOpResultOutput

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

    public static class GetMongodbInstanceCurrentOp 
    {
        public static Task<GetMongodbInstanceCurrentOpResult> InvokeAsync(GetMongodbInstanceCurrentOpArgs args, InvokeOptions? opts = null)
        public static Output<GetMongodbInstanceCurrentOpResult> Invoke(GetMongodbInstanceCurrentOpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMongodbInstanceCurrentOpResult> getMongodbInstanceCurrentOp(GetMongodbInstanceCurrentOpArgs args, InvokeOptions options)
    public static Output<GetMongodbInstanceCurrentOpResult> getMongodbInstanceCurrentOp(GetMongodbInstanceCurrentOpArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getMongodbInstanceCurrentOp:getMongodbInstanceCurrentOp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    Id string
    MillisecondRunning double
    Filter condition, the time that the operation has been executed (unit: millisecond),the result will return the operation that exceeds the set time, the default value is 0,and the value range is [0, 3600000].
    Ns string
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    Op string
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    OrderBy string
    Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
    OrderByType string
    Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
    ReplicaSetName string
    filter condition, shard name.
    ResultOutputFile string
    Used to save results.
    State string
    Filter condition, node status, possible value: primary, secondary.
    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    Id string
    MillisecondRunning float64
    Filter condition, the time that the operation has been executed (unit: millisecond),the result will return the operation that exceeds the set time, the default value is 0,and the value range is [0, 3600000].
    Ns string
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    Op string
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    OrderBy string
    Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
    OrderByType string
    Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
    ReplicaSetName string
    filter condition, shard name.
    ResultOutputFile string
    Used to save results.
    State string
    Filter condition, node status, possible value: primary, secondary.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    id String
    millisecondRunning Double
    Filter condition, the time that the operation has been executed (unit: millisecond),the result will return the operation that exceeds the set time, the default value is 0,and the value range is [0, 3600000].
    ns String
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op String
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    orderBy String
    Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
    orderByType String
    Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
    replicaSetName String
    filter condition, shard name.
    resultOutputFile String
    Used to save results.
    state String
    Filter condition, node status, possible value: primary, secondary.
    instanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    id string
    millisecondRunning number
    Filter condition, the time that the operation has been executed (unit: millisecond),the result will return the operation that exceeds the set time, the default value is 0,and the value range is [0, 3600000].
    ns string
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op string
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    orderBy string
    Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
    orderByType string
    Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
    replicaSetName string
    filter condition, shard name.
    resultOutputFile string
    Used to save results.
    state string
    Filter condition, node status, possible value: primary, secondary.
    instance_id str
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    id str
    millisecond_running float
    Filter condition, the time that the operation has been executed (unit: millisecond),the result will return the operation that exceeds the set time, the default value is 0,and the value range is [0, 3600000].
    ns str
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op str
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    order_by str
    Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
    order_by_type str
    Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
    replica_set_name str
    filter condition, shard name.
    result_output_file str
    Used to save results.
    state str
    Filter condition, node status, possible value: primary, secondary.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    id String
    millisecondRunning Number
    Filter condition, the time that the operation has been executed (unit: millisecond),the result will return the operation that exceeds the set time, the default value is 0,and the value range is [0, 3600000].
    ns String
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op String
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    orderBy String
    Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
    orderByType String
    Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
    replicaSetName String
    filter condition, shard name.
    resultOutputFile String
    Used to save results.
    state String
    Filter condition, node status, possible value: primary, secondary.

    getMongodbInstanceCurrentOp Result

    The following output properties are available:

    CurrentOps List<GetMongodbInstanceCurrentOpCurrentOp>
    current operation list.
    Id string
    InstanceId string
    MillisecondRunning double
    Ns string
    operation namespace.
    Op string
    operation value.
    OrderBy string
    OrderByType string
    ReplicaSetName string
    Replication name.
    ResultOutputFile string
    State string
    operation state.
    CurrentOps []GetMongodbInstanceCurrentOpCurrentOp
    current operation list.
    Id string
    InstanceId string
    MillisecondRunning float64
    Ns string
    operation namespace.
    Op string
    operation value.
    OrderBy string
    OrderByType string
    ReplicaSetName string
    Replication name.
    ResultOutputFile string
    State string
    operation state.
    currentOps List<GetMongodbInstanceCurrentOpCurrentOp>
    current operation list.
    id String
    instanceId String
    millisecondRunning Double
    ns String
    operation namespace.
    op String
    operation value.
    orderBy String
    orderByType String
    replicaSetName String
    Replication name.
    resultOutputFile String
    state String
    operation state.
    currentOps GetMongodbInstanceCurrentOpCurrentOp[]
    current operation list.
    id string
    instanceId string
    millisecondRunning number
    ns string
    operation namespace.
    op string
    operation value.
    orderBy string
    orderByType string
    replicaSetName string
    Replication name.
    resultOutputFile string
    state string
    operation state.
    current_ops Sequence[GetMongodbInstanceCurrentOpCurrentOp]
    current operation list.
    id str
    instance_id str
    millisecond_running float
    ns str
    operation namespace.
    op str
    operation value.
    order_by str
    order_by_type str
    replica_set_name str
    Replication name.
    result_output_file str
    state str
    operation state.
    currentOps List<Property Map>
    current operation list.
    id String
    instanceId String
    millisecondRunning Number
    ns String
    operation namespace.
    op String
    operation value.
    orderBy String
    orderByType String
    replicaSetName String
    Replication name.
    resultOutputFile String
    state String
    operation state.

    Supporting Types

    GetMongodbInstanceCurrentOpCurrentOp

    MicrosecsRunning double
    running time(ms).
    NodeName string
    Node name.
    Ns string
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    Op string
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    OpId double
    operation id.
    Operation string
    operation info.
    Query string
    operation query.
    ReplicaSetName string
    filter condition, shard name.
    State string
    Filter condition, node status, possible value: primary, secondary.
    MicrosecsRunning float64
    running time(ms).
    NodeName string
    Node name.
    Ns string
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    Op string
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    OpId float64
    operation id.
    Operation string
    operation info.
    Query string
    operation query.
    ReplicaSetName string
    filter condition, shard name.
    State string
    Filter condition, node status, possible value: primary, secondary.
    microsecsRunning Double
    running time(ms).
    nodeName String
    Node name.
    ns String
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op String
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    opId Double
    operation id.
    operation String
    operation info.
    query String
    operation query.
    replicaSetName String
    filter condition, shard name.
    state String
    Filter condition, node status, possible value: primary, secondary.
    microsecsRunning number
    running time(ms).
    nodeName string
    Node name.
    ns string
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op string
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    opId number
    operation id.
    operation string
    operation info.
    query string
    operation query.
    replicaSetName string
    filter condition, shard name.
    state string
    Filter condition, node status, possible value: primary, secondary.
    microsecs_running float
    running time(ms).
    node_name str
    Node name.
    ns str
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op str
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    op_id float
    operation id.
    operation str
    operation info.
    query str
    operation query.
    replica_set_name str
    filter condition, shard name.
    state str
    Filter condition, node status, possible value: primary, secondary.
    microsecsRunning Number
    running time(ms).
    nodeName String
    Node name.
    ns String
    Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
    op String
    Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
    opId Number
    operation id.
    operation String
    operation info.
    query String
    operation query.
    replicaSetName String
    filter condition, shard name.
    state String
    Filter condition, node status, possible value: primary, secondary.

    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