Menu
Amazon Redshift
API Reference (API Version 2012-12-01)

ModifyClusterIamRoles

Modifies the list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services.

A cluster can have up to 10 IAM roles associated at any time.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ClusterIdentifier

The unique identifier of the cluster for which you want to associate or disassociate IAM roles.

Type: String

Required: Yes

AddIamRoles.IamRoleArn.N

Zero or more IAM roles to associate with the cluster. The roles must be in their Amazon Resource Name (ARN) format. You can associate up to 10 IAM roles with a single cluster in a single request.

Type: Array of strings

Required: No

RemoveIamRoles.IamRoleArn.N

Zero or more IAM roles in ARN format to disassociate from the cluster. You can disassociate up to 10 IAM roles from a single cluster in a single request.

Type: Array of strings

Required: No

Response Elements

The following element is returned by the service.

Cluster

Describes a cluster.

Type: Cluster object

Errors

For information about the errors that are common to all actions, see Common Errors.

ClusterNotFound

The ClusterIdentifier parameter does not refer to an existing cluster.

HTTP Status Code: 404

InvalidClusterState

The specified cluster is not in the available state.

HTTP Status Code: 400

Example

Sample Request

https://redshift.us-east-1.amazonaws.com/ ?Action=ModifyClusterIamRoles &ClusterIdentifier=my-redshift-cluster &AddIamRoles.member.1=arn:aws:iam::123456789012:role/RedshiftCopyUnload &Version=2012-12-01 &x-amz-algorithm=AWS4-HMAC-SHA256 &x-amz-credential=AKIAIOSFODNN7EXAMPLE/20160208/us-east-1/redshift/aws4_request &x-amz-date=20160208T022525Z &x-amz-signedheaders=content-type;host;x-amz-date

Sample Response

<ModifyClusterIamRolesResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <ModifyClusterIamRolesResult> <Cluster> <PendingModifiedValues/> <ClusterVersion>1.0</ClusterVersion> <VpcSecurityGroups/> <Endpoint> <Port>5439</Port> <Address>examplecluster.cobaosmlqshn.us-east-1.redshift.amazonaws.com</Address> </Endpoint> <ClusterStatus>rebooting</ClusterStatus> <NumberOfNodes>2</NumberOfNodes> <AutomatedSnapshotRetentionPeriod>1</AutomatedSnapshotRetentionPeriod> <PubliclyAccessible>true</PubliclyAccessible> <Encrypted>false</Encrypted> <DBName>dev</DBName> <IamRoles> <ClusterIamRole> <IamRoleArn>arn:aws:iam::123456789012:role/RedshiftCopyUnload</IamRoleArn> <ApplyStatus>adding</ApplyStatus> </ClusterIamRole> </IamRoles> <PreferredMaintenanceWindow>sun:06:30-sun:07:00</PreferredMaintenanceWindow> <ClusterParameterGroups> <ClusterParameterGroup> <ParameterApplyStatus>in-sync</ParameterApplyStatus> <ParameterGroupName>default.redshift-1.0</ParameterGroupName> </ClusterParameterGroup> </ClusterParameterGroups> <ClusterCreateTime>2013-01-22T19:23:59.368Z</ClusterCreateTime> <ClusterSecurityGroups> <ClusterSecurityGroup> <Status>active</Status> <ClusterSecurityGroupName>default</ClusterSecurityGroupName> </ClusterSecurityGroup> </ClusterSecurityGroups> <AvailabilityZone>us-east-1c</AvailabilityZone> <NodeType>ds2.xlarge</NodeType> <ClusterIdentifier>examplecluster</ClusterIdentifier> <AllowVersionUpgrade>true</AllowVersionUpgrade> <MasterUsername>adminuser</MasterUsername> </Cluster> </ModifyClusterIamRolesResult> <ResponseMetadata> <RequestId>46e64043-40de-15b2-8a25-eb010998cc4e</RequestId> </ResponseMetadata> </ModifyClusterIamRolesResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: