

# DeleteRoleAssociation

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.

## Request Syntax
<a name="API_DeleteRoleAssociation_RequestSyntax"></a>

```
{
   "principal": { ... },
   "roleType": "{{string}}",
   "targetArn": "{{string}}"
}
```

## Request Parameters
<a name="API_DeleteRoleAssociation_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [principal](#API_DeleteRoleAssociation_RequestSyntax) **   <a name="redshiftserverless-DeleteRoleAssociation-request-principal"></a>
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.  
Type: [PrincipalInput](API_PrincipalInput.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.  
Required: Yes

 ** [roleType](#API_DeleteRoleAssociation_RequestSyntax) **   <a name="redshiftserverless-DeleteRoleAssociation-request-roleType"></a>
The case-sensitive system-defined role to remove the principal from. Valid values are `sys:superuser`, `sys:operator`, `sys:dba`, `sys:secadmin`, and `sys:monitor`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Required: Yes

 ** [targetArn](#API_DeleteRoleAssociation_RequestSyntax) **   <a name="redshiftserverless-DeleteRoleAssociation-request-targetArn"></a>
The Amazon Resource Name (ARN) of the default endpoint. Only `express-default` is supported, and it must be in the same AWS account as the caller. The ARN format is `arn:aws-partition:redshift-serverless:region:account-id:workgroup/express/express-default`, for example `arn:aws:redshift-serverless:us-east-1:111122223333:workgroup/express/express-default`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1011.  
Required: Yes

## Response Syntax
<a name="API_DeleteRoleAssociation_ResponseSyntax"></a>

```
{
   "principal": { ... },
   "roleType": "string",
   "targetArn": "string"
}
```

## Response Elements
<a name="API_DeleteRoleAssociation_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [principal](#API_DeleteRoleAssociation_ResponseSyntax) **   <a name="redshiftserverless-DeleteRoleAssociation-response-principal"></a>
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.  
Type: [PrincipalOutput](API_PrincipalOutput.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.

 ** [roleType](#API_DeleteRoleAssociation_ResponseSyntax) **   <a name="redshiftserverless-DeleteRoleAssociation-response-roleType"></a>
The system-defined role specified in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.

 ** [targetArn](#API_DeleteRoleAssociation_ResponseSyntax) **   <a name="redshiftserverless-DeleteRoleAssociation-response-targetArn"></a>
The Amazon Resource Name (ARN) of the default endpoint.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1011.

## Errors
<a name="API_DeleteRoleAssociation_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
You do not have sufficient access to perform this action.  
HTTP Status Code: 400

 ** InternalServerException **   
The request processing has failed because of an unknown error, exception or failure.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The resource could not be found.    
 ** resourceName **   
The name of the resource that could not be found.
HTTP Status Code: 400

 ** ThrottlingException **   
The request was denied due to request throttling.  
HTTP Status Code: 400

 ** ValidationException **   
The input failed to satisfy the constraints specified by an AWS service.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteRoleAssociation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/redshift-serverless-2021-04-21/DeleteRoleAssociation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/redshift-serverless-2021-04-21/DeleteRoleAssociation) 