com.pulumi.aws.iot.kotlin.RoleAliasArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.iot.kotlin
import com.pulumi.aws.iot.RoleAliasArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides an IoT role alias.
* ## Example Usage
*
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.iam.IamFunctions;
* import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
* import com.pulumi.aws.iam.Role;
* import com.pulumi.aws.iam.RoleArgs;
* import com.pulumi.aws.iot.RoleAlias;
* import com.pulumi.aws.iot.RoleAliasArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
* .effect("Allow")
* .principals(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
* .actions("sts:AssumeRole")
* .build());
* var role = new Role("role", RoleArgs.builder()
* .name("dynamodb-access-role")
* .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
* .build());
* var alias = new RoleAlias("alias", RoleAliasArgs.builder()
* .alias("Thermostat-dynamodb-access-role-alias")
* .roleArn(role.arn())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* role:
* type: aws:iam:Role
* properties:
* name: dynamodb-access-role
* assumeRolePolicy: ${assumeRole.json}
* alias:
* type: aws:iot:RoleAlias
* properties:
* alias: Thermostat-dynamodb-access-role-alias
* roleArn: ${role.arn}
* variables:
* assumeRole:
* fn::invoke:
* Function: aws:iam:getPolicyDocument
* Arguments:
* effect: Allow
* principals:
* - type: Service
* identifiers:
* - credentials.iot.amazonaws.com
* actions:
* - sts:AssumeRole
* ```
*
* ## Import
* Using `pulumi import`, import IOT Role Alias using the alias. For example:
* ```sh
* $ pulumi import aws:iot/roleAlias:RoleAlias example myalias
* ```
* @property alias The name of the role alias.
* @property credentialDuration The duration of the credential, in seconds. If you do not specify a value for this setting, the default maximum of one hour is applied. This setting can have a value from 900 seconds (15 minutes) to 43200 seconds (12 hours).
* @property roleArn The identity of the role to which the alias refers.
* @property tags Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public data class RoleAliasArgs(
public val alias: Output? = null,
public val credentialDuration: Output? = null,
public val roleArn: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy