def list_social_connections(
self,
catalog: "capo_partnercentral_marketing.types.catalog.Catalog",
*,
config_overrides: Optional[PartnerCentralMarketingClientConfig] = None,
platform: Optional[
"capo_partnercentral_marketing.types.platform.Platform"
] = None,
max_results: Optional[
"capo_partnercentral_marketing.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_partnercentral_marketing.types.next_token.NextToken"
] = None,
) -> "capo_partnercentral_marketing.types.list_social_connections_response.ListSocialConnectionsResponse":
"""Lists the partner's social connections, optionally filtered by platform.
Args:
catalog: Catalog to list connections from.
platform: Restrict results to a single social platform.
max_results: Maximum number of results to return per page.
next_token: Pagination token from a previous response.
Raises:
capo_partnercentral_marketing.errors.access_denied_exception.AccessDeniedException: You do not have sufficient access to perform this action. An IAM denial carries no `Reason`. A refusal for the caller's Partner Central state carries one, so a client tells the two apart by its presence.
capo_partnercentral_marketing.errors.internal_server_exception.InternalServerException: An unexpected error occurred during the processing of the request.
capo_partnercentral_marketing.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
capo_partnercentral_marketing.errors.validation_exception.ValidationException: The input fails to satisfy the constraints specified by the service. A caller branches on `Reason`, and where the rejection is attributable to particular fields it reads `FieldList` rather than parsing `Message`, which is prose and may change.
capo_partnercentral_marketing.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_partnercentral_marketing.types.list_social_connections_request.ListSocialConnectionsRequest]",
) -> OperationResponse[
"capo_partnercentral_marketing.types.list_social_connections_response.ListSocialConnectionsResponse"
]:
import capo_partnercentral_marketing._operations.aws_partner_demand_generator.list_social_connections
output, http_response = (
capo_partnercentral_marketing._operations.aws_partner_demand_generator.list_social_connections.list_social_connections(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_partnercentral_marketing.types.list_social_connections_response.ListSocialConnectionsResponse",
) -> dict[str, Any]:
import capo_partnercentral_marketing.types.list_social_connections_response
return capo_partnercentral_marketing.types.list_social_connections_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListSocialConnections", redact_output=_redact_output),
)
input_: capo_partnercentral_marketing.types.list_social_connections_request.ListSocialConnectionsRequest = {
"catalog": catalog
}
if platform is not None:
input_["platform"] = platform
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