Skip to content

disassociate_iam_role_from_resource async

disassociate_iam_role_from_resource(
    iam_role_arn: RoleArn,
    aws_integration: SupportedAwsIntegration,
    resource_arn: Arn,
    *,
    config_overrides: Optional[AsyncodbClientConfig] = None,
) -> DisassociateIamRoleFromResourceOutput

Disassociates an Amazon Web Services Identity and Access Management (IAM) service role from a specified resource to disable Amazon Web Services service integration.

Parameters:

  • iam_role_arn (RoleArn) –

    The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) service role to disassociate from the resource.

  • aws_integration (SupportedAwsIntegration) –

    The Amazon Web Services integration configuration settings for the Amazon Web Services Identity and Access Management (IAM) service role disassociation.

  • resource_arn (Arn) –

    The Amazon Resource Name (ARN) of the target resource to disassociate from the Amazon Web Services Identity and Access Management (IAM) service role.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.

  • ConflictException –

    Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.

  • InternalServerException –

    Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.

  • ResourceNotFoundException –

    The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request has failed validation because it is missing required fields or has invalid inputs.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_odb/_services/async_odb.py
async def disassociate_iam_role_from_resource(
    self,
    iam_role_arn: "capo_odb.types.role_arn.RoleArn",
    aws_integration: "capo_odb.types.supported_aws_integration.SupportedAwsIntegration",
    resource_arn: "capo_odb.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncodbClientConfig] = None,
) -> "capo_odb.types.disassociate_iam_role_from_resource_output.DisassociateIamRoleFromResourceOutput":
    """<p>Disassociates an Amazon Web Services Identity and Access Management (IAM) service role from a specified resource to disable Amazon Web Services service integration.</p>

    Args:
        iam_role_arn: <p>The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) service role to disassociate from the resource.</p>
        aws_integration: <p>The Amazon Web Services integration configuration settings for the Amazon Web Services Identity and Access Management (IAM) service role disassociation.</p>
        resource_arn: <p>The Amazon Resource Name (ARN) of the target resource to disassociate from the Amazon Web Services Identity and Access Management (IAM) service role.</p>

    Raises:
        capo_odb.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.</p>
        capo_odb.errors.conflict_exception.ConflictException: <p>Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.</p>
        capo_odb.errors.internal_server_exception.InternalServerException: <p>Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.</p>
        capo_odb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.</p>
        capo_odb.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_odb.errors.validation_exception.ValidationException: <p>The request has failed validation because it is missing required fields or has invalid inputs.</p>
        capo_odb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_odb.types.disassociate_iam_role_from_resource_input.DisassociateIamRoleFromResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_odb.types.disassociate_iam_role_from_resource_output.DisassociateIamRoleFromResourceOutput"
    ]:
        import capo_odb._operations.odb.disassociate_iam_role_from_resource

        (
            output,
            http_response,
        ) = await capo_odb._operations.odb.disassociate_iam_role_from_resource.async_disassociate_iam_role_from_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateIamRoleFromResource")
    )
    input_: capo_odb.types.disassociate_iam_role_from_resource_input.DisassociateIamRoleFromResourceInput = {
        "iam_role_arn": iam_role_arn,
        "aws_integration": aws_integration,
        "resource_arn": resource_arn,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output