<filename>sdk/dotnet/GetContext.cs// *** 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 PiersKarsenbarg.Codefresh
{
    public static class GetContext
    {
        /// <summary>
        /// ## # Data Source: codefresh.Context
        /// 
        /// This data source allows to retrieve information on any defined context
        /// </summary>
        public static Task<GetContextResult> InvokeAsync(GetContextArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetContextResult>("codefresh:index/getContext:getContext", args ?? new GetContextArgs(), options.WithDefaults());

        /// <summary>
        /// ## # Data Source: codefresh.Context
        /// 
        /// This data source allows to retrieve information on any defined context
        /// </summary>
        public static Output<GetContextResult> Invoke(GetContextInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetContextResult>("codefresh:index/getContext:getContext", args ?? new GetContextInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetContextArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the context to be retrived
        /// </summary>
        [Input("name", required: true)]
        public string Name { get; set; } = null!;

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

    public sealed class GetContextInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the context to be retrived
        /// </summary>
        [Input("name", required: true)]
        public Input<string> Name { get; set; } = null!;

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


    [OutputType]
    public sealed class GetContextResult
    {
        /// <summary>
        /// The yaml string representing the context. Use the `yamldecode` function to access the values belonging the context.
        /// </summary>
        public readonly string Data;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string Name;
        /// <summary>
        /// String identifying the type of extracted context. E.g. `config`, `secret`, `git.github-app`, etc.
        /// </summary>
        public readonly string Type;

        [OutputConstructor]
        private GetContextResult(
            string data,

            string id,

            string name,

            string type)
        {
            Data = data;
            Id = id;
            Name = name;
            Type = type;
        }
    }
}
