RedshiftServerless / Client / delete_role_association
delete_role_association¶
- RedshiftServerless.Client.delete_role_association(**kwargs)¶
Removes the association, if it exists, between an IAM principal and an Amazon Redshift system-defined role on Amazon Redshift Serverless with express configuration. This operation is idempotent. If the association doesn’t exist, the request still succeeds.
See also: AWS API Documentation
Request Syntax
response = client.delete_role_association( targetArn='string', roleType='string', principal={ 'iam': { 'arn': 'string' } } )
- Parameters:
targetArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the default endpoint. Only
express-defaultis supported, and it must be in the same Amazon Web Services account as the caller. The ARN format isarn:aws-partition:redshift-serverless:region:account-id:workgroup/express/express-default, for examplearn:aws:redshift-serverless:us-east-1:111122223333:workgroup/express/express-default.roleType (string) –
[REQUIRED]
The case-sensitive system-defined role to remove the principal from. Valid values are
sys:superuser,sys:operator,sys:dba,sys:secadmin, andsys:monitor.principal (dict) –
[REQUIRED]
The IAM role or IAM user to remove from the role type. Specify the ARN used to create the association. The IAM principal doesn’t need to exist when you delete the association.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
iam.iam (dict) –
An IAM role or IAM user.
arn (string) – [REQUIRED]
The ARN of the IAM role or IAM user. The principal must be in the same account as the caller.
- Return type:
dict
- Returns:
Response Syntax
{ 'targetArn': 'string', 'roleType': 'string', 'principal': { 'iam': { 'arn': 'string', 'resolvedUniqueId': 'string' } } }
Response Structure
(dict) –
targetArn (string) –
The Amazon Resource Name (ARN) of the default endpoint.
roleType (string) –
The system-defined role specified in the request.
principal (dict) –
The principal from the request. If the request removed an existing association, the response includes its resolved unique ID. If no association existed, the response omits the resolved unique ID.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
iam. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
iam (dict) –
An IAM role or IAM user.
arn (string) –
The ARN of the IAM role or IAM user.
resolvedUniqueId (string) –
The unique ID that IAM assigned to the principal. Amazon Redshift looks up this ID from the principal ARN when it creates the association. Role IDs begin with
AROA, and user IDs begin withAIDA. The association is tied to this ID. A deleted and recreated IAM principal with the same ARN doesn’t inherit the previous principal’s association. The response omits this field when an idempotentDeleteRoleAssociationrequest finds no existing association.
Exceptions