Skip to content

describe_endpoint_authorization async

describe_endpoint_authorization(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional[String] = None,
    account: Optional[String] = None,
    grantee: Optional[BooleanOptional] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> EndpointAuthorizationList

Describes an endpoint authorization.

Parameters:

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

    The cluster identifier of the cluster to access.

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

    The Amazon Web Services account ID of either the cluster owner (grantor) or grantee. If Grantee parameter is true, then the Account value is of the grantor.

  • grantee (Optional[BooleanOptional], default: None ) –

    Indicates whether to check authorization from a grantor or grantee point of view. If true, Amazon Redshift returns endpoint authorizations that you've been granted. If false (default), checks authorization from a grantor point of view.

  • max_records (Optional[IntegerOptional], default: None ) –

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a Marker is included in the response so that the remaining results can be retrieved.

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

    An optional pagination token provided by a previous DescribeEndpointAuthorization request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by the MaxRecords parameter.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def describe_endpoint_authorization(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
    account: Optional["capo_redshift.types.string.String"] = None,
    grantee: Optional[
        "capo_redshift.types.boolean_optional.BooleanOptional"
    ] = None,
    max_records: Optional[
        "capo_redshift.types.integer_optional.IntegerOptional"
    ] = None,
    marker: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.endpoint_authorization_list.EndpointAuthorizationList":
    """<p>Describes an endpoint authorization.</p>

    Args:
        cluster_identifier: <p>The cluster identifier of the cluster to access.</p>
        account: <p>The Amazon Web Services account ID of either the cluster owner (grantor) or grantee. If <code>Grantee</code> parameter is true, then the <code>Account</code> value is of the grantor.</p>
        grantee: <p>Indicates whether to check authorization from a grantor or grantee point of view. If true, Amazon Redshift returns endpoint authorizations that you've been granted. If false (default), checks authorization from a grantor point of view.</p>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a <code>Marker</code> is included in the response so that the remaining results can be retrieved.</p>
        marker: <p>An optional pagination token provided by a previous <code>DescribeEndpointAuthorization</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by the <code>MaxRecords</code> parameter.</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.unsupported_operation_fault.UnsupportedOperationFault: <p>The requested operation isn't supported.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift.types.describe_endpoint_authorization_message.DescribeEndpointAuthorizationMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.endpoint_authorization_list.EndpointAuthorizationList"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.describe_endpoint_authorization

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeEndpointAuthorization")
    )
    input_: capo_redshift.types.describe_endpoint_authorization_message.DescribeEndpointAuthorizationMessage = {}
    if cluster_identifier is not None:
        input_["cluster_identifier"] = cluster_identifier
    if account is not None:
        input_["account"] = account
    if grantee is not None:
        input_["grantee"] = grantee
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker

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