RoleAlias

class RoleAlias : KotlinCustomResource

Provides an IoT role alias.

Example Usage

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());
}
}
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:

$ pulumi import aws:iot/roleAlias:RoleAlias example myalias

Properties

Link copied to clipboard
val alias: Output<String>

The name of the role alias.

Link copied to clipboard
val arn: Output<String>

The ARN assigned by AWS to this role alias.

Link copied to clipboard
val credentialDuration: Output<Int>?

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).

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleArn: Output<String>

The identity of the role to which the alias refers.

Link copied to clipboard
val tags: Output<Map<String, String>>?

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.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>