Removes the Default Host Management Configuration (DHMC) for an Amazon Web Services account and Amazon Web Services Region. After you deregister DHMC, Amazon EC2 instances are no longer automatically managed as managed nodes by Amazon Web Services Systems Manager.
To use this operation, you must have the following permissions:
If the registered role is service-managed, you also need the iam:DeleteRole permission so that Amazon Web Services Systems Manager can remove the role it created.
Raises:
Source code in docs_src/capo_ssm/_services/async_ssm.py
| async def deregister_default_host_management_configuration(
self, *, config_overrides: Optional[AsyncSSMClientConfig] = None
) -> "capo_ssm.types.deregister_default_host_management_configuration_result.DeregisterDefaultHostManagementConfigurationResult":
"""<p>Removes the Default Host Management Configuration (DHMC) for an Amazon Web Services account and Amazon Web Services Region. After you deregister DHMC, Amazon EC2 instances are no longer automatically managed as managed nodes by Amazon Web Services Systems Manager.</p> <p>To use this operation, you must have the following permissions:</p> <ul> <li> <p>You need the <code>ssm:GetServiceSetting</code> and <code>ssm:ResetServiceSetting</code> permissions for the <code>/ssm/managed-instance/default-ec2-instance-management-role</code> service setting.</p> </li> </ul> <p>If the registered role is service-managed, you also need the <code>iam:DeleteRole</code> permission so that Amazon Web Services Systems Manager can remove the role it created.</p>
Raises:
capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_ssm.types.deregister_default_host_management_configuration_request.DeregisterDefaultHostManagementConfigurationRequest]",
) -> AsyncOperationResponse[
"capo_ssm.types.deregister_default_host_management_configuration_result.DeregisterDefaultHostManagementConfigurationResult"
]:
import capo_ssm._operations.amazon_ssm.deregister_default_host_management_configuration
(
output,
http_response,
) = await capo_ssm._operations.amazon_ssm.deregister_default_host_management_configuration.async_deregister_default_host_management_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DeregisterDefaultHostManagementConfiguration"),
)
input_: capo_ssm.types.deregister_default_host_management_configuration_request.DeregisterDefaultHostManagementConfigurationRequest = {}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|