AssociateFileSystemAliases - Amazon FSx
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AssociateFileSystemAliases

Use this action to associate one or more Domain Name Server (DNS) aliases with an existing Amazon FSx for Windows File Server file system. A file system can have a maximum of 50 DNS aliases associated with it at any one time. If you try to associate a DNS alias that is already associated with the file system, FSx takes no action on that alias in the request. For more information, see Working with DNS Aliases and Walkthrough 5: Using DNS aliases to access your file system, including additional steps you must take to be able to access your file system using a DNS alias.

The system response shows the DNS aliases that Amazon FSx is attempting to associate with the file system. Use the DescribeFileSystemAliases API operation to monitor the status of the aliases Amazon FSx is associating with the file system.

Request Syntax

{ "Aliases": [ "string" ], "ClientRequestToken": "string", "FileSystemId": "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.

Aliases

An array of one or more DNS alias names to associate with the file system. The alias name has to comply with the following formatting requirements:

  • Formatted as a fully-qualified domain name (FQDN), hostname.domain , for example, accounting.corp.example.com.

  • Can contain alphanumeric characters and the hyphen (-).

  • Cannot start or end with a hyphen.

  • Can start with a numeric.

For DNS alias names, Amazon FSx stores alphabetic characters as lowercase letters (a-z), regardless of how you specify them: as uppercase letters, lowercase letters, or the corresponding letters in escape codes.

Type: Array of strings

Array Members: Maximum number of 50 items.

Length Constraints: Minimum length of 4. Maximum length of 253.

Pattern: ^[^\u0000\u0085\u2028\u2029\r\n]{4,253}$

Required: Yes

ClientRequestToken

(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Amazon Command Line Interface (Amazon CLI) or an Amazon SDK.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: [A-za-z0-9_.-]{0,63}$

Required: No

FileSystemId

Specifies the file system with which you want to associate one or more DNS aliases.

Type: String

Length Constraints: Minimum length of 11. Maximum length of 21.

Pattern: ^(fs-[0-9a-f]{8,})$

Required: Yes

Response Syntax

{ "Aliases": [ { "Lifecycle": "string", "Name": "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.

Aliases

An array of the DNS aliases that Amazon FSx is associating with the file system.

Type: Array of Alias objects

Array Members: Maximum number of 50 items.

Errors

For information about the errors that are common to all actions, see Common Errors.

BadRequest

A generic error indicating a failure with a client request.

HTTP Status Code: 400

FileSystemNotFound

No Amazon FSx file systems were found based upon supplied parameters.

HTTP Status Code: 400

InternalServerError

A generic error indicating a server-side failure.

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: