All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.iam.kotlin.IamFunctions.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.iam.kotlin

import com.pulumi.awsnative.iam.IamFunctions.getGroupPlain
import com.pulumi.awsnative.iam.IamFunctions.getGroupPolicyPlain
import com.pulumi.awsnative.iam.IamFunctions.getInstanceProfilePlain
import com.pulumi.awsnative.iam.IamFunctions.getManagedPolicyPlain
import com.pulumi.awsnative.iam.IamFunctions.getOidcProviderPlain
import com.pulumi.awsnative.iam.IamFunctions.getRolePlain
import com.pulumi.awsnative.iam.IamFunctions.getRolePolicyPlain
import com.pulumi.awsnative.iam.IamFunctions.getSamlProviderPlain
import com.pulumi.awsnative.iam.IamFunctions.getServerCertificatePlain
import com.pulumi.awsnative.iam.IamFunctions.getServiceLinkedRolePlain
import com.pulumi.awsnative.iam.IamFunctions.getUserPlain
import com.pulumi.awsnative.iam.IamFunctions.getUserPolicyPlain
import com.pulumi.awsnative.iam.IamFunctions.getVirtualMfaDevicePlain
import com.pulumi.awsnative.iam.kotlin.inputs.GetGroupPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetGroupPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetGroupPolicyPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetGroupPolicyPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetInstanceProfilePlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetInstanceProfilePlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetManagedPolicyPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetManagedPolicyPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetOidcProviderPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetOidcProviderPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetRolePlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetRolePlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetRolePolicyPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetRolePolicyPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetSamlProviderPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetSamlProviderPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetServerCertificatePlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetServerCertificatePlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetServiceLinkedRolePlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetServiceLinkedRolePlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetUserPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetUserPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetUserPolicyPlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetUserPolicyPlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.inputs.GetVirtualMfaDevicePlainArgs
import com.pulumi.awsnative.iam.kotlin.inputs.GetVirtualMfaDevicePlainArgsBuilder
import com.pulumi.awsnative.iam.kotlin.outputs.GetGroupPolicyResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetGroupResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetInstanceProfileResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetManagedPolicyResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetOidcProviderResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetRolePolicyResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetRoleResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetSamlProviderResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetServerCertificateResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetServiceLinkedRoleResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetUserPolicyResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetUserResult
import com.pulumi.awsnative.iam.kotlin.outputs.GetVirtualMfaDeviceResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.iam.kotlin.outputs.GetGroupPolicyResult.Companion.toKotlin as getGroupPolicyResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetGroupResult.Companion.toKotlin as getGroupResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetInstanceProfileResult.Companion.toKotlin as getInstanceProfileResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetManagedPolicyResult.Companion.toKotlin as getManagedPolicyResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetOidcProviderResult.Companion.toKotlin as getOidcProviderResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetRolePolicyResult.Companion.toKotlin as getRolePolicyResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetRoleResult.Companion.toKotlin as getRoleResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetSamlProviderResult.Companion.toKotlin as getSamlProviderResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetServerCertificateResult.Companion.toKotlin as getServerCertificateResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetServiceLinkedRoleResult.Companion.toKotlin as getServiceLinkedRoleResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetUserPolicyResult.Companion.toKotlin as getUserPolicyResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetUserResult.Companion.toKotlin as getUserResultToKotlin
import com.pulumi.awsnative.iam.kotlin.outputs.GetVirtualMfaDeviceResult.Companion.toKotlin as getVirtualMfaDeviceResultToKotlin

public object IamFunctions {
    /**
     * Creates a new group.
     *   For information about the number of groups you can create, see [Limitations on Entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html) in the *User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getGroup(argument: GetGroupPlainArgs): GetGroupResult =
        getGroupResultToKotlin(getGroupPlain(argument.toJava()).await())

    /**
     * @see [getGroup].
     * @param groupName The name of the group to create. Do not include the path in this value.
     *  The group name must be unique within the account. Group names are not distinguished by case. For example, you cannot create groups named both "ADMINS" and "admins". If you don't specify a name, CFN generates a unique physical ID and uses that ID for the group name.
     *   If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
     *   If you specify a name, you must specify the ``CAPABILITY_NAMED_IAM`` value to acknowledge your template's capabilities. For more information, see [Acknowledging Resources in Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities).
     *   Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using ``Fn::Join`` and ``AWS::Region`` to create a Region-specific name, as in the following example: ``{"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]}``.
     * @return null
     */
    public suspend fun getGroup(groupName: String): GetGroupResult {
        val argument = GetGroupPlainArgs(
            groupName = groupName,
        )
        return getGroupResultToKotlin(getGroupPlain(argument.toJava()).await())
    }

    /**
     * @see [getGroup].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetGroupPlainArgs].
     * @return null
     */
    public suspend fun getGroup(argument: suspend GetGroupPlainArgsBuilder.() -> Unit): GetGroupResult {
        val builder = GetGroupPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getGroupResultToKotlin(getGroupPlain(builtArgument.toJava()).await())
    }

    /**
     * Adds or updates an inline policy document that is embedded in the specified IAM group.
     *  A group can also have managed policies attached to it. To attach a managed policy to a group, use [AWS::IAM::Group](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html). To create a new managed policy, use [AWS::IAM::ManagedPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html). For information about policies, see [Managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) in the *IAM User Guide*.
     *  For information about the maximum number of inline policies that you can embed in a group, see [IAM and quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *IAM User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getGroupPolicy(argument: GetGroupPolicyPlainArgs): GetGroupPolicyResult =
        getGroupPolicyResultToKotlin(getGroupPolicyPlain(argument.toJava()).await())

    /**
     * @see [getGroupPolicy].
     * @param groupName The name of the group to associate the policy with.
     *  This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-.
     * @param policyName The name of the policy document.
     *  This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     * @return null
     */
    public suspend fun getGroupPolicy(groupName: String, policyName: String): GetGroupPolicyResult {
        val argument = GetGroupPolicyPlainArgs(
            groupName = groupName,
            policyName = policyName,
        )
        return getGroupPolicyResultToKotlin(getGroupPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getGroupPolicy].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetGroupPolicyPlainArgs].
     * @return null
     */
    public suspend fun getGroupPolicy(argument: suspend GetGroupPolicyPlainArgsBuilder.() -> Unit): GetGroupPolicyResult {
        val builder = GetGroupPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getGroupPolicyResultToKotlin(getGroupPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Creates a new instance profile. For information about instance profiles, see [Using instance profiles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html).
     *   For information about the number of instance profiles you can create, see [object quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getInstanceProfile(argument: GetInstanceProfilePlainArgs): GetInstanceProfileResult =
        getInstanceProfileResultToKotlin(getInstanceProfilePlain(argument.toJava()).await())

    /**
     * @see [getInstanceProfile].
     * @param instanceProfileName The name of the instance profile to create.
     *  This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     * @return null
     */
    public suspend fun getInstanceProfile(instanceProfileName: String): GetInstanceProfileResult {
        val argument = GetInstanceProfilePlainArgs(
            instanceProfileName = instanceProfileName,
        )
        return getInstanceProfileResultToKotlin(getInstanceProfilePlain(argument.toJava()).await())
    }

    /**
     * @see [getInstanceProfile].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetInstanceProfilePlainArgs].
     * @return null
     */
    public suspend fun getInstanceProfile(argument: suspend GetInstanceProfilePlainArgsBuilder.() -> Unit): GetInstanceProfileResult {
        val builder = GetInstanceProfilePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getInstanceProfileResultToKotlin(getInstanceProfilePlain(builtArgument.toJava()).await())
    }

    /**
     * Creates a new managed policy for your AWS-account.
     *  This operation creates a policy version with a version identifier of ``v1`` and sets v1 as the policy's default version. For more information about policy versions, see [Versioning for managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) in the *IAM User Guide*.
     *  As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) in the *IAM User Guide*.
     *  For more information about managed policies in general, see [Managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) in the *IAM User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getManagedPolicy(argument: GetManagedPolicyPlainArgs): GetManagedPolicyResult =
        getManagedPolicyResultToKotlin(getManagedPolicyPlain(argument.toJava()).await())

    /**
     * @see [getManagedPolicy].
     * @param policyArn
     * @return null
     */
    public suspend fun getManagedPolicy(policyArn: String): GetManagedPolicyResult {
        val argument = GetManagedPolicyPlainArgs(
            policyArn = policyArn,
        )
        return getManagedPolicyResultToKotlin(getManagedPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getManagedPolicy].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetManagedPolicyPlainArgs].
     * @return null
     */
    public suspend fun getManagedPolicy(argument: suspend GetManagedPolicyPlainArgsBuilder.() -> Unit): GetManagedPolicyResult {
        val builder = GetManagedPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getManagedPolicyResultToKotlin(getManagedPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Resource Type definition for AWS::IAM::OIDCProvider
     * @param argument null
     * @return null
     */
    public suspend fun getOidcProvider(argument: GetOidcProviderPlainArgs): GetOidcProviderResult =
        getOidcProviderResultToKotlin(getOidcProviderPlain(argument.toJava()).await())

    /**
     * @see [getOidcProvider].
     * @param arn Amazon Resource Name (ARN) of the OIDC provider
     * @return null
     */
    public suspend fun getOidcProvider(arn: String): GetOidcProviderResult {
        val argument = GetOidcProviderPlainArgs(
            arn = arn,
        )
        return getOidcProviderResultToKotlin(getOidcProviderPlain(argument.toJava()).await())
    }

    /**
     * @see [getOidcProvider].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetOidcProviderPlainArgs].
     * @return null
     */
    public suspend fun getOidcProvider(argument: suspend GetOidcProviderPlainArgsBuilder.() -> Unit): GetOidcProviderResult {
        val builder = GetOidcProviderPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getOidcProviderResultToKotlin(getOidcProviderPlain(builtArgument.toJava()).await())
    }

    /**
     * Creates a new role for your AWS-account.
     *   For more information about roles, see [IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) in the *IAM User Guide*. For information about quotas for role names and the number of roles you can create, see [IAM and quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *IAM User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getRole(argument: GetRolePlainArgs): GetRoleResult =
        getRoleResultToKotlin(getRolePlain(argument.toJava()).await())

    /**
     * @see [getRole].
     * @param roleName A name for the IAM role, up to 64 characters in length. For valid values, see the `RoleName` parameter for the [`CreateRole`](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html) action in the *IAM User Guide* .
     * This parameter allows (per its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The role name must be unique within the account. Role names are not distinguished by case. For example, you cannot create roles named both "Role1" and "role1".
     * If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the role name.
     * If you specify a name, you must specify the `CAPABILITY_NAMED_IAM` value to acknowledge your template's capabilities. For more information, see [Acknowledging IAM Resources in AWS CloudFormation Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities) .
     * > Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using `Fn::Join` and `AWS::Region` to create a Region-specific name, as in the following example: `{"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]}` .
     * @return null
     */
    public suspend fun getRole(roleName: String): GetRoleResult {
        val argument = GetRolePlainArgs(
            roleName = roleName,
        )
        return getRoleResultToKotlin(getRolePlain(argument.toJava()).await())
    }

    /**
     * @see [getRole].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetRolePlainArgs].
     * @return null
     */
    public suspend fun getRole(argument: suspend GetRolePlainArgsBuilder.() -> Unit): GetRoleResult {
        val builder = GetRolePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getRoleResultToKotlin(getRolePlain(builtArgument.toJava()).await())
    }

    /**
     * Adds or updates an inline policy document that is embedded in the specified IAM role.
     *  When you embed an inline policy in a role, the inline policy is used as part of the role's access (permissions) policy. The role's trust policy is created at the same time as the role, using [CreateRole](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html). You can update a role's trust policy using [UpdateAssumeRolePolicy](https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html). For information about roles, see [roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) in the *IAM User Guide*.
     *  A role can also have a managed policy attached to it. To attach a managed policy to a role, use [AWS::IAM::Role](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html). To create a new managed policy, use [AWS::IAM::ManagedPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html). For information about policies, see [Managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) in the *IAM User Guide*.
     *  For information about the maximum number of inline policies that you can embed with a role, see [IAM and quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *IAM User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getRolePolicy(argument: GetRolePolicyPlainArgs): GetRolePolicyResult =
        getRolePolicyResultToKotlin(getRolePolicyPlain(argument.toJava()).await())

    /**
     * @see [getRolePolicy].
     * @param policyName The name of the policy document.
     *  This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     * @param roleName The name of the role to associate the policy with.
     *  This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     * @return null
     */
    public suspend fun getRolePolicy(policyName: String, roleName: String): GetRolePolicyResult {
        val argument = GetRolePolicyPlainArgs(
            policyName = policyName,
            roleName = roleName,
        )
        return getRolePolicyResultToKotlin(getRolePolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getRolePolicy].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetRolePolicyPlainArgs].
     * @return null
     */
    public suspend fun getRolePolicy(argument: suspend GetRolePolicyPlainArgsBuilder.() -> Unit): GetRolePolicyResult {
        val builder = GetRolePolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getRolePolicyResultToKotlin(getRolePolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Resource Type definition for AWS::IAM::SAMLProvider
     * @param argument null
     * @return null
     */
    public suspend fun getSamlProvider(argument: GetSamlProviderPlainArgs): GetSamlProviderResult =
        getSamlProviderResultToKotlin(getSamlProviderPlain(argument.toJava()).await())

    /**
     * @see [getSamlProvider].
     * @param arn Amazon Resource Name (ARN) of the SAML provider
     * @return null
     */
    public suspend fun getSamlProvider(arn: String): GetSamlProviderResult {
        val argument = GetSamlProviderPlainArgs(
            arn = arn,
        )
        return getSamlProviderResultToKotlin(getSamlProviderPlain(argument.toJava()).await())
    }

    /**
     * @see [getSamlProvider].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetSamlProviderPlainArgs].
     * @return null
     */
    public suspend fun getSamlProvider(argument: suspend GetSamlProviderPlainArgsBuilder.() -> Unit): GetSamlProviderResult {
        val builder = GetSamlProviderPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getSamlProviderResultToKotlin(getSamlProviderPlain(builtArgument.toJava()).await())
    }

    /**
     * Resource Type definition for AWS::IAM::ServerCertificate
     * @param argument null
     * @return null
     */
    public suspend fun getServerCertificate(argument: GetServerCertificatePlainArgs): GetServerCertificateResult =
        getServerCertificateResultToKotlin(getServerCertificatePlain(argument.toJava()).await())

    /**
     * @see [getServerCertificate].
     * @param serverCertificateName The name for the server certificate. Do not include the path in this value. The name of the certificate cannot contain any spaces.
     * This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex) ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     * @return null
     */
    public suspend fun getServerCertificate(serverCertificateName: String): GetServerCertificateResult {
        val argument = GetServerCertificatePlainArgs(
            serverCertificateName = serverCertificateName,
        )
        return getServerCertificateResultToKotlin(getServerCertificatePlain(argument.toJava()).await())
    }

    /**
     * @see [getServerCertificate].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetServerCertificatePlainArgs].
     * @return null
     */
    public suspend fun getServerCertificate(argument: suspend GetServerCertificatePlainArgsBuilder.() -> Unit): GetServerCertificateResult {
        val builder = GetServerCertificatePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getServerCertificateResultToKotlin(getServerCertificatePlain(builtArgument.toJava()).await())
    }

    /**
     * Resource Type definition for AWS::IAM::ServiceLinkedRole
     * @param argument null
     * @return null
     */
    public suspend fun getServiceLinkedRole(argument: GetServiceLinkedRolePlainArgs): GetServiceLinkedRoleResult =
        getServiceLinkedRoleResultToKotlin(getServiceLinkedRolePlain(argument.toJava()).await())

    /**
     * @see [getServiceLinkedRole].
     * @param roleName The name of the role.
     * @return null
     */
    public suspend fun getServiceLinkedRole(roleName: String): GetServiceLinkedRoleResult {
        val argument = GetServiceLinkedRolePlainArgs(
            roleName = roleName,
        )
        return getServiceLinkedRoleResultToKotlin(getServiceLinkedRolePlain(argument.toJava()).await())
    }

    /**
     * @see [getServiceLinkedRole].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetServiceLinkedRolePlainArgs].
     * @return null
     */
    public suspend fun getServiceLinkedRole(argument: suspend GetServiceLinkedRolePlainArgsBuilder.() -> Unit): GetServiceLinkedRoleResult {
        val builder = GetServiceLinkedRolePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getServiceLinkedRoleResultToKotlin(getServiceLinkedRolePlain(builtArgument.toJava()).await())
    }

    /**
     * Creates a new IAM user for your AWS-account.
     *   For information about quotas for the number of IAM users you can create, see [IAM and quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *IAM User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getUser(argument: GetUserPlainArgs): GetUserResult =
        getUserResultToKotlin(getUserPlain(argument.toJava()).await())

    /**
     * @see [getUser].
     * @param userName The name of the user to create. Do not include the path in this value.
     *  This parameter allows (per its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-. The user name must be unique within the account. User names are not distinguished by case. For example, you cannot create users named both "John" and "john".
     *  If you don't specify a name, CFN generates a unique physical ID and uses that ID for the user name.
     *  If you specify a name, you must specify the ``CAPABILITY_NAMED_IAM`` value to acknowledge your template's capabilities. For more information, see [Acknowledging Resources in Templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#using-iam-capabilities).
     *   Naming an IAM resource can cause an unrecoverable error if you reuse the same template in multiple Regions. To prevent this, we recommend using ``Fn::Join`` and ``AWS::Region`` to create a Region-specific name, as in the following example: ``{"Fn::Join": ["", [{"Ref": "AWS::Region"}, {"Ref": "MyResourceName"}]]}``.
     * @return null
     */
    public suspend fun getUser(userName: String): GetUserResult {
        val argument = GetUserPlainArgs(
            userName = userName,
        )
        return getUserResultToKotlin(getUserPlain(argument.toJava()).await())
    }

    /**
     * @see [getUser].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetUserPlainArgs].
     * @return null
     */
    public suspend fun getUser(argument: suspend GetUserPlainArgsBuilder.() -> Unit): GetUserResult {
        val builder = GetUserPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getUserResultToKotlin(getUserPlain(builtArgument.toJava()).await())
    }

    /**
     * Adds or updates an inline policy document that is embedded in the specified IAM user.
     *  An IAM user can also have a managed policy attached to it. To attach a managed policy to a user, use [AWS::IAM::User](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html). To create a new managed policy, use [AWS::IAM::ManagedPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-managedpolicy.html). For information about policies, see [Managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) in the *IAM User Guide*.
     *  For information about the maximum number of inline policies that you can embed in a user, see [IAM and quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *IAM User Guide*.
     * @param argument null
     * @return null
     */
    public suspend fun getUserPolicy(argument: GetUserPolicyPlainArgs): GetUserPolicyResult =
        getUserPolicyResultToKotlin(getUserPolicyPlain(argument.toJava()).await())

    /**
     * @see [getUserPolicy].
     * @param policyName The name of the policy document.
     *  This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     * @param userName The name of the user to associate the policy with.
     *  This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
     * @return null
     */
    public suspend fun getUserPolicy(policyName: String, userName: String): GetUserPolicyResult {
        val argument = GetUserPolicyPlainArgs(
            policyName = policyName,
            userName = userName,
        )
        return getUserPolicyResultToKotlin(getUserPolicyPlain(argument.toJava()).await())
    }

    /**
     * @see [getUserPolicy].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetUserPolicyPlainArgs].
     * @return null
     */
    public suspend fun getUserPolicy(argument: suspend GetUserPolicyPlainArgsBuilder.() -> Unit): GetUserPolicyResult {
        val builder = GetUserPolicyPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getUserPolicyResultToKotlin(getUserPolicyPlain(builtArgument.toJava()).await())
    }

    /**
     * Resource Type definition for AWS::IAM::VirtualMFADevice
     * @param argument null
     * @return null
     */
    public suspend fun getVirtualMfaDevice(argument: GetVirtualMfaDevicePlainArgs): GetVirtualMfaDeviceResult =
        getVirtualMfaDeviceResultToKotlin(getVirtualMfaDevicePlain(argument.toJava()).await())

    /**
     * @see [getVirtualMfaDevice].
     * @param serialNumber Returns the serial number for the specified `AWS::IAM::VirtualMFADevice` resource.
     * @return null
     */
    public suspend fun getVirtualMfaDevice(serialNumber: String): GetVirtualMfaDeviceResult {
        val argument = GetVirtualMfaDevicePlainArgs(
            serialNumber = serialNumber,
        )
        return getVirtualMfaDeviceResultToKotlin(getVirtualMfaDevicePlain(argument.toJava()).await())
    }

    /**
     * @see [getVirtualMfaDevice].
     * @param argument Builder for [com.pulumi.awsnative.iam.kotlin.inputs.GetVirtualMfaDevicePlainArgs].
     * @return null
     */
    public suspend fun getVirtualMfaDevice(argument: suspend GetVirtualMfaDevicePlainArgsBuilder.() -> Unit): GetVirtualMfaDeviceResult {
        val builder = GetVirtualMfaDevicePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getVirtualMfaDeviceResultToKotlin(getVirtualMfaDevicePlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy