Skip to content

describe_data_shares async

describe_data_shares(
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    data_share_arn: Optional[String] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> DescribeDataSharesResult

Shows the status of any inbound or outbound datashares available in the specified account.

Parameters:

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

    The Amazon resource name (ARN) of the datashare to describe details of.

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

    The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.

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

    An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeDataShares request exceed the value specified in MaxRecords, Amazon Web Services returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.

Raises:

Source code in docs_src/capo_redshift/_services/async_redshift.py
async def describe_data_shares(
    self,
    *,
    config_overrides: Optional[AsyncRedshiftClientConfig] = None,
    data_share_arn: Optional["capo_redshift.types.string.String"] = None,
    max_records: Optional[
        "capo_redshift.types.integer_optional.IntegerOptional"
    ] = None,
    marker: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.describe_data_shares_result.DescribeDataSharesResult":
    """<p>Shows the status of any inbound or outbound datashares available in the specified account.</p>

    Args:
        data_share_arn: <p>The Amazon resource name (ARN) of the datashare to describe details of.</p>
        max_records: <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value. </p>
        marker: <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <a>DescribeDataShares</a> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request. </p>

    Raises:
        capo_redshift.errors.invalid_data_share_fault.InvalidDataShareFault: <p>There is an error with the datashare.</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_data_shares_message.DescribeDataSharesMessage]",
    ) -> AsyncOperationResponse[
        "capo_redshift.types.describe_data_shares_result.DescribeDataSharesResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.describe_data_shares

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDataShares")
    )
    input_: capo_redshift.types.describe_data_shares_message.DescribeDataSharesMessage = {}
    if data_share_arn is not None:
        input_["data_share_arn"] = data_share_arn
    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