Updates the specified site.
Parameters:
-
site_id
(SiteId)
–
The ID or the Amazon Resource Name (ARN) of the site.
-
notes
(Optional[SiteNotes], default:
None
)
–
Raises:
Source code in docs_src/capo_outposts/_services/outposts.py
| def update_site(
self,
site_id: "capo_outposts.types.site_id.SiteId",
*,
config_overrides: Optional[OutpostsClientConfig] = None,
name: Optional["capo_outposts.types.site_name.SiteName"] = None,
description: Optional[
"capo_outposts.types.site_description.SiteDescription"
] = None,
notes: Optional["capo_outposts.types.site_notes.SiteNotes"] = None,
) -> "capo_outposts.types.update_site_output.UpdateSiteOutput":
"""<p>Updates the specified site.</p>
Args:
site_id: <p> The ID or the Amazon Resource Name (ARN) of the site. </p>
notes: <p>Notes about a site.</p>
Raises:
capo_outposts.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this operation.</p>
capo_outposts.errors.conflict_exception.ConflictException: <p>Updating or deleting this resource can cause an inconsistent state.</p>
capo_outposts.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
capo_outposts.errors.not_found_exception.NotFoundException: <p>The specified request is not valid.</p>
capo_outposts.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
capo_outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_outposts.types.update_site_input.UpdateSiteInput]",
) -> OperationResponse[
"capo_outposts.types.update_site_output.UpdateSiteOutput"
]:
import capo_outposts._operations.outposts_olaf_service.update_site
output, http_response = (
capo_outposts._operations.outposts_olaf_service.update_site.update_site(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateSite")
)
input_: capo_outposts.types.update_site_input.UpdateSiteInput = {
"site_id": site_id
}
if name is not None:
input_["name"] = name
if description is not None:
input_["description"] = description
if notes is not None:
input_["notes"] = notes
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|