Skip to main content

IamRoleSchema

IamRoleSchema is the schema of the IamRole resource: an IAM role, an identity a service such as ECS or Lambda assumes, with the permissions it holds. Terraform provisions it as aws_iam_role.

@group

Resources/IamRole

@overrideProperty

parents - This resource has no parents.

@overrideProperty

resourceId - The resource id is of format iam-role-<role-name>

Hierarchy

  • BaseResourceSchema
    • IamRoleSchema

Index

Properties

inheritedlocalResourceId

localResourceId: string

The ID the resource was created with, unique within its scope.

inheritedparents

parents: IResourceReference[]

The resources this one is built on top of.

properties

properties: { awsAccountId: string; policies: ({ policy: IIamRoleAssumeRolePolicy; policyId: string; policyType: assume-role-policy } | { policy: string; policyId: string; policyType: aws-policy } | { policy: IIamRoleCloudWatchLogGroupWritePolicy; policyId: string; policyType: cloudwatch-log-group-write-policy } | { policy: IIamRoleDynamoDBTablePolicy; policyId: string; policyType: dynamodb-table-access-policy } | { policy: { actions: string[]; resources: string[] }[]; policyId: string; policyType: iam-statements-policy } | { policy: IIamRoleLambdaFunctionInvokePolicy[]; policyId: string; policyType: lambda-function-invoke-policy } | { policy: IIamRoleS3BucketPolicy; policyId: string; policyType: s3-storage-access-policy })[]; rolename: string }

Input properties.

  • properties.awsAccountId: The AWS account ID.
  • properties.policies: The policies to attach to the role. See IIamRolePolicyTypes for options.
  • properties.rolename: The name of the role to create.

Type declaration

  • awsAccountId: string
  • policies: ({ policy: IIamRoleAssumeRolePolicy; policyId: string; policyType: assume-role-policy } | { policy: string; policyId: string; policyType: aws-policy } | { policy: IIamRoleCloudWatchLogGroupWritePolicy; policyId: string; policyType: cloudwatch-log-group-write-policy } | { policy: IIamRoleDynamoDBTablePolicy; policyId: string; policyType: dynamodb-table-access-policy } | { policy: { actions: string[]; resources: string[] }[]; policyId: string; policyType: iam-statements-policy } | { policy: IIamRoleLambdaFunctionInvokePolicy[]; policyId: string; policyType: lambda-function-invoke-policy } | { policy: IIamRoleS3BucketPolicy; policyId: string; policyType: s3-storage-access-policy })[]
  • rolename: string

inheritedresourceId

resourceId: string

The ID of the resource, unique across the infrastructure: its localResourceId, followed by a hash of its scope when it has one.

response

response: { Arn?: string; RoleId?: string; RoleName?: string } = { Arn: 'arn:aws:iam::000000000000:role/mock-role', RoleId: 'ABC00123456789ABC0ABC', RoleName: 'mock-role', }

Saved response.

  • response.Arn: The ARN of the role.
  • response.RoleId: The ID of the role.
  • response.RoleName: The name of the role.

Type declaration

  • optionalArn?: string
  • optionalRoleId?: string
  • optionalRoleName?: string

inheritedscope

scope: string[]

The contexts of the models the resource is placed under, derived from where the node creating it sits in the model graph. Octo sets it; a resource created outside a model action has none.

inheritedtags

tags: {}

The tags applied to the resource.


Type declaration

  • [key string]: string