<reponame>Dwonczykj/gember_deploy<gh_stars>0// *** 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.Dnspod
{
    public static class GetRecords
    {
        /// <summary>
        /// Use this data source to query dnspod record list.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var record = Output.Create(Tencentcloud.Dnspod.GetRecords.InvokeAsync(new Tencentcloud.Dnspod.GetRecordsArgs
        ///         {
        ///             Domain = "example.com",
        ///             Subdomain = "www",
        ///         }));
        ///         this.Result = record.Apply(record =&gt; record.Results);
        ///     }
        /// 
        ///     [Output("result")]
        ///     public Output&lt;string&gt; Result { get; set; }
        /// }
        /// ```
        /// 
        /// Use verbose filter
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var record = Output.Create(Tencentcloud.Dnspod.GetRecords.InvokeAsync(new Tencentcloud.Dnspod.GetRecordsArgs
        ///         {
        ///             Domain = "example.com",
        ///             Subdomain = "www",
        ///             Limit = 100,
        ///             RecordType = "TXT",
        ///             SortField = "updated_on",
        ///             SortType = "DESC",
        ///         }));
        ///         this.Result = record.Apply(record =&gt; record.Results);
        ///     }
        /// 
        ///     [Output("result")]
        ///     public Output&lt;string&gt; Result { get; set; }
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetRecordsResult> InvokeAsync(GetRecordsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetRecordsResult>("tencentcloud:Dnspod/getRecords:getRecords", args ?? new GetRecordsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query dnspod record list.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var record = Output.Create(Tencentcloud.Dnspod.GetRecords.InvokeAsync(new Tencentcloud.Dnspod.GetRecordsArgs
        ///         {
        ///             Domain = "example.com",
        ///             Subdomain = "www",
        ///         }));
        ///         this.Result = record.Apply(record =&gt; record.Results);
        ///     }
        /// 
        ///     [Output("result")]
        ///     public Output&lt;string&gt; Result { get; set; }
        /// }
        /// ```
        /// 
        /// Use verbose filter
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var record = Output.Create(Tencentcloud.Dnspod.GetRecords.InvokeAsync(new Tencentcloud.Dnspod.GetRecordsArgs
        ///         {
        ///             Domain = "example.com",
        ///             Subdomain = "www",
        ///             Limit = 100,
        ///             RecordType = "TXT",
        ///             SortField = "updated_on",
        ///             SortType = "DESC",
        ///         }));
        ///         this.Result = record.Apply(record =&gt; record.Results);
        ///     }
        /// 
        ///     [Output("result")]
        ///     public Output&lt;string&gt; Result { get; set; }
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetRecordsResult> Invoke(GetRecordsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetRecordsResult>("tencentcloud:Dnspod/getRecords:getRecords", args ?? new GetRecordsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetRecordsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// The domain for which DNS records are to be obtained.
        /// </summary>
        [Input("domain")]
        public string? Domain { get; set; }

        /// <summary>
        /// The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
        /// </summary>
        [Input("domainId")]
        public string? DomainId { get; set; }

        /// <summary>
        /// The group ID.
        /// </summary>
        [Input("groupId")]
        public string? GroupId { get; set; }

        /// <summary>
        /// The keyword for searching for DNS records. Host headers and record values are supported.
        /// </summary>
        [Input("keyword")]
        public string? Keyword { get; set; }

        /// <summary>
        /// The limit. It defaults to 100 and can be up to 3,000.
        /// </summary>
        [Input("limit")]
        public int? Limit { get; set; }

        /// <summary>
        /// The offset. Default value: 0.
        /// </summary>
        [Input("offset")]
        public int? Offset { get; set; }

        /// <summary>
        /// The split zone name.
        /// </summary>
        [Input("recordLine")]
        public string? RecordLine { get; set; }

        /// <summary>
        /// The split zone ID. If `record_line_id` is passed in, the system will omit the parameter `record_line`.
        /// </summary>
        [Input("recordLineId")]
        public string? RecordLineId { get; set; }

        /// <summary>
        /// The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
        /// </summary>
        [Input("recordType")]
        public string? RecordType { get; set; }

        /// <summary>
        /// Used for store query result as JSON.
        /// </summary>
        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        /// <summary>
        /// The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
        /// </summary>
        [Input("sortField")]
        public string? SortField { get; set; }

        /// <summary>
        /// The sorting type. Valid values: ASC (ascending, default), DESC (descending).
        /// </summary>
        [Input("sortType")]
        public string? SortType { get; set; }

        /// <summary>
        /// The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.
        /// </summary>
        [Input("subdomain")]
        public string? Subdomain { get; set; }

        public GetRecordsArgs()
        {
        }
    }

    public sealed class GetRecordsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// The domain for which DNS records are to be obtained.
        /// </summary>
        [Input("domain")]
        public Input<string>? Domain { get; set; }

        /// <summary>
        /// The ID of the domain for which DNS records are to be obtained. If DomainId is passed in, the system will omit the parameter domain.
        /// </summary>
        [Input("domainId")]
        public Input<string>? DomainId { get; set; }

        /// <summary>
        /// The group ID.
        /// </summary>
        [Input("groupId")]
        public Input<string>? GroupId { get; set; }

        /// <summary>
        /// The keyword for searching for DNS records. Host headers and record values are supported.
        /// </summary>
        [Input("keyword")]
        public Input<string>? Keyword { get; set; }

        /// <summary>
        /// The limit. It defaults to 100 and can be up to 3,000.
        /// </summary>
        [Input("limit")]
        public Input<int>? Limit { get; set; }

        /// <summary>
        /// The offset. Default value: 0.
        /// </summary>
        [Input("offset")]
        public Input<int>? Offset { get; set; }

        /// <summary>
        /// The split zone name.
        /// </summary>
        [Input("recordLine")]
        public Input<string>? RecordLine { get; set; }

        /// <summary>
        /// The split zone ID. If `record_line_id` is passed in, the system will omit the parameter `record_line`.
        /// </summary>
        [Input("recordLineId")]
        public Input<string>? RecordLineId { get; set; }

        /// <summary>
        /// The type of DNS record, such as A, CNAME, NS, AAAA, explicit URL, implicit URL, CAA, or SPF record.
        /// </summary>
        [Input("recordType")]
        public Input<string>? RecordType { get; set; }

        /// <summary>
        /// Used for store query result as JSON.
        /// </summary>
        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        /// <summary>
        /// The sorting field. Available values: name, line, type, value, weight, mx, and ttl,updated_on.
        /// </summary>
        [Input("sortField")]
        public Input<string>? SortField { get; set; }

        /// <summary>
        /// The sorting type. Valid values: ASC (ascending, default), DESC (descending).
        /// </summary>
        [Input("sortType")]
        public Input<string>? SortType { get; set; }

        /// <summary>
        /// The host header of a DNS record. If this parameter is passed in, only the DNS record corresponding to this host header will be returned.
        /// </summary>
        [Input("subdomain")]
        public Input<string>? Subdomain { get; set; }

        public GetRecordsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetRecordsResult
    {
        public readonly string? Domain;
        public readonly string? DomainId;
        public readonly string? GroupId;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? Keyword;
        public readonly int? Limit;
        public readonly int? Offset;
        /// <summary>
        /// Count info of the queried record list.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRecordsRecordCountInfoResult> RecordCountInfos;
        public readonly string? RecordLine;
        public readonly string? RecordLineId;
        public readonly string? RecordType;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// The record list result.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetRecordsResultResult> Results;
        public readonly string? SortField;
        public readonly string? SortType;
        public readonly string? Subdomain;

        [OutputConstructor]
        private GetRecordsResult(
            string? domain,

            string? domainId,

            string? groupId,

            string id,

            string? keyword,

            int? limit,

            int? offset,

            ImmutableArray<Outputs.GetRecordsRecordCountInfoResult> recordCountInfos,

            string? recordLine,

            string? recordLineId,

            string? recordType,

            string? resultOutputFile,

            ImmutableArray<Outputs.GetRecordsResultResult> results,

            string? sortField,

            string? sortType,

            string? subdomain)
        {
            Domain = domain;
            DomainId = domainId;
            GroupId = groupId;
            Id = id;
            Keyword = keyword;
            Limit = limit;
            Offset = offset;
            RecordCountInfos = recordCountInfos;
            RecordLine = recordLine;
            RecordLineId = recordLineId;
            RecordType = recordType;
            ResultOutputFile = resultOutputFile;
            Results = results;
            SortField = sortField;
            SortType = sortType;
            Subdomain = subdomain;
        }
    }
}
