SSM / Client / register_default_host_management_configuration
register_default_host_management_configuration¶
- SSM.Client.register_default_host_management_configuration(**kwargs)¶
Enables Default Host Management Configuration (DHMC) for the current Amazon Web Services account and Amazon Web Services Region. With DHMC enabled, you don’t need to configure additional resources, such as an instance profile, to use your Amazon EC2 instances as managed nodes in Amazon Web Services Systems Manager.
To use this operation, you must have the following permissions:
You need the
ssm:GetServiceSettingandssm:UpdateServiceSettingpermissions for the/ssm/managed-instance/default-ec2-instance-management-roleservice setting.You need the
iam:GetRoleandiam:PassRolepermissions for the role used for Default Host Management Configuration.
If
PermissionModelisSERVICE_MANAGED, you also need theiam:CreateRoleandiam:AttachRolePolicypermissions so that Amazon Web Services Systems Manager can create and configure the role on your behalf.See also: AWS API Documentation
Request Syntax
response = client.register_default_host_management_configuration( PermissionModel='SERVICE_MANAGED'|'SELF_MANAGED', RoleArn='string', Overwrite=True|False )
- Parameters:
PermissionModel (string) –
[REQUIRED]
The permission model that determines how the IAM role for Default Host Management Configuration is provided.
The permission model can be one of the following values:
SERVICE_MANAGED
Amazon Web Services Systems Manager creates and manages the role on your behalf.
SELF_MANAGED
You provide the role to register in
RoleArn.RoleArn (string) –
The Amazon Resource Name (ARN) of the self-managed IAM role that you register for Default Host Management Configuration. The requirement for this value depends on the permission model:
If
PermissionModelisSELF_MANAGED, this value is required.If
PermissionModelisSERVICE_MANAGED, this value must not be set.
Overwrite (boolean) – Specifies whether to override the role that is currently registered for Default Host Management Configuration. The default is
false, which acts as a guardrail against accidentally replacing an existing configuration. Set this totrueto replace the currently registered role.
- Return type:
dict
- Returns:
Response Syntax
{ 'RoleArn': 'string' }
Response Structure
(dict) –
RoleArn (string) –
The Amazon Resource Name (ARN) of the IAM role registered for Default Host Management Configuration. The value depends on the permission model:
SERVICE_MANAGED
The ARN of the role that Amazon Web Services Systems Manager created in the IAM reserved path.
SELF_MANAGED
The
RoleArnthat you provided.
Exceptions