PutAdminAccount
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.
Request Syntax
PUT /admin-account HTTP/1.1
Content-type: application/json
{
"accountId": "string",
"adminScope": {
"firewallTypeScope": {
"allFirewallTypesEnabled": boolean,
"firewallTypes": [ "string" ]
},
"scopeFilter": { ... }
},
"priority": number
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- accountId
-
The AWS account ID to set as the AWS Network Security Manager administrator account.
Type: String
Length Constraints: Fixed length of 12.
Pattern:
(?:[0-9]{12})Required: Yes
- adminScope
-
The scope of accounts, organizational units, and firewall types that the administrator can manage.
Type: AdminScopeInput object
Required: No
- priority
-
The priority to assign to the administrator account.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 10.
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"adminAccountDetails": {
"adminAccount": "string",
"adminScope": {
"firewallTypeScope": {
"allFirewallTypesEnabled": boolean,
"firewallTypes": [ "string" ]
},
"scopeFilter": { ... }
},
"priority": number,
"status": "string"
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- adminAccountDetails
-
The details of the administrator account that was set.
Type: AdminAccountDetails object
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You do not have sufficient permissions to perform this action.
HTTP Status Code: 403
- 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.
- resourceId
-
The ID of the resource that is in conflict with the request.
- resourceType
-
The type of the resource that is in conflict with the request.
HTTP Status Code: 409
- InternalServerException
-
The request processing failed because of an internal error in the service. This is a retryable error.
HTTP Status Code: 500
- ServiceQuotaExceededException
-
The request would exceed a service quota.
- quotaCode
-
The code that identifies the service quota that was exceeded.
- resourceId
-
The ID of the resource associated with the quota that was exceeded.
- resourceType
-
The type of the resource associated with the quota that was exceeded.
- serviceCode
-
The code for the AWS service that owns the quota that was exceeded.
HTTP Status Code: 402
- ServiceUnavailableException
-
The service is temporarily unavailable. This is a retryable error.
- retryAfterSeconds
-
The number of seconds to wait before retrying the request.
HTTP Status Code: 503
- ThrottlingException
-
The request was denied because of request throttling. Reduce your request rate and try again.
- retryAfterSeconds
-
The number of seconds to wait before retrying the request.
HTTP Status Code: 429
- ValidationException
-
The request failed validation. For details, see the
reasonandfieldListmembers of the response.- fieldList
-
The list of request fields that failed validation, if any.
- reason
-
The reason that the request failed validation.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: