<reponame>Regrau/pulumi-yandex<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;

namespace Pulumi.Yandex
{
    public static class GetIamRole
    {
        /// <summary>
        /// Generates an [IAM] role document that may be referenced by and applied to
        /// other Yandex.Cloud Platform resources, such as the `yandex.ResourcemanagerFolder` resource. For more information, see
        /// [the official documentation](https://cloud.yandex.com/docs/iam/concepts/access-control/roles).
        /// 
        /// 
        /// This data source is used to define [IAM] roles in order to apply them to other resources.
        /// Currently, defining a role through a data source and referencing that role
        /// from another resource is the only way to apply an IAM role to a resource.
        /// </summary>
        public static Task<GetIamRoleResult> InvokeAsync(GetIamRoleArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetIamRoleResult>("yandex:index/getIamRole:getIamRole", args ?? new GetIamRoleArgs(), options.WithDefaults());

        /// <summary>
        /// Generates an [IAM] role document that may be referenced by and applied to
        /// other Yandex.Cloud Platform resources, such as the `yandex.ResourcemanagerFolder` resource. For more information, see
        /// [the official documentation](https://cloud.yandex.com/docs/iam/concepts/access-control/roles).
        /// 
        /// 
        /// This data source is used to define [IAM] roles in order to apply them to other resources.
        /// Currently, defining a role through a data source and referencing that role
        /// from another resource is the only way to apply an IAM role to a resource.
        /// </summary>
        public static Output<GetIamRoleResult> Invoke(GetIamRoleInvokeArgs? args = null, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetIamRoleResult>("yandex:index/getIamRole:getIamRole", args ?? new GetIamRoleInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetIamRoleArgs : global::Pulumi.InvokeArgs
    {
        [Input("description")]
        public string? Description { get; set; }

        [Input("roleId")]
        public string? RoleId { get; set; }

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

    public sealed class GetIamRoleInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("roleId")]
        public Input<string>? RoleId { get; set; }

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


    [OutputType]
    public sealed class GetIamRoleResult
    {
        public readonly string? Description;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string RoleId;

        [OutputConstructor]
        private GetIamRoleResult(
            string? description,

            string id,

            string roleId)
        {
            Description = description;
            Id = id;
            RoleId = roleId;
        }
    }
}
