Retrieves details of a specific channel contract.
Parameters:
-
catalog
(Catalog)
–
The catalog identifier for the channel contract.
-
identifier
(ChannelContractIdentifier)
–
The unique identifier of the channel contract to retrieve.
Raises:
Examples:
Example for GetChannelContract - MANAGED_SERVICES_ATTESTATION
>>> await client.get_channel_contract(catalog='AWS', identifier='cc-4fj3bd2o3vb91')
Example for GetChannelContract - CANCELED
>>> await client.get_channel_contract(catalog='AWS', identifier='cc-9xq4rt6w2zp81')
Source code in docs_src/capo_partnercentral_channel/_services/async_partner_central_channel.py
| async def get_channel_contract(
self,
catalog: "capo_partnercentral_channel.types.catalog.Catalog",
identifier: "capo_partnercentral_channel.types.channel_contract_identifier.ChannelContractIdentifier",
*,
config_overrides: Optional[AsyncPartnerCentralChannelClientConfig] = None,
) -> "capo_partnercentral_channel.types.get_channel_contract_response.GetChannelContractResponse":
"""<p>Retrieves details of a specific channel contract.</p>
Args:
catalog: <p>The catalog identifier for the channel contract.</p>
identifier: <p>The unique identifier of the channel contract to retrieve.</p>
Raises:
capo_partnercentral_channel.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions.</p>
capo_partnercentral_channel.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request.</p>
capo_partnercentral_channel.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_partnercentral_channel.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests being sent in a short period.</p>
capo_partnercentral_channel.errors.validation_exception.ValidationException: <p>The request failed validation due to invalid input parameters.</p>
capo_partnercentral_channel.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Example for GetChannelContract - MANAGED_SERVICES_ATTESTATION
>>> await client.get_channel_contract(catalog='AWS', identifier='cc-4fj3bd2o3vb91')
Example for GetChannelContract - CANCELED
>>> await client.get_channel_contract(catalog='AWS', identifier='cc-9xq4rt6w2zp81')
"""
async def _handler(
req: "AsyncOperationRequest[capo_partnercentral_channel.types.get_channel_contract_request.GetChannelContractRequest]",
) -> AsyncOperationResponse[
"capo_partnercentral_channel.types.get_channel_contract_response.GetChannelContractResponse"
]:
import capo_partnercentral_channel._operations.partner_central_channel.get_channel_contract
(
output,
http_response,
) = await capo_partnercentral_channel._operations.partner_central_channel.get_channel_contract.async_get_channel_contract(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_partnercentral_channel.types.get_channel_contract_response.GetChannelContractResponse",
) -> dict[str, Any]:
import capo_partnercentral_channel.types.get_channel_contract_response
return capo_partnercentral_channel.types.get_channel_contract_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetChannelContract", redact_output=_redact_output),
)
input_: capo_partnercentral_channel.types.get_channel_contract_request.GetChannelContractRequest = {
"catalog": catalog,
"identifier": identifier,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|