Retrieves information about a campaign.
Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see Amazon Web Services Region and feature availability in the Amazon Web Services IoT FleetWise Developer Guide.
Parameters:
-
name
(campaignName)
–
The name of the campaign to retrieve information about.
Raises:
Source code in docs_src/capo_iotfleetwise/_services/io_t_fleet_wise.py
| def get_campaign(
self,
name: "capo_iotfleetwise.types.campaign_name.campaignName",
*,
config_overrides: Optional[IoTFleetWiseClientConfig] = None,
) -> "capo_iotfleetwise.types.get_campaign_response.GetCampaignResponse":
"""<p> Retrieves information about a campaign. </p> <important> <p>Access to certain Amazon Web Services IoT FleetWise features is currently gated. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html">Amazon Web Services Region and feature availability</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p> </important>
Args:
name: <p> The name of the campaign to retrieve information about. </p>
Raises:
capo_iotfleetwise.errors.internal_server_exception.InternalServerException: <p>The request couldn't be completed because the server temporarily failed.</p>
capo_iotfleetwise.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
capo_iotfleetwise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
capo_iotfleetwise.errors.throttling_exception.ThrottlingException: <p>The request couldn't be completed due to throttling.</p>
capo_iotfleetwise.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_iotfleetwise.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iotfleetwise.types.get_campaign_request.GetCampaignRequest]",
) -> OperationResponse[
"capo_iotfleetwise.types.get_campaign_response.GetCampaignResponse"
]:
import capo_iotfleetwise._operations.io_t_autobahn_control_plane.get_campaign
output, http_response = (
capo_iotfleetwise._operations.io_t_autobahn_control_plane.get_campaign.get_campaign(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_iotfleetwise.types.get_campaign_response.GetCampaignResponse",
) -> dict[str, Any]:
import capo_iotfleetwise.types.get_campaign_response
return capo_iotfleetwise.types.get_campaign_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetCampaign", redact_output=_redact_output),
)
input_: capo_iotfleetwise.types.get_campaign_request.GetCampaignRequest = {
"name": name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|