// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Mongodb
{
    public static class GetInstanceCurrentOp
    {
        /// <summary>
        /// Use this data source to query detailed information of mongodb instance_current_op
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var instanceCurrentOp = Output.Create(Tencentcloud.Mongodb.GetInstanceCurrentOp.InvokeAsync(new Tencentcloud.Mongodb.GetInstanceCurrentOpArgs
        ///         {
        ///             InstanceId = "cmgo-b43i3wkj",
        ///             Op = "command",
        ///             OrderByType = "desc",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetInstanceCurrentOpResult> InvokeAsync(GetInstanceCurrentOpArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetInstanceCurrentOpResult>("tencentcloud:Mongodb/getInstanceCurrentOp:getInstanceCurrentOp", args ?? new GetInstanceCurrentOpArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of mongodb instance_current_op
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var instanceCurrentOp = Output.Create(Tencentcloud.Mongodb.GetInstanceCurrentOp.InvokeAsync(new Tencentcloud.Mongodb.GetInstanceCurrentOpArgs
        ///         {
        ///             InstanceId = "cmgo-b43i3wkj",
        ///             Op = "command",
        ///             OrderByType = "desc",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetInstanceCurrentOpResult> Invoke(GetInstanceCurrentOpInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetInstanceCurrentOpResult>("tencentcloud:Mongodb/getInstanceCurrentOp:getInstanceCurrentOp", args ?? new GetInstanceCurrentOpInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetInstanceCurrentOpArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
        /// </summary>
        [Input("instanceId", required: true)]
        public string InstanceId { get; set; } = null!;

        /// <summary>
        /// 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].
        /// </summary>
        [Input("millisecondRunning")]
        public int? MillisecondRunning { get; set; }

        /// <summary>
        /// Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
        /// </summary>
        [Input("ns")]
        public string? Ns { get; set; }

        /// <summary>
        /// Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
        /// </summary>
        [Input("op")]
        public string? Op { get; set; }

        /// <summary>
        /// Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
        /// </summary>
        [Input("orderBy")]
        public string? OrderBy { get; set; }

        /// <summary>
        /// Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
        /// </summary>
        [Input("orderByType")]
        public string? OrderByType { get; set; }

        /// <summary>
        /// filter condition, shard name.
        /// </summary>
        [Input("replicaSetName")]
        public string? ReplicaSetName { get; set; }

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        /// <summary>
        /// Filter condition, node status, possible value: primary, secondary.
        /// </summary>
        [Input("state")]
        public string? State { get; set; }

        public GetInstanceCurrentOpArgs()
        {
        }
    }

    public sealed class GetInstanceCurrentOpInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// 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].
        /// </summary>
        [Input("millisecondRunning")]
        public Input<int>? MillisecondRunning { get; set; }

        /// <summary>
        /// Filter condition, the namespace namespace to which the operation belongs, in the format of db.collection.
        /// </summary>
        [Input("ns")]
        public Input<string>? Ns { get; set; }

        /// <summary>
        /// Filter condition, operation type, possible values: none, update, insert, query, command, getmore,remove and killcursors.
        /// </summary>
        [Input("op")]
        public Input<string>? Op { get; set; }

        /// <summary>
        /// Returns the sorted field of the result set, currently supports: MicrosecsRunning/microsecsrunning,the default is ascending sort.
        /// </summary>
        [Input("orderBy")]
        public Input<string>? OrderBy { get; set; }

        /// <summary>
        /// Returns the sorting method of the result set, possible values: ASC/asc or DESC/desc.
        /// </summary>
        [Input("orderByType")]
        public Input<string>? OrderByType { get; set; }

        /// <summary>
        /// filter condition, shard name.
        /// </summary>
        [Input("replicaSetName")]
        public Input<string>? ReplicaSetName { get; set; }

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        /// <summary>
        /// Filter condition, node status, possible value: primary, secondary.
        /// </summary>
        [Input("state")]
        public Input<string>? State { get; set; }

        public GetInstanceCurrentOpInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetInstanceCurrentOpResult
    {
        /// <summary>
        /// current operation list.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetInstanceCurrentOpCurrentOpResult> CurrentOps;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string InstanceId;
        public readonly int? MillisecondRunning;
        /// <summary>
        /// operation namespace.
        /// </summary>
        public readonly string? Ns;
        /// <summary>
        /// operation value.
        /// </summary>
        public readonly string? Op;
        public readonly string? OrderBy;
        public readonly string? OrderByType;
        /// <summary>
        /// Replication name.
        /// </summary>
        public readonly string? ReplicaSetName;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// operation state.
        /// </summary>
        public readonly string? State;

        [OutputConstructor]
        private GetInstanceCurrentOpResult(
            ImmutableArray<Outputs.GetInstanceCurrentOpCurrentOpResult> currentOps,

            string id,

            string instanceId,

            int? millisecondRunning,

            string? ns,

            string? op,

            string? orderBy,

            string? orderByType,

            string? replicaSetName,

            string? resultOutputFile,

            string? state)
        {
            CurrentOps = currentOps;
            Id = id;
            InstanceId = instanceId;
            MillisecondRunning = millisecondRunning;
            Ns = ns;
            Op = op;
            OrderBy = orderBy;
            OrderByType = orderByType;
            ReplicaSetName = replicaSetName;
            ResultOutputFile = resultOutputFile;
            State = state;
        }
    }
}
