JoinDomain
Adds a file gateway to an Active Directory domain. This operation is only supported for file gateways that support the SMB file protocol.
Note
Joining a domain creates an Active Directory computer account in the default organizational unit, using the gateway's Gateway ID as the account name (for example, SGW-1234ADE). If your Active Directory environment requires that you pre-stage accounts to facilitate the join domain process, you will need to create this account ahead of time.
To create the gateway's computer account in an organizational unit other than the default, you must specify the organizational unit when joining the domain.
Request Syntax
{
"DomainControllers": [ "string
" ],
"DomainName": "string
",
"GatewayARN": "string
",
"OrganizationalUnit": "string
",
"Password": "string
",
"TimeoutInSeconds": number
,
"UserName": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- DomainControllers
-
List of IPv4 addresses, NetBIOS names, or host names of your domain server. If you need to specify the port number include it after the colon (“:”). For example,
mydc.mydomain.com:389
.Type: Array of strings
Length Constraints: Minimum length of 6. Maximum length of 1024.
Pattern:
^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-]*[A-Za-z0-9])(:(\d+))?$
Required: No
- DomainName
-
The name of the domain that you want the gateway to join.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+$
Required: Yes
- GatewayARN
-
The Amazon Resource Name (ARN) of the gateway. Use the
ListGateways
operation to return a list of gateways for your account and AWS Region.Type: String
Length Constraints: Minimum length of 50. Maximum length of 500.
Required: Yes
- OrganizationalUnit
-
The organizational unit (OU) is a container in an Active Directory that can hold users, groups, computers, and other OUs and this parameter specifies the OU that the gateway will join within the AD domain.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Required: No
- Password
-
Sets the password of the user who has permission to add the gateway to the Active Directory domain.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
^[ -~]+$
Required: Yes
- TimeoutInSeconds
-
Specifies the time in seconds, in which the
JoinDomain
operation must complete. The default is 20 seconds.Type: Integer
Valid Range: Minimum value of 0. Maximum value of 3600.
Required: No
- UserName
-
Sets the user name of user who has permission to add the gateway to the Active Directory domain. The domain user account should be enabled to join computers to the domain. For example, you can use the domain administrator account or an account with delegated permissions to join computers to the domain.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
^\w[\w\.\- ]*$
Required: Yes
Response Syntax
{
"ActiveDirectoryStatus": "string",
"GatewayARN": "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.
- ActiveDirectoryStatus
-
Indicates the status of the gateway as a member of the Active Directory domain.
-
ACCESS_DENIED
: Indicates that theJoinDomain
operation failed due to an authentication error. -
DETACHED
: Indicates that gateway is not joined to a domain. -
JOINED
: Indicates that the gateway has successfully joined a domain. -
JOINING
: Indicates that aJoinDomain
operation is in progress. -
NETWORK_ERROR
: Indicates thatJoinDomain
operation failed due to a network or connectivity error. -
TIMEOUT
: Indicates that theJoinDomain
operation failed because the operation didn't complete within the allotted time. -
UNKNOWN_ERROR
: Indicates that theJoinDomain
operation failed due to another type of error.
Type: String
Valid Values:
ACCESS_DENIED | DETACHED | JOINED | JOINING | NETWORK_ERROR | TIMEOUT | UNKNOWN_ERROR
-
- GatewayARN
-
The unique Amazon Resource Name (ARN) of the gateway that joined the domain.
Type: String
Length Constraints: Minimum length of 50. Maximum length of 500.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerError
-
An internal server error has occurred during the request. For more information, see the error and message fields.
HTTP Status Code: 400
- InvalidGatewayRequestException
-
An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: