Skip to content

send_api_asset

send_api_asset(
    asset_id: __string,
    data_set_id: __string,
    revision_id: __string,
    *,
    config_overrides: Optional[DataExchangeClientConfig] = None,
    body: Optional[__string] = None,
    query_string_parameters: Optional[MapOf__string] = None,
    request_headers: Optional[MapOf__string] = None,
    method: Optional[__string] = None,
    path: Optional[__string] = None,
) -> SendApiAssetResponse

This operation invokes an API Gateway API asset. The request is proxied to the provider’s API Gateway API.

Parameters:

  • body (Optional[__string], default: None ) –

    The request body.

  • query_string_parameters (Optional[MapOf__string], default: None ) –

    Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).

  • asset_id (__string) –

    Asset ID value for the API request.

  • data_set_id (__string) –

    Data set ID value for the API request.

  • request_headers (Optional[MapOf__string], default: None ) –

    Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.

  • method (Optional[__string], default: None ) –

    HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.

  • path (Optional[__string], default: None ) –

    URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.

  • revision_id (__string) –

    Revision ID value for the API request.

Raises:

Source code in docs_src/capo_dataexchange/_services/data_exchange.py
def send_api_asset(
    self,
    asset_id: "capo_dataexchange.types.__string.__string",
    data_set_id: "capo_dataexchange.types.__string.__string",
    revision_id: "capo_dataexchange.types.__string.__string",
    *,
    config_overrides: Optional[DataExchangeClientConfig] = None,
    body: Optional["capo_dataexchange.types.__string.__string"] = None,
    query_string_parameters: Optional[
        "capo_dataexchange.types.map_of__string.MapOf__string"
    ] = None,
    request_headers: Optional[
        "capo_dataexchange.types.map_of__string.MapOf__string"
    ] = None,
    method: Optional["capo_dataexchange.types.__string.__string"] = None,
    path: Optional["capo_dataexchange.types.__string.__string"] = None,
) -> "capo_dataexchange.types.send_api_asset_response.SendApiAssetResponse":
    """<p>This operation invokes an API Gateway API asset. The request is proxied to the provider’s API Gateway API.</p>

    Args:
        body: <p>The request body.</p>
        query_string_parameters: <p>Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).</p>
        asset_id: <p>Asset ID value for the API request.</p>
        data_set_id: <p>Data set ID value for the API request.</p>
        request_headers: <p>Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.</p>
        method: <p>HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.</p>
        path: <p>URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.</p>
        revision_id: <p>Revision ID value for the API request.</p>

    Raises:
        capo_dataexchange.errors.access_denied_exception.AccessDeniedException: <p>Access to the resource is denied.</p>
        capo_dataexchange.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_dataexchange.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
        capo_dataexchange.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_dataexchange.errors.validation_exception.ValidationException: <p>The request was invalid.</p>
        capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_dataexchange.types.send_api_asset_request.SendApiAssetRequest]",
    ) -> OperationResponse[
        "capo_dataexchange.types.send_api_asset_response.SendApiAssetResponse"
    ]:
        import capo_dataexchange._operations.data_exchange.send_api_asset

        output, http_response = (
            capo_dataexchange._operations.data_exchange.send_api_asset.send_api_asset(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SendApiAsset")
    )
    input_: capo_dataexchange.types.send_api_asset_request.SendApiAssetRequest = {
        "asset_id": asset_id,
        "data_set_id": data_set_id,
        "revision_id": revision_id,
    }
    if body is not None:
        input_["body"] = body
    if query_string_parameters is not None:
        input_["query_string_parameters"] = query_string_parameters
    if request_headers is not None:
        input_["request_headers"] = request_headers
    if method is not None:
        input_["method"] = method
    if path is not None:
        input_["path"] = path

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output