Creates an application with the given name and description.
Parameters:
Raises:
Source code in docs_src/capo_application_discovery_service/_services/application_discovery_service.py
| def create_application(
self,
name: "capo_application_discovery_service.types.application_name.ApplicationName",
*,
config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
description: Optional[
"capo_application_discovery_service.types.application_description.ApplicationDescription"
] = None,
wave: Optional[
"capo_application_discovery_service.types.application_wave.ApplicationWave"
] = None,
) -> "capo_application_discovery_service.types.create_application_response.CreateApplicationResponse":
"""<p>Creates an application with the given name and description.</p>
Args:
name: <p>The name of the application to be created.</p>
description: <p>The description of the application to be created.</p>
wave: <p>The name of the migration wave of the application to be created.</p>
Raises:
capo_application_discovery_service.errors.authorization_error_exception.AuthorizationErrorException: <p>The user does not have permission to perform the action. Check the IAM policy associated with this user.</p>
capo_application_discovery_service.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home Region is not set. Set the home Region to continue.</p>
capo_application_discovery_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid. Verify the parameters and try again.</p>
capo_application_discovery_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of one or more parameters are either invalid or out of range. Verify the parameter values and try again.</p>
capo_application_discovery_service.errors.server_internal_error_exception.ServerInternalErrorException: <p>The server experienced an internal error. Try again.</p>
capo_application_discovery_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_application_discovery_service.types.create_application_request.CreateApplicationRequest]",
) -> OperationResponse[
"capo_application_discovery_service.types.create_application_response.CreateApplicationResponse"
]:
import capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.create_application
output, http_response = (
capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.create_application.create_application(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateApplication")
)
input_: capo_application_discovery_service.types.create_application_request.CreateApplicationRequest = {
"name": name
}
if description is not None:
input_["description"] = description
if wave is not None:
input_["wave"] = wave
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|