Retrieves the requested attributes for a listing, including case studies and trust center information. The operation returns results in pages. Use nextToken to retrieve the next page.
Parameters:
-
locale
(Optional[Locale], default:
None
)
–
The preferred locale for response content, as a Best Current Practice 47 (BCP 47) language tag or a comma-separated priority list of language tags. See Locale for supported values, constraints, fallback behavior, and the default locale. If you omit this field, the service returns content in the default locale.
-
listing_id
(ListingId)
–
The unique identifier of the listing whose attributes are requested.
-
attribute_types
(ListingAttributeTypeList)
–
The attribute types to retrieve. Specify one or more of the following values:
- CASE_STUDY
-
Case studies associated with the listing.
- SPECIALIZATION_DETAIL
-
Specializations earned for the listing.
- TRUST_CENTER_CERTIFICATION
-
Trust center certifications associated with the listing.
- TRUST_CENTER_CONTROL
-
Trust center controls associated with the listing.
- TRUST_CENTER_DOCUMENT
-
Trust center documents associated with the listing.
- TRUST_CENTER_FAQ
-
The trust center FAQ associated with the listing.
- TRUST_CENTER_SOURCE
-
Trust center sources associated with the listing.
- TRUST_CENTER_UPDATE
-
Trust center updates associated with the listing.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of attributes to return in each call. If you omit this field, the default is 25. Use nextToken to retrieve the next page.
-
next_token
(Optional[NextToken], default:
None
)
–
If the service returns nextToken, more results are available. The value of nextToken is a unique pagination token for each page. Make the call again with the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. An expired pagination token returns a ValidationException.
Raises:
-
AccessDeniedException
–
You don't have sufficient access to perform this action. Verify that you have the required permissions.
-
InternalServerException
–
Unexpected error during processing of the request.
-
ThrottlingException
–
The request was denied due to request throttling. Reduce the frequency of your requests and retry.
-
ValidationException
–
The input fails to satisfy the constraints specified by the service. Check the reason field for the constraint that failed.
-
ResourceNotFoundException
–
The specified resource doesn't exist. Verify that the identifier is correct.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
List case studies for a listing
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['CASE_STUDY'])
List case studies with pagination
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['CASE_STUDY'], max_results=1)
List specializations for a listing
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['SPECIALIZATION_DETAIL'])
Request multiple Trust Center attribute types
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_SOURCE', 'TRUST_CENTER_CERTIFICATION', 'TRUST_CENTER_DOCUMENT'], max_results=25)
List a Trust Center certification
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_CERTIFICATION'])
List a Trust Center document that requires access
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_DOCUMENT'])
List a view-only Trust Center document
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_DOCUMENT'])
List a downloadable Trust Center document
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_DOCUMENT'])
List Trust Center controls
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_CONTROL'])
List a Trust Center frequently asked question
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_FAQ'])
List Trust Center updates
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_UPDATE'])
Valid attribute types that do not apply to the listing
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleNonApplicableId', attribute_types=['TRUST_CENTER_CERTIFICATION'])
Source code in docs_src/capo_marketplace_discovery/_services/marketplace_discovery.py
| def list_listing_attributes(
self,
listing_id: "capo_marketplace_discovery.types.listing_id.ListingId",
attribute_types: "capo_marketplace_discovery.types.listing_attribute_type_list.ListingAttributeTypeList",
*,
config_overrides: Optional[MarketplaceDiscoveryClientConfig] = None,
locale: Optional["capo_marketplace_discovery.types.locale.Locale"] = None,
max_results: Optional[
"capo_marketplace_discovery.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_marketplace_discovery.types.next_token.NextToken"
] = None,
) -> "capo_marketplace_discovery.types.list_listing_attributes_output.ListListingAttributesOutput":
"""<p>Retrieves the requested attributes for a listing, including case studies and trust center information. The operation returns results in pages. Use <code>nextToken</code> to retrieve the next page.</p>
Args:
locale: <p>The preferred locale for response content, as a Best Current Practice 47 (BCP 47) language tag or a comma-separated priority list of language tags. See <code>Locale</code> for supported values, constraints, fallback behavior, and the default locale. If you omit this field, the service returns content in the default locale.</p>
listing_id: <p>The unique identifier of the listing whose attributes are requested.</p>
attribute_types: <p>The attribute types to retrieve. Specify one or more of the following values:</p> <dl> <dt>CASE_STUDY</dt> <dd> <p>Case studies associated with the listing.</p> </dd> <dt>SPECIALIZATION_DETAIL</dt> <dd> <p>Specializations earned for the listing.</p> </dd> <dt>TRUST_CENTER_CERTIFICATION</dt> <dd> <p>Trust center certifications associated with the listing.</p> </dd> <dt>TRUST_CENTER_CONTROL</dt> <dd> <p>Trust center controls associated with the listing.</p> </dd> <dt>TRUST_CENTER_DOCUMENT</dt> <dd> <p>Trust center documents associated with the listing.</p> </dd> <dt>TRUST_CENTER_FAQ</dt> <dd> <p>The trust center FAQ associated with the listing.</p> </dd> <dt>TRUST_CENTER_SOURCE</dt> <dd> <p>Trust center sources associated with the listing.</p> </dd> <dt>TRUST_CENTER_UPDATE</dt> <dd> <p>Trust center updates associated with the listing.</p> </dd> </dl>
max_results: <p>The maximum number of attributes to return in each call. If you omit this field, the default is 25. Use <code>nextToken</code> to retrieve the next page.</p>
next_token: <p>If the service returns <code>nextToken</code>, more results are available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again with the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. An expired pagination token returns a <code>ValidationException</code>.</p>
Raises:
capo_marketplace_discovery.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action. Verify that you have the required permissions.</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. Reduce the frequency of your requests and retry.</p>
capo_marketplace_discovery.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service. Check the <code>reason</code> field for the constraint that failed.</p>
capo_marketplace_discovery.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist. Verify that the identifier is correct.</p>
capo_marketplace_discovery.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List case studies for a listing
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['CASE_STUDY'])
List case studies with pagination
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['CASE_STUDY'], max_results=1)
List specializations for a listing
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['SPECIALIZATION_DETAIL'])
Request multiple Trust Center attribute types
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_SOURCE', 'TRUST_CENTER_CERTIFICATION', 'TRUST_CENTER_DOCUMENT'], max_results=25)
List a Trust Center certification
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_CERTIFICATION'])
List a Trust Center document that requires access
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_DOCUMENT'])
List a view-only Trust Center document
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_DOCUMENT'])
List a downloadable Trust Center document
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_DOCUMENT'])
List Trust Center controls
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_CONTROL'])
List a Trust Center frequently asked question
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_FAQ'])
List Trust Center updates
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleListingId', attribute_types=['TRUST_CENTER_UPDATE'])
Valid attribute types that do not apply to the listing
>>> client.list_listing_attributes(locale='en-US', listing_id='prodview-sampleNonApplicableId', attribute_types=['TRUST_CENTER_CERTIFICATION'])
"""
def _handler(
req: "OperationRequest[capo_marketplace_discovery.types.list_listing_attributes_input.ListListingAttributesInput]",
) -> OperationResponse[
"capo_marketplace_discovery.types.list_listing_attributes_output.ListListingAttributesOutput"
]:
import capo_marketplace_discovery._operations.aws_marketplace_discovery.list_listing_attributes
output, http_response = (
capo_marketplace_discovery._operations.aws_marketplace_discovery.list_listing_attributes.list_listing_attributes(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListListingAttributes")
)
input_: capo_marketplace_discovery.types.list_listing_attributes_input.ListListingAttributesInput = {
"listing_id": listing_id,
"attribute_types": attribute_types,
}
if locale is not None:
input_["locale"] = locale
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|