1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. odb
  6. IamRoleAssociation
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi

    Manages an AWS Oracle Database@AWS Associate Disassociate IAM Role.

    Currently supported resourceArn targets are Cloud VM Clusters and Cloud Autonomous VM Clusters.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.odb.IamRoleAssociation("example", {
        awsIntegration: "KmsTde",
        iamRoleArn: "arn:aws:iam::123456789012:role/odb-iam-role-example",
        resourceArn: "arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.odb.IamRoleAssociation("example",
        aws_integration="KmsTde",
        iam_role_arn="arn:aws:iam::123456789012:role/odb-iam-role-example",
        resource_arn="arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/odb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := odb.NewIamRoleAssociation(ctx, "example", &odb.IamRoleAssociationArgs{
    			AwsIntegration: pulumi.String("KmsTde"),
    			IamRoleArn:     pulumi.String("arn:aws:iam::123456789012:role/odb-iam-role-example"),
    			ResourceArn:    pulumi.String("arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Odb.IamRoleAssociation("example", new()
        {
            AwsIntegration = "KmsTde",
            IamRoleArn = "arn:aws:iam::123456789012:role/odb-iam-role-example",
            ResourceArn = "arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.odb.IamRoleAssociation;
    import com.pulumi.aws.odb.IamRoleAssociationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            var example = new IamRoleAssociation("example", IamRoleAssociationArgs.builder()
                .awsIntegration("KmsTde")
                .iamRoleArn("arn:aws:iam::123456789012:role/odb-iam-role-example")
                .resourceArn("arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:odb:IamRoleAssociation
        properties:
          awsIntegration: KmsTde
          iamRoleArn: arn:aws:iam::123456789012:role/odb-iam-role-example
          resourceArn: arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_odb_iamroleassociation" "example" {
      aws_integration = "KmsTde"
      iam_role_arn    = "arn:aws:iam::123456789012:role/odb-iam-role-example"
      resource_arn    = "arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id"
    }
    

    Create IamRoleAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IamRoleAssociation(name: string, args: IamRoleAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def IamRoleAssociation(resource_name: str,
                           args: IamRoleAssociationArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamRoleAssociation(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           aws_integration: Optional[str] = None,
                           iam_role_arn: Optional[str] = None,
                           resource_arn: Optional[str] = None,
                           region: Optional[str] = None,
                           timeouts: Optional[IamRoleAssociationTimeoutsArgs] = None)
    func NewIamRoleAssociation(ctx *Context, name string, args IamRoleAssociationArgs, opts ...ResourceOption) (*IamRoleAssociation, error)
    public IamRoleAssociation(string name, IamRoleAssociationArgs args, CustomResourceOptions? opts = null)
    public IamRoleAssociation(String name, IamRoleAssociationArgs args)
    public IamRoleAssociation(String name, IamRoleAssociationArgs args, CustomResourceOptions options)
    
    type: aws:odb:IamRoleAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_odb_iam_role_association" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args IamRoleAssociationArgs
    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 IamRoleAssociationArgs
    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 IamRoleAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamRoleAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamRoleAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var iamRoleAssociationResource = new Aws.Odb.IamRoleAssociation("iamRoleAssociationResource", new()
    {
        AwsIntegration = "string",
        IamRoleArn = "string",
        ResourceArn = "string",
        Region = "string",
        Timeouts = new Aws.Odb.Inputs.IamRoleAssociationTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := odb.NewIamRoleAssociation(ctx, "iamRoleAssociationResource", &odb.IamRoleAssociationArgs{
    	AwsIntegration: pulumi.String("string"),
    	IamRoleArn:     pulumi.String("string"),
    	ResourceArn:    pulumi.String("string"),
    	Region:         pulumi.String("string"),
    	Timeouts: &odb.IamRoleAssociationTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "aws_odb_iam_role_association" "iamRoleAssociationResource" {
      lifecycle {
        create_before_destroy = true
      }
      aws_integration = "string"
      iam_role_arn    = "string"
      resource_arn    = "string"
      region          = "string"
      timeouts = {
        create = "string"
        delete = "string"
        update = "string"
      }
    }
    
    var iamRoleAssociationResource = new IamRoleAssociation("iamRoleAssociationResource", IamRoleAssociationArgs.builder()
        .awsIntegration("string")
        .iamRoleArn("string")
        .resourceArn("string")
        .region("string")
        .timeouts(IamRoleAssociationTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    iam_role_association_resource = aws.odb.IamRoleAssociation("iamRoleAssociationResource",
        aws_integration="string",
        iam_role_arn="string",
        resource_arn="string",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const iamRoleAssociationResource = new aws.odb.IamRoleAssociation("iamRoleAssociationResource", {
        awsIntegration: "string",
        iamRoleArn: "string",
        resourceArn: "string",
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: aws:odb:IamRoleAssociation
    properties:
        awsIntegration: string
        iamRoleArn: string
        region: string
        resourceArn: string
        timeouts:
            create: string
            delete: string
            update: string
    

    IamRoleAssociation Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The IamRoleAssociation resource accepts the following input properties:

    AwsIntegration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    IamRoleArn string
    IAM role ARN to associate.
    ResourceArn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    Region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    Timeouts IamRoleAssociationTimeouts
    AwsIntegration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    IamRoleArn string
    IAM role ARN to associate.
    ResourceArn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    Region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    Timeouts IamRoleAssociationTimeoutsArgs
    aws_integration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iam_role_arn string
    IAM role ARN to associate.
    resource_arn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    timeouts object
    awsIntegration String
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iamRoleArn String
    IAM role ARN to associate.
    resourceArn String

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    region String
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    timeouts IamRoleAssociationTimeouts
    awsIntegration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iamRoleArn string
    IAM role ARN to associate.
    resourceArn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    timeouts IamRoleAssociationTimeouts
    aws_integration str
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iam_role_arn str
    IAM role ARN to associate.
    resource_arn str

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    region str
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    timeouts IamRoleAssociationTimeoutsArgs
    awsIntegration String
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iamRoleArn String
    IAM role ARN to associate.
    resourceArn String

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    region String
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current IAM role association status.
    StatusReason string
    Additional details about the current status, when available.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current IAM role association status.
    StatusReason string
    Additional details about the current status, when available.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Current IAM role association status.
    status_reason string
    Additional details about the current status, when available.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current IAM role association status.
    statusReason String
    Additional details about the current status, when available.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Current IAM role association status.
    statusReason string
    Additional details about the current status, when available.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Current IAM role association status.
    status_reason str
    Additional details about the current status, when available.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current IAM role association status.
    statusReason String
    Additional details about the current status, when available.

    Look up Existing IamRoleAssociation Resource

    Get an existing IamRoleAssociation 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?: IamRoleAssociationState, opts?: CustomResourceOptions): IamRoleAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aws_integration: Optional[str] = None,
            iam_role_arn: Optional[str] = None,
            region: Optional[str] = None,
            resource_arn: Optional[str] = None,
            status: Optional[str] = None,
            status_reason: Optional[str] = None,
            timeouts: Optional[IamRoleAssociationTimeoutsArgs] = None) -> IamRoleAssociation
    func GetIamRoleAssociation(ctx *Context, name string, id IDInput, state *IamRoleAssociationState, opts ...ResourceOption) (*IamRoleAssociation, error)
    public static IamRoleAssociation Get(string name, Input<string> id, IamRoleAssociationState? state, CustomResourceOptions? opts = null)
    public static IamRoleAssociation get(String name, Output<String> id, IamRoleAssociationState state, CustomResourceOptions options)
    resources:  _:    type: aws:odb:IamRoleAssociation    get:      id: ${id}
    import {
      to = aws_odb_iam_role_association.example
      id = "${id}"
    }
    
    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:
    AwsIntegration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    IamRoleArn string
    IAM role ARN to associate.
    Region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    ResourceArn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    Status string
    Current IAM role association status.
    StatusReason string
    Additional details about the current status, when available.
    Timeouts IamRoleAssociationTimeouts
    AwsIntegration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    IamRoleArn string
    IAM role ARN to associate.
    Region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    ResourceArn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    Status string
    Current IAM role association status.
    StatusReason string
    Additional details about the current status, when available.
    Timeouts IamRoleAssociationTimeoutsArgs
    aws_integration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iam_role_arn string
    IAM role ARN to associate.
    region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    resource_arn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    status string
    Current IAM role association status.
    status_reason string
    Additional details about the current status, when available.
    timeouts object
    awsIntegration String
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iamRoleArn String
    IAM role ARN to associate.
    region String
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    resourceArn String

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    status String
    Current IAM role association status.
    statusReason String
    Additional details about the current status, when available.
    timeouts IamRoleAssociationTimeouts
    awsIntegration string
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iamRoleArn string
    IAM role ARN to associate.
    region string
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    resourceArn string

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    status string
    Current IAM role association status.
    statusReason string
    Additional details about the current status, when available.
    timeouts IamRoleAssociationTimeouts
    aws_integration str
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iam_role_arn str
    IAM role ARN to associate.
    region str
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    resource_arn str

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    status str
    Current IAM role association status.
    status_reason str
    Additional details about the current status, when available.
    timeouts IamRoleAssociationTimeoutsArgs
    awsIntegration String
    AWS integration configuration for the IAM role association. Valid value: KmsTde.
    iamRoleArn String
    IAM role ARN to associate.
    region String
    Region where this resource is managed. Defaults to the Region set in the provider configuration.
    resourceArn String

    Oracle Database@AWS resource ARN to associate the IAM role with.

    The following arguments are optional:

    status String
    Current IAM role association status.
    statusReason String
    Additional details about the current status, when available.
    timeouts Property Map

    Supporting Types

    IamRoleAssociationTimeouts, IamRoleAssociationTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Using pulumi import, import an Oracle Database@AWS Associate Disassociate IAM Role using the IAM role ARN and resource ARN, separated by a comma. Specify the IAM role ARN first and the resource ARN second. For example:

    $ pulumi import aws:odb/iamRoleAssociation:IamRoleAssociation example "arn:aws:iam::123456789012:role/odb-iam-role-example,arn:aws:odb:us-east-1:123456789012:cloud-vm-cluster/odb-example-cluster-id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 aws logo
    Viewing docs for AWS v7.46.0
    published on Thursday, Sep 10, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial