1. Packages
  2. AWS Classic
  3. API Docs
  4. iot
  5. RoleAlias

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

aws.iot.RoleAlias

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

    Provides an IoT role alias.

    Example Usage

    Coming soon!

    Coming soon!

    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()        
                .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            var alias = new RoleAlias("alias", RoleAliasArgs.builder()        
                .alias("Thermostat-dynamodb-access-role-alias")
                .roleArn(role.arn())
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      role:
        type: aws:iam:Role
        properties:
          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
    

    Create RoleAlias Resource

    new RoleAlias(name: string, args: RoleAliasArgs, opts?: CustomResourceOptions);
    @overload
    def RoleAlias(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  alias: Optional[str] = None,
                  credential_duration: Optional[int] = None,
                  role_arn: Optional[str] = None)
    @overload
    def RoleAlias(resource_name: str,
                  args: RoleAliasArgs,
                  opts: Optional[ResourceOptions] = None)
    func NewRoleAlias(ctx *Context, name string, args RoleAliasArgs, opts ...ResourceOption) (*RoleAlias, error)
    public RoleAlias(string name, RoleAliasArgs args, CustomResourceOptions? opts = null)
    public RoleAlias(String name, RoleAliasArgs args)
    public RoleAlias(String name, RoleAliasArgs args, CustomResourceOptions options)
    
    type: aws:iot:RoleAlias
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RoleAliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RoleAliasArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RoleAliasArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoleAliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoleAliasArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RoleAlias Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The RoleAlias resource accepts the following input properties:

    Alias string
    The name of the role alias.
    RoleArn string
    The identity of the role to which the alias refers.
    CredentialDuration 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).
    Alias string
    The name of the role alias.
    RoleArn string
    The identity of the role to which the alias refers.
    CredentialDuration 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).
    alias String
    The name of the role alias.
    roleArn String
    The identity of the role to which the alias refers.
    credentialDuration Integer
    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).
    alias string
    The name of the role alias.
    roleArn string
    The identity of the role to which the alias refers.
    credentialDuration number
    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).
    alias str
    The name of the role alias.
    role_arn str
    The identity of the role to which the alias refers.
    credential_duration 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).
    alias String
    The name of the role alias.
    roleArn String
    The identity of the role to which the alias refers.
    credentialDuration Number
    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).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RoleAlias resource produces the following output properties:

    Arn string
    The ARN assigned by AWS to this role alias.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The ARN assigned by AWS to this role alias.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN assigned by AWS to this role alias.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The ARN assigned by AWS to this role alias.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The ARN assigned by AWS to this role alias.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The ARN assigned by AWS to this role alias.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RoleAlias Resource

    Get an existing RoleAlias resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RoleAliasState, opts?: CustomResourceOptions): RoleAlias
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alias: Optional[str] = None,
            arn: Optional[str] = None,
            credential_duration: Optional[int] = None,
            role_arn: Optional[str] = None) -> RoleAlias
    func GetRoleAlias(ctx *Context, name string, id IDInput, state *RoleAliasState, opts ...ResourceOption) (*RoleAlias, error)
    public static RoleAlias Get(string name, Input<string> id, RoleAliasState? state, CustomResourceOptions? opts = null)
    public static RoleAlias get(String name, Output<String> id, RoleAliasState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Alias string
    The name of the role alias.
    Arn string
    The ARN assigned by AWS to this role alias.
    CredentialDuration 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).
    RoleArn string
    The identity of the role to which the alias refers.
    Alias string
    The name of the role alias.
    Arn string
    The ARN assigned by AWS to this role alias.
    CredentialDuration 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).
    RoleArn string
    The identity of the role to which the alias refers.
    alias String
    The name of the role alias.
    arn String
    The ARN assigned by AWS to this role alias.
    credentialDuration Integer
    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).
    roleArn String
    The identity of the role to which the alias refers.
    alias string
    The name of the role alias.
    arn string
    The ARN assigned by AWS to this role alias.
    credentialDuration number
    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).
    roleArn string
    The identity of the role to which the alias refers.
    alias str
    The name of the role alias.
    arn str
    The ARN assigned by AWS to this role alias.
    credential_duration 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).
    role_arn str
    The identity of the role to which the alias refers.
    alias String
    The name of the role alias.
    arn String
    The ARN assigned by AWS to this role alias.
    credentialDuration Number
    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).
    roleArn String
    The identity of the role to which the alias refers.

    Import

    Using pulumi import, import IOT Role Alias using the alias. For example:

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi