put_admin_account
async
¶
put_admin_account(
account_id: AccountId,
priority: AdminPriority,
*,
config_overrides: Optional[AsyncNetworkSecurityManagerClientConfig] = None,
admin_scope: Optional[AdminScopeInput] = None,
) -> PutAdminAccountResponse
Sets the AWS account that serves as an AWS Network Security Manager administrator account, and optionally configures the scope of resources that the administrator can manage.
You can't set an administrator account again immediately after you remove it, or while the service creates its service-linked role. Retry the request after a few minutes.
Parameters:
-
account_id(AccountId) –The AWS account ID to set as the AWS Network Security Manager administrator account.
-
priority(AdminPriority) –The priority to assign to the administrator account.
-
admin_scope(Optional[AdminScopeInput], default:None) –The scope of accounts, organizational units, and firewall types that the administrator can manage.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ConflictException–The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
-
InternalServerException–The request processing failed because of an internal error in the service. This is a retryable error.
-
ServiceQuotaExceededException–The request would exceed a service quota.
-
ServiceUnavailableException–The service is temporarily unavailable. This is a retryable error.
-
ThrottlingException–The request was denied because of request throttling. Reduce your request rate and try again.
-
ValidationException–The request failed validation. For details, see the
reasonandfieldListmembers of the response. -
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Designate an administrator account Designates an account as a Network Security Manager administrator, scoped to a specific organizational unit and the WAF firewall type.
>>> await client.put_admin_account(account_id='234567890123', priority=2, admin_scope={'scopeFilter': {'includeOnly': {'organizationalUnits': ['ou-abcd-12345678']}}, 'firewallTypeScope': {'allFirewallTypesEnabled': False, 'firewallTypes': ['WAF']}})
Source code in docs_src/capo_network_security_manager/_services/async_network_security_manager.py
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 | |