Skip to content

revoke_endpoint_access async

revoke_endpoint_access(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional[String] = None,
    account: Optional[String] = None,
    vpc_ids: Optional[VpcIdentifierList] = None,
    force: Optional[Boolean] = None,
) -> EndpointAuthorization

Revokes access to a cluster.

Parameters:

  • cluster_identifier (Optional[String], default: None ) –

    The cluster to revoke access from.

  • account (Optional[String], default: None ) –

    The Amazon Web Services account ID whose access is to be revoked.

  • vpc_ids (Optional[VpcIdentifierList], default: None ) –

    The virtual private cloud (VPC) identifiers for which access is to be revoked.

  • force (Optional[Boolean], default: None ) –

    Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def revoke_endpoint_access(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
    account: Optional["capo_redshift.types.string.String"] = None,
    vpc_ids: Optional[
        "capo_redshift.types.vpc_identifier_list.VpcIdentifierList"
    ] = None,
    force: Optional["capo_redshift.types.boolean.Boolean"] = None,
) -> "capo_redshift.types.endpoint_authorization.EndpointAuthorization":
    """<p>Revokes access to a cluster.</p>

    Args:
        cluster_identifier: <p>The cluster to revoke access from.</p>
        account: <p>The Amazon Web Services account ID whose access is to be revoked.</p>
        vpc_ids: <p>The virtual private cloud (VPC) identifiers for which access is to be revoked.</p>
        force: <p>Indicates whether to force the revoke action. If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.</p>

    Raises:
        capo_redshift.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. </p>
        capo_redshift.errors.endpoint_authorization_not_found_fault.EndpointAuthorizationNotFoundFault: <p>The authorization for this endpoint can't be found.</p>
        capo_redshift.errors.endpoint_not_found_fault.EndpointNotFoundFault: <p>The endpoint name doesn't refer to an existing endpoint.</p>
        capo_redshift.errors.invalid_authorization_state_fault.InvalidAuthorizationStateFault: <p>The status of the authorization is not valid.</p>
        capo_redshift.errors.invalid_cluster_security_group_state_fault.InvalidClusterSecurityGroupStateFault: <p>The state of the cluster security group is not <code>available</code>. </p>
        capo_redshift.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The specified cluster is not in the <code>available</code> state. </p>
        capo_redshift.errors.invalid_endpoint_state_fault.InvalidEndpointStateFault: <p>The status of the endpoint is not valid.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.revoke_endpoint_access_message.RevokeEndpointAccessMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.endpoint_authorization.EndpointAuthorization"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.revoke_endpoint_access

        (
            output,
            http_response,
        ) = await capo_redshift._operations.redshift_service_version20121201.revoke_endpoint_access.async_revoke_endpoint_access(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RevokeEndpointAccess")
    )
    input_: capo_redshift.types.revoke_endpoint_access_message.RevokeEndpointAccessMessage = {}
    if cluster_identifier is not None:
        input_["cluster_identifier"] = cluster_identifier
    if account is not None:
        input_["account"] = account
    if vpc_ids is not None:
        input_["vpc_ids"] = vpc_ids
    if force is not None:
        input_["force"] = force

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