Returns a description of the specified environment.
Parameters:
-
environment_id
(EnvironmentId)
–
A unique ID for the environment.
Raises:
-
ResourceNotFoundException
–
A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a state of DELETED.
-
ValidationException
–
The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_evs/_services/evs.py
| def get_environment(
self,
environment_id: "capo_evs.types.environment_id.EnvironmentId",
*,
config_overrides: Optional[evsClientConfig] = None,
) -> "capo_evs.types.get_environment_response.GetEnvironmentResponse":
"""<p>Returns a description of the specified environment.</p>
Args:
environment_id: <p>A unique ID for the environment.</p>
Raises:
capo_evs.errors.resource_not_found_exception.ResourceNotFoundException: <p>A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a <code>state</code> of <code>DELETED</code>.</p>
capo_evs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.</p>
capo_evs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_evs.types.get_environment_request.GetEnvironmentRequest]",
) -> OperationResponse[
"capo_evs.types.get_environment_response.GetEnvironmentResponse"
]:
import capo_evs._operations.amazon_elastic_v_mware_service.get_environment
output, http_response = (
capo_evs._operations.amazon_elastic_v_mware_service.get_environment.get_environment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_evs.types.get_environment_response.GetEnvironmentResponse",
) -> dict[str, Any]:
import capo_evs.types.get_environment_response
return capo_evs.types.get_environment_response.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetEnvironment", redact_output=_redact_output),
)
input_: capo_evs.types.get_environment_request.GetEnvironmentRequest = {
"environment_id": environment_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|