Updates a specified host with the provided configurations.
Parameters:
-
host_arn
(HostArn)
–
The Amazon Resource Name (ARN) of the host to be updated.
-
provider_endpoint
(Optional[Url], default:
None
)
–
The URL or endpoint of the host to be updated.
-
vpc_configuration
(Optional[VpcConfiguration], default:
None
)
–
The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.
Raises:
Source code in docs_src/capo_codestar_connections/_services/code_starconnections.py
| def update_host(
self,
host_arn: "capo_codestar_connections.types.host_arn.HostArn",
*,
config_overrides: Optional[CodeStarconnectionsClientConfig] = None,
provider_endpoint: Optional["capo_codestar_connections.types.url.Url"] = None,
vpc_configuration: Optional[
"capo_codestar_connections.types.vpc_configuration.VpcConfiguration"
] = None,
) -> "capo_codestar_connections.types.update_host_output.UpdateHostOutput":
"""<p>Updates a specified host with the provided configurations.</p>
Args:
host_arn: <p>The Amazon Resource Name (ARN) of the host to be updated.</p>
provider_endpoint: <p>The URL or endpoint of the host to be updated.</p>
vpc_configuration: <p>The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.</p>
Raises:
capo_codestar_connections.errors.conflict_exception.ConflictException: <p>Two conflicting operations have been made on the same resource.</p>
capo_codestar_connections.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found. Verify the connection resource ARN and try again.</p>
capo_codestar_connections.errors.resource_unavailable_exception.ResourceUnavailableException: <p>Resource not found. Verify the ARN for the host resource and try again.</p>
capo_codestar_connections.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The operation is not supported. Check the connection status and try again.</p>
capo_codestar_connections.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codestar_connections.types.update_host_input.UpdateHostInput]",
) -> OperationResponse[
"capo_codestar_connections.types.update_host_output.UpdateHostOutput"
]:
import capo_codestar_connections._operations.code_star_connections_20191201.update_host
output, http_response = (
capo_codestar_connections._operations.code_star_connections_20191201.update_host.update_host(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateHost")
)
input_: capo_codestar_connections.types.update_host_input.UpdateHostInput = {
"host_arn": host_arn
}
if provider_endpoint is not None:
input_["provider_endpoint"] = provider_endpoint
if vpc_configuration is not None:
input_["vpc_configuration"] = vpc_configuration
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|