<filename>sdk/dotnet/Zpa/TrustedNetwork/GetTrustedNetwork.cs<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 zscaler.PulumiPackage.Zpa.TrustedNetwork
{
    public static class GetTrustedNetwork
    {
        /// <summary>
        /// The **zpa_trusted_network** data source to get information about a trusted network created in the Zscaler Private Access Mobile Portal. This data source can then be referenced within the following resources:
        /// 
        /// 1. Access Policy
        /// 2. Forwarding Policy
        /// 3. Inspection Policy
        /// 4. Isolation Policy
        /// 5. Service Edge Group.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = Zpa.TrustedNetwork.GetTrustedNetwork.Invoke(new()
        ///     {
        ///         Name = "trusted_network_name",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// &gt; **NOTE** To query trusted network that are associated with a specific Zscaler cloud, it is required to append the cloud name to the name of the trusted network as the below example:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example1 = Zpa.TrustedNetwork.GetTrustedNetwork.Invoke(new()
        ///     {
        ///         Name = "Corporate-Network (zscalertwo.net)",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaTrustedNetwork"] = example1.Apply(getTrustedNetworkResult =&gt; getTrustedNetworkResult.NetworkId),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetTrustedNetworkResult> InvokeAsync(GetTrustedNetworkArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetTrustedNetworkResult>("zpa:trustedNetwork/getTrustedNetwork:getTrustedNetwork", args ?? new GetTrustedNetworkArgs(), options.WithDefaults());

        /// <summary>
        /// The **zpa_trusted_network** data source to get information about a trusted network created in the Zscaler Private Access Mobile Portal. This data source can then be referenced within the following resources:
        /// 
        /// 1. Access Policy
        /// 2. Forwarding Policy
        /// 3. Inspection Policy
        /// 4. Isolation Policy
        /// 5. Service Edge Group.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example = Zpa.TrustedNetwork.GetTrustedNetwork.Invoke(new()
        ///     {
        ///         Name = "trusted_network_name",
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// &gt; **NOTE** To query trusted network that are associated with a specific Zscaler cloud, it is required to append the cloud name to the name of the trusted network as the below example:
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Zpa = Pulumi.Zpa;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var example1 = Zpa.TrustedNetwork.GetTrustedNetwork.Invoke(new()
        ///     {
        ///         Name = "Corporate-Network (zscalertwo.net)",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zpaTrustedNetwork"] = example1.Apply(getTrustedNetworkResult =&gt; getTrustedNetworkResult.NetworkId),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetTrustedNetworkResult> Invoke(GetTrustedNetworkInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetTrustedNetworkResult>("zpa:trustedNetwork/getTrustedNetwork:getTrustedNetwork", args ?? new GetTrustedNetworkInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetTrustedNetworkArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the posture profile to be exported.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

        /// <summary>
        /// The name of the posture profile to be exported.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        public GetTrustedNetworkArgs()
        {
        }
        public static new GetTrustedNetworkArgs Empty => new GetTrustedNetworkArgs();
    }

    public sealed class GetTrustedNetworkInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the posture profile to be exported.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

        /// <summary>
        /// The name of the posture profile to be exported.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        public GetTrustedNetworkInvokeArgs()
        {
        }
        public static new GetTrustedNetworkInvokeArgs Empty => new GetTrustedNetworkInvokeArgs();
    }


    [OutputType]
    public sealed class GetTrustedNetworkResult
    {
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string CreationTime;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string Domain;
        public readonly string? Id;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string ModifiedTime;
        public readonly string Modifiedby;
        public readonly string? Name;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string NetworkId;
        /// <summary>
        /// (string)
        /// </summary>
        public readonly string ZscalerCloud;

        [OutputConstructor]
        private GetTrustedNetworkResult(
            string creationTime,

            string domain,

            string? id,

            string modifiedTime,

            string modifiedby,

            string? name,

            string networkId,

            string zscalerCloud)
        {
            CreationTime = creationTime;
            Domain = domain;
            Id = id;
            ModifiedTime = modifiedTime;
            Modifiedby = modifiedby;
            Name = name;
            NetworkId = networkId;
            ZscalerCloud = zscalerCloud;
        }
    }
}
