Creates a Config with the specified configData parameters.
Only one type of configData can be specified.
Parameters:
Raises:
Source code in docs_src/capo_groundstation/_services/ground_station.py
| def create_config(
self,
name: "capo_groundstation.types.safe_name.SafeName",
config_data: "capo_groundstation.types.config_type_data.ConfigTypeData",
*,
config_overrides: Optional[GroundStationClientConfig] = None,
tags: Optional["capo_groundstation.types.tags_map.TagsMap"] = None,
) -> "capo_groundstation.types.config_id_response.ConfigIdResponse":
"""<p>Creates a <code>Config</code> with the specified <code>configData</code> parameters.</p> <p>Only one type of <code>configData</code> can be specified.</p>
Args:
name: <p>Name of a <code>Config</code>.</p>
config_data: <p>Parameters of a <code>Config</code>.</p>
tags: <p>Tags assigned to a <code>Config</code>.</p>
Raises:
capo_groundstation.errors.dependency_exception.DependencyException: <p>Dependency encountered an error.</p>
capo_groundstation.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid.</p>
capo_groundstation.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>Account limits for this resource have been exceeded.</p>
capo_groundstation.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource was not found.</p>
capo_groundstation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_groundstation.types.create_config_request.CreateConfigRequest]",
) -> OperationResponse[
"capo_groundstation.types.config_id_response.ConfigIdResponse"
]:
import capo_groundstation._operations.ground_station.create_config
output, http_response = (
capo_groundstation._operations.ground_station.create_config.create_config(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateConfig")
)
input_: capo_groundstation.types.create_config_request.CreateConfigRequest = {
"name": name,
"config_data": config_data,
}
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|