Provides details about a product, such as descriptions, highlights, categories, fulfillment option summaries, promotional media, and seller engagement options.
Parameters:
-
locale
(Optional[Locale], default:
None
)
–
A BCP 47 language tag or comma-separated priority list specifying the preferred locale for response content. See Locale for supported values, constraints, fallback behavior, and the default locale. If omitted, the service returns content in the default locale.
-
product_id
(ProductId)
–
The unique identifier of the product to retrieve.
Raises:
Examples:
GetProduct for SaaS product with DEPLOYED status
>>> await client.get_product(locale='en-US', product_id='prod-sampleSaasId')
GetProduct for AMI product with NOT_DEPLOYED status
>>> await client.get_product(locale='en-US', product_id='prod-sampleAmiId')
GetProduct for professional services with NOT_APPLICABLE status
>>> await client.get_product(locale='en-US', product_id='prod-sampleProServId')
Source code in docs_src/capo_marketplace_discovery/_services/async_marketplace_discovery.py
| async def get_product(
self,
product_id: "capo_marketplace_discovery.types.product_id.ProductId",
*,
config_overrides: Optional[AsyncMarketplaceDiscoveryClientConfig] = None,
locale: Optional["capo_marketplace_discovery.types.locale.Locale"] = None,
) -> "capo_marketplace_discovery.types.get_product_output.GetProductOutput":
"""<p>Provides details about a product, such as descriptions, highlights, categories, fulfillment option summaries, promotional media, and seller engagement options.</p>
Args:
locale: <p>A BCP 47 language tag or comma-separated priority list specifying the preferred locale for response content. See <code>Locale</code> for supported values, constraints, fallback behavior, and the default locale. If omitted, the service returns content in the default locale.</p>
product_id: <p>The unique identifier of the product to retrieve.</p>
Raises:
capo_marketplace_discovery.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
capo_marketplace_discovery.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of the request.</p>
capo_marketplace_discovery.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_marketplace_discovery.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
capo_marketplace_discovery.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
capo_marketplace_discovery.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
GetProduct for SaaS product with DEPLOYED status
>>> await client.get_product(locale='en-US', product_id='prod-sampleSaasId')
GetProduct for AMI product with NOT_DEPLOYED status
>>> await client.get_product(locale='en-US', product_id='prod-sampleAmiId')
GetProduct for professional services with NOT_APPLICABLE status
>>> await client.get_product(locale='en-US', product_id='prod-sampleProServId')
"""
async def _handler(
req: "AsyncOperationRequest[capo_marketplace_discovery.types.get_product_input.GetProductInput]",
) -> AsyncOperationResponse[
"capo_marketplace_discovery.types.get_product_output.GetProductOutput"
]:
import capo_marketplace_discovery._operations.aws_marketplace_discovery.get_product
(
output,
http_response,
) = await capo_marketplace_discovery._operations.aws_marketplace_discovery.get_product.async_get_product(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetProduct")
)
input_: capo_marketplace_discovery.types.get_product_input.GetProductInput = {
"product_id": product_id
}
if locale is not None:
input_["locale"] = locale
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|