async def get_portal(
self,
portal_arn: "capo_workspaces_web.types.arn.ARN",
*,
config_overrides: Optional[AsyncWorkSpacesWebClientConfig] = None,
) -> "capo_workspaces_web.types.get_portal_response.GetPortalResponse":
"""<p>Gets the web portal.</p>
Args:
portal_arn: <p>The ARN of the web portal.</p>
Raises:
capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
capo_workspaces_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource cannot be found.</p>
capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_workspaces_web.types.get_portal_request.GetPortalRequest]",
) -> AsyncOperationResponse[
"capo_workspaces_web.types.get_portal_response.GetPortalResponse"
]:
import capo_workspaces_web._operations.aws_ermine_control_plane_service.get_portal
(
output,
http_response,
) = await capo_workspaces_web._operations.aws_ermine_control_plane_service.get_portal.async_get_portal(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_workspaces_web.types.get_portal_response.GetPortalResponse",
) -> dict[str, Any]:
import capo_workspaces_web.types.get_portal_response
return capo_workspaces_web.types.get_portal_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetPortal", redact_output=_redact_output),
)
input_: capo_workspaces_web.types.get_portal_request.GetPortalRequest = {
"portal_arn": portal_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output