Gets information about the specified product.
Running this operation with administrator access results in a failure. DescribeProductAsAdmin should be used instead.
Parameters:
Raises:
Source code in docs_src/capo_service_catalog/_services/service_catalog.py
| def describe_product(
self,
*,
config_overrides: Optional[ServiceCatalogClientConfig] = None,
accept_language: Optional[
"capo_service_catalog.types.accept_language.AcceptLanguage"
] = None,
id: Optional["capo_service_catalog.types.id.Id"] = None,
name: Optional[
"capo_service_catalog.types.product_view_name.ProductViewName"
] = None,
) -> "capo_service_catalog.types.describe_product_output.DescribeProductOutput":
"""<p>Gets information about the specified product.</p> <note> <p> Running this operation with administrator access results in a failure. <a>DescribeProductAsAdmin</a> should be used instead. </p> </note>
Args:
accept_language: <p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>
id: <p>The product identifier.</p>
name: <p>The product name.</p>
Raises:
capo_service_catalog.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the operation are not valid.</p>
capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_service_catalog.types.describe_product_input.DescribeProductInput]",
) -> OperationResponse[
"capo_service_catalog.types.describe_product_output.DescribeProductOutput"
]:
import capo_service_catalog._operations.aws242_service_catalog_service.describe_product
output, http_response = (
capo_service_catalog._operations.aws242_service_catalog_service.describe_product.describe_product(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeProduct")
)
input_: capo_service_catalog.types.describe_product_input.DescribeProductInput = {}
if accept_language is not None:
input_["accept_language"] = accept_language
if id is not None:
input_["id"] = id
if name is not None:
input_["name"] = name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|