create_role_association
async
¶
create_role_association(
target_arn: AmazonResourceName,
role_type: RoleTypeName,
principal: PrincipalInput,
*,
config_overrides: Optional[AsyncRedshiftServerlessClientConfig] = None,
) -> CreateRoleAssociationResponse
Associates an IAM principal with an Amazon Redshift system-defined role on Amazon Redshift Serverless with express configuration. When the principal connects to the regional endpoint, its database user gets the associated system-defined role for monitoring, operational, or administrative tasks. A role association doesn't give access to your data. You must also have separate permissions to obtain credentials and connect to the regional endpoint. To associate multiple principals or role types, submit a separate request for each association. You can associate up to 10 principals with each role type.
Parameters:
-
target_arn(AmazonResourceName) –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. -
role_type(RoleTypeName) –The case-sensitive system-defined role to associate the principal with. Valid values are
sys:superuser,sys:operator,sys:dba,sys:secadmin, andsys:monitor. On the express configuration,sys:operator,sys:dba, andsys:superusergive the same permissions. -
principal(PrincipalInput) –The IAM role or IAM user to associate with the role type, specified by its ARN. The principal must exist and must be in the same Amazon Web Services account as the caller.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The submitted action has conflicts.
-
InternalServerException–The request processing has failed because of an unknown error, exception or failure.
-
ResourceNotFoundException–The resource could not be found.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input failed to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.