You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::FSx::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Amazon FSx. To construct a client, you need to configure a :region and :credentials.

fsx = Aws::FSx::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::FSx::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::FSx::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#associate_file_system_aliases(options = {}) ⇒ Types::AssociateFileSystemAliasesResponse

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 systen 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 API operation to monitor the status of the aliases Amazon FSx is associating with the file system.

Examples:

Request syntax with placeholder values


resp = client.associate_file_system_aliases({
  client_request_token: "ClientRequestToken",
  file_system_id: "FileSystemId", # required
  aliases: ["AlternateDNSName"], # required
})

Response structure


resp.aliases #=> Array
resp.aliases[0].name #=> String
resp.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"

Options Hash (options):

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided.

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

  • :file_system_id (required, String)

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

  • :aliases (required, Array<String>)

    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.

Returns:

See Also:

#cancel_data_repository_task(options = {}) ⇒ Types::CancelDataRepositoryTaskResponse

Cancels an existing Amazon FSx for Lustre data repository task if that task is in either the PENDING or EXECUTING state. When you cancel a task, Amazon FSx does the following.

  • Any files that FSx has already exported are not reverted.

  • FSx continues to export any files that are "in-flight" when the cancel operation is received.

  • FSx does not export any files that have not yet been exported.

Examples:

Request syntax with placeholder values


resp = client.cancel_data_repository_task({
  task_id: "TaskId", # required
})

Response structure


resp.lifecycle #=> String, one of "PENDING", "EXECUTING", "FAILED", "SUCCEEDED", "CANCELED", "CANCELING"
resp.task_id #=> String

Options Hash (options):

  • :task_id (required, String)

    Specifies the data repository task to cancel.

Returns:

See Also:

#create_backup(options = {}) ⇒ Types::CreateBackupResponse

Creates a backup of an existing Amazon FSx file system. Creating regular backups for your file system is a best practice, enabling you to restore a file system from a backup if an issue arises with the original file system.

For Amazon FSx for Lustre file systems, you can create a backup only for file systems with the following configuration:

  • a Persistent deployment type

  • is not linked to a data respository.

For more information about backing up Amazon FSx for Lustre file systems, see Working with FSx for Lustre backups.

For more information about backing up Amazon FSx for Lustre file systems, see Working with FSx for Windows backups.

If a backup with the specified client request token exists, and the parameters match, this operation returns the description of the existing backup. If a backup specified client request token exists, and the parameters don't match, this operation returns IncompatibleParameterError. If a backup with the specified client request token doesn't exist, CreateBackup does the following:

  • Creates a new Amazon FSx backup with an assigned ID, and an initial lifecycle state of CREATING.

  • Returns the description of the backup.

By using the idempotent operation, you can retry a CreateBackup operation without the risk of creating an extra backup. This approach can be useful when an initial call fails in a way that makes it unclear whether a backup was created. If you use the same client request token and the initial call created a backup, the operation returns a successful result because all the parameters are the same.

The CreateBackup operation returns while the backup's lifecycle state is still CREATING. You can check the backup creation status by calling the DescribeBackups operation, which returns the backup state along with other information.

Examples:

Example: To create a new backup


# This operation creates a new backup.

resp = client.create_backup({
  file_system_id: "fs-0498eed5fe91001ec", 
  tags: [
    {
      key: "Name", 
      value: "MyBackup", 
    }, 
  ], 
})

# resp.to_h outputs the following:
{
  backup: {
    backup_id: "backup-03e3c82e0183b7b6b", 
    creation_time: Time.parse("1481841524.0"), 
    file_system: {
      file_system_id: "fs-0498eed5fe91001ec", 
      owner_id: "012345678912", 
      storage_capacity: 300, 
      windows_configuration: {
        active_directory_id: "d-1234abcd12", 
        automatic_backup_retention_days: 30, 
        daily_automatic_backup_start_time: "05:00", 
        weekly_maintenance_start_time: "1:05:00", 
      }, 
    }, 
    lifecycle: "CREATING", 
    progress_percent: 0, 
    resource_arn: "arn:aws:fsx:us-east-1:012345678912:backup/backup-03e3c82e0183b7b6b", 
    tags: [
      {
        key: "Name", 
        value: "MyBackup", 
      }, 
    ], 
    type: "USER_INITIATED", 
  }, 
}

Request syntax with placeholder values


resp = client.create_backup({
  file_system_id: "FileSystemId", # required
  client_request_token: "ClientRequestToken",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.backup.backup_id #=> String
resp.backup.lifecycle #=> String, one of "AVAILABLE", "CREATING", "TRANSFERRING", "DELETED", "FAILED"
resp.backup.failure_details.message #=> String
resp.backup.type #=> String, one of "AUTOMATIC", "USER_INITIATED", "AWS_BACKUP"
resp.backup.progress_percent #=> Integer
resp.backup.creation_time #=> Time
resp.backup.kms_key_id #=> String
resp.backup.resource_arn #=> String
resp.backup.tags #=> Array
resp.backup.tags[0].key #=> String
resp.backup.tags[0].value #=> String
resp.backup.file_system.owner_id #=> String
resp.backup.file_system.creation_time #=> Time
resp.backup.file_system.file_system_id #=> String
resp.backup.file_system.file_system_type #=> String, one of "WINDOWS", "LUSTRE"
resp.backup.file_system.lifecycle #=> String, one of "AVAILABLE", "CREATING", "FAILED", "DELETING", "MISCONFIGURED", "UPDATING"
resp.backup.file_system.failure_details.message #=> String
resp.backup.file_system.storage_capacity #=> Integer
resp.backup.file_system.storage_type #=> String, one of "SSD", "HDD"
resp.backup.file_system.vpc_id #=> String
resp.backup.file_system.subnet_ids #=> Array
resp.backup.file_system.subnet_ids[0] #=> String
resp.backup.file_system.network_interface_ids #=> Array
resp.backup.file_system.network_interface_ids[0] #=> String
resp.backup.file_system.dns_name #=> String
resp.backup.file_system.kms_key_id #=> String
resp.backup.file_system.resource_arn #=> String
resp.backup.file_system.tags #=> Array
resp.backup.file_system.tags[0].key #=> String
resp.backup.file_system.tags[0].value #=> String
resp.backup.file_system.windows_configuration.active_directory_id #=> String
resp.backup.file_system.windows_configuration.self_managed_active_directory_configuration.domain_name #=> String
resp.backup.file_system.windows_configuration.self_managed_active_directory_configuration.organizational_unit_distinguished_name #=> String
resp.backup.file_system.windows_configuration.self_managed_active_directory_configuration.file_system_administrators_group #=> String
resp.backup.file_system.windows_configuration.self_managed_active_directory_configuration.user_name #=> String
resp.backup.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips #=> Array
resp.backup.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips[0] #=> String
resp.backup.file_system.windows_configuration.deployment_type #=> String, one of "MULTI_AZ_1", "SINGLE_AZ_1", "SINGLE_AZ_2"
resp.backup.file_system.windows_configuration.remote_administration_endpoint #=> String
resp.backup.file_system.windows_configuration.preferred_subnet_id #=> String
resp.backup.file_system.windows_configuration.preferred_file_server_ip #=> String
resp.backup.file_system.windows_configuration.throughput_capacity #=> Integer
resp.backup.file_system.windows_configuration.maintenance_operations_in_progress #=> Array
resp.backup.file_system.windows_configuration.maintenance_operations_in_progress[0] #=> String, one of "PATCHING", "BACKING_UP"
resp.backup.file_system.windows_configuration.weekly_maintenance_start_time #=> String
resp.backup.file_system.windows_configuration.daily_automatic_backup_start_time #=> String
resp.backup.file_system.windows_configuration.automatic_backup_retention_days #=> Integer
resp.backup.file_system.windows_configuration.copy_tags_to_backups #=> true/false
resp.backup.file_system.windows_configuration.aliases #=> Array
resp.backup.file_system.windows_configuration.aliases[0].name #=> String
resp.backup.file_system.windows_configuration.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"
resp.backup.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
resp.backup.file_system.lustre_configuration.data_repository_configuration.lifecycle #=> String, one of "CREATING", "AVAILABLE", "MISCONFIGURED", "UPDATING", "DELETING"
resp.backup.file_system.lustre_configuration.data_repository_configuration.import_path #=> String
resp.backup.file_system.lustre_configuration.data_repository_configuration.export_path #=> String
resp.backup.file_system.lustre_configuration.data_repository_configuration.imported_file_chunk_size #=> Integer
resp.backup.file_system.lustre_configuration.data_repository_configuration.auto_import_policy #=> String, one of "NONE", "NEW", "NEW_CHANGED"
resp.backup.file_system.lustre_configuration.data_repository_configuration.failure_details.message #=> String
resp.backup.file_system.lustre_configuration.deployment_type #=> String, one of "SCRATCH_1", "SCRATCH_2", "PERSISTENT_1"
resp.backup.file_system.lustre_configuration.per_unit_storage_throughput #=> Integer
resp.backup.file_system.lustre_configuration.mount_name #=> String
resp.backup.file_system.lustre_configuration.daily_automatic_backup_start_time #=> String
resp.backup.file_system.lustre_configuration.automatic_backup_retention_days #=> Integer
resp.backup.file_system.lustre_configuration.copy_tags_to_backups #=> true/false
resp.backup.file_system.lustre_configuration.drive_cache_type #=> String, one of "NONE", "READ"
resp.backup.file_system.administrative_actions #=> Array
resp.backup.file_system.administrative_actions[0].administrative_action_type #=> String, one of "FILE_SYSTEM_UPDATE", "STORAGE_OPTIMIZATION", "FILE_SYSTEM_ALIAS_ASSOCIATION", "FILE_SYSTEM_ALIAS_DISASSOCIATION"
resp.backup.file_system.administrative_actions[0].progress_percent #=> Integer
resp.backup.file_system.administrative_actions[0].request_time #=> Time
resp.backup.file_system.administrative_actions[0].status #=> String, one of "FAILED", "IN_PROGRESS", "PENDING", "COMPLETED", "UPDATED_OPTIMIZING"
resp.backup.file_system.administrative_actions[0].target_file_system_values #=> Types::FileSystem
resp.backup.file_system.administrative_actions[0].failure_details.message #=> String
resp.backup.directory_information.domain_name #=> String
resp.backup.directory_information.active_directory_id #=> String

Options Hash (options):

  • :file_system_id (required, String)

    The ID of the file system to back up.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

  • :tags (Array<Types::Tag>) — default: Optional

    The tags to apply to the backup at backup creation. The key value of the Name tag appears in the console as the backup name. If you have set CopyTagsToBackups to true, and you specify one or more tags using the CreateBackup action, no existing file system tags are copied from the file system to the backup.

Returns:

See Also:

#create_data_repository_task(options = {}) ⇒ Types::CreateDataRepositoryTaskResponse

Creates an Amazon FSx for Lustre data repository task. You use data repository tasks to perform bulk operations between your Amazon FSx file system and its linked data repository. An example of a data repository task is exporting any data and metadata changes, including POSIX metadata, to files, directories, and symbolic links (symlinks) from your FSx file system to its linked data repository. A CreateDataRepositoryTask operation will fail if a data repository is not linked to the FSx file system. To learn more about data repository tasks, see Using Data Repository Tasks. To learn more about linking a data repository to your file system, see Setting the Export Prefix.

Examples:

Request syntax with placeholder values


resp = client.create_data_repository_task({
  type: "EXPORT_TO_REPOSITORY", # required, accepts EXPORT_TO_REPOSITORY
  paths: ["DataRepositoryTaskPath"],
  file_system_id: "FileSystemId", # required
  report: { # required
    enabled: false, # required
    path: "ArchivePath",
    format: "REPORT_CSV_20191124", # accepts REPORT_CSV_20191124
    scope: "FAILED_FILES_ONLY", # accepts FAILED_FILES_ONLY
  },
  client_request_token: "ClientRequestToken",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.data_repository_task.task_id #=> String
resp.data_repository_task.lifecycle #=> String, one of "PENDING", "EXECUTING", "FAILED", "SUCCEEDED", "CANCELED", "CANCELING"
resp.data_repository_task.type #=> String, one of "EXPORT_TO_REPOSITORY"
resp.data_repository_task.creation_time #=> Time
resp.data_repository_task.start_time #=> Time
resp.data_repository_task.end_time #=> Time
resp.data_repository_task.resource_arn #=> String
resp.data_repository_task.tags #=> Array
resp.data_repository_task.tags[0].key #=> String
resp.data_repository_task.tags[0].value #=> String
resp.data_repository_task.file_system_id #=> String
resp.data_repository_task.paths #=> Array
resp.data_repository_task.paths[0] #=> String
resp.data_repository_task.failure_details.message #=> String
resp.data_repository_task.status.total_count #=> Integer
resp.data_repository_task.status.succeeded_count #=> Integer
resp.data_repository_task.status.failed_count #=> Integer
resp.data_repository_task.status.last_updated_time #=> Time
resp.data_repository_task.report.enabled #=> true/false
resp.data_repository_task.report.path #=> String
resp.data_repository_task.report.format #=> String, one of "REPORT_CSV_20191124"
resp.data_repository_task.report.scope #=> String, one of "FAILED_FILES_ONLY"

Options Hash (options):

  • :type (required, String)

    Specifies the type of data repository task to create.

  • :paths (Array<String>) — default: Optional

    The path or paths on the Amazon FSx file system to use when the data repository task is processed. The default path is the file system root directory. The paths you provide need to be relative to the mount point of the file system. If the mount point is /mnt/fsx and /mnt/fsx/path1 is a directory or file on the file system you want to export, then the path to provide is path1. If a path that you provide isn\'t valid, the task fails.

  • :file_system_id (required, String)

    The globally unique ID of the file system, assigned by Amazon FSx.

  • :report (required, Types::CompletionReport)

    Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the Scope parameter. For more information, see Working with Task Completion Reports.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided.

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

  • :tags (Array<Types::Tag>)

    A list of Tag values, with a maximum of 50 elements.

Returns:

See Also:

#create_file_system(options = {}) ⇒ Types::CreateFileSystemResponse

Creates a new, empty Amazon FSx file system.

If a file system with the specified client request token exists and the parameters match, CreateFileSystem returns the description of the existing file system. If a file system specified client request token exists and the parameters don't match, this call returns IncompatibleParameterError. If a file system with the specified client request token doesn't exist, CreateFileSystem does the following:

  • Creates a new, empty Amazon FSx file system with an assigned ID, and an initial lifecycle state of CREATING.

  • Returns the description of the file system.

This operation requires a client request token in the request that Amazon FSx uses to ensure idempotent creation. This means that calling the operation multiple times with the same client request token has no effect. By using the idempotent operation, you can retry a CreateFileSystem operation without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.

The CreateFileSystem call returns while the file system's lifecycle state is still CREATING. You can check the file-system creation status by calling the DescribeFileSystems operation, which returns the file system state along with other information.

Examples:

Example: To create a new file system


# This operation creates a new Amazon FSx for Windows File Server file system.

resp = client.create_file_system({
  client_request_token: "a8ca07e4-61ec-4399-99f4-19853801bcd5", 
  file_system_type: "WINDOWS", 
  kms_key_id: "arn:aws:kms:us-east-1:012345678912:key/1111abcd-2222-3333-4444-55556666eeff", 
  security_group_ids: [
    "sg-edcd9784", 
  ], 
  storage_capacity: 3200, 
  storage_type: "HDD", 
  subnet_ids: [
    "subnet-1234abcd", 
  ], 
  tags: [
    {
      key: "Name", 
      value: "MyFileSystem", 
    }, 
  ], 
  windows_configuration: {
    active_directory_id: "d-1234abcd12", 
    aliases: [
      "accounting.corp.example.com", 
    ], 
    automatic_backup_retention_days: 30, 
    daily_automatic_backup_start_time: "05:00", 
    throughput_capacity: 32, 
    weekly_maintenance_start_time: "1:05:00", 
  }, 
})

# resp.to_h outputs the following:
{
  file_system: {
    creation_time: Time.parse("1481841524.0"), 
    dns_name: "fs-0123456789abcdef0.fsx.com", 
    file_system_id: "fs-0123456789abcdef0", 
    kms_key_id: "arn:aws:kms:us-east-1:012345678912:key/1111abcd-2222-3333-4444-55556666eeff", 
    lifecycle: "CREATING", 
    owner_id: "012345678912", 
    resource_arn: "arn:aws:fsx:us-east-1:012345678912:file-system/fs-0123456789abcdef0", 
    storage_capacity: 3200, 
    storage_type: "HDD", 
    subnet_ids: [
      "subnet-1234abcd", 
    ], 
    tags: [
      {
        key: "Name", 
        value: "MyFileSystem", 
      }, 
    ], 
    vpc_id: "vpc-ab1234cd", 
    windows_configuration: {
      active_directory_id: "d-1234abcd12", 
      aliases: [
        {
          lifecycle: "CREATING", 
          name: "accounting.corp.example.com", 
        }, 
      ], 
      automatic_backup_retention_days: 30, 
      daily_automatic_backup_start_time: "05:00", 
      throughput_capacity: 32, 
      weekly_maintenance_start_time: "1:05:00", 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.create_file_system({
  client_request_token: "ClientRequestToken",
  file_system_type: "WINDOWS", # required, accepts WINDOWS, LUSTRE
  storage_capacity: 1, # required
  storage_type: "SSD", # accepts SSD, HDD
  subnet_ids: ["SubnetId"], # required
  security_group_ids: ["SecurityGroupId"],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  kms_key_id: "KmsKeyId",
  windows_configuration: {
    active_directory_id: "DirectoryId",
    self_managed_active_directory_configuration: {
      domain_name: "ActiveDirectoryFullyQualifiedName", # required
      organizational_unit_distinguished_name: "OrganizationalUnitDistinguishedName",
      file_system_administrators_group: "FileSystemAdministratorsGroupName",
      user_name: "DirectoryUserName", # required
      password: "DirectoryPassword", # required
      dns_ips: ["IpAddress"], # required
    },
    deployment_type: "MULTI_AZ_1", # accepts MULTI_AZ_1, SINGLE_AZ_1, SINGLE_AZ_2
    preferred_subnet_id: "SubnetId",
    throughput_capacity: 1, # required
    weekly_maintenance_start_time: "WeeklyTime",
    daily_automatic_backup_start_time: "DailyTime",
    automatic_backup_retention_days: 1,
    copy_tags_to_backups: false,
    aliases: ["AlternateDNSName"],
  },
  lustre_configuration: {
    weekly_maintenance_start_time: "WeeklyTime",
    import_path: "ArchivePath",
    export_path: "ArchivePath",
    imported_file_chunk_size: 1,
    deployment_type: "SCRATCH_1", # accepts SCRATCH_1, SCRATCH_2, PERSISTENT_1
    auto_import_policy: "NONE", # accepts NONE, NEW, NEW_CHANGED
    per_unit_storage_throughput: 1,
    daily_automatic_backup_start_time: "DailyTime",
    automatic_backup_retention_days: 1,
    copy_tags_to_backups: false,
    drive_cache_type: "NONE", # accepts NONE, READ
  },
})

Response structure


resp.file_system.owner_id #=> String
resp.file_system.creation_time #=> Time
resp.file_system.file_system_id #=> String
resp.file_system.file_system_type #=> String, one of "WINDOWS", "LUSTRE"
resp.file_system.lifecycle #=> String, one of "AVAILABLE", "CREATING", "FAILED", "DELETING", "MISCONFIGURED", "UPDATING"
resp.file_system.failure_details.message #=> String
resp.file_system.storage_capacity #=> Integer
resp.file_system.storage_type #=> String, one of "SSD", "HDD"
resp.file_system.vpc_id #=> String
resp.file_system.subnet_ids #=> Array
resp.file_system.subnet_ids[0] #=> String
resp.file_system.network_interface_ids #=> Array
resp.file_system.network_interface_ids[0] #=> String
resp.file_system.dns_name #=> String
resp.file_system.kms_key_id #=> String
resp.file_system.resource_arn #=> String
resp.file_system.tags #=> Array
resp.file_system.tags[0].key #=> String
resp.file_system.tags[0].value #=> String
resp.file_system.windows_configuration.active_directory_id #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.domain_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.organizational_unit_distinguished_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.file_system_administrators_group #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.user_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips #=> Array
resp.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips[0] #=> String
resp.file_system.windows_configuration.deployment_type #=> String, one of "MULTI_AZ_1", "SINGLE_AZ_1", "SINGLE_AZ_2"
resp.file_system.windows_configuration.remote_administration_endpoint #=> String
resp.file_system.windows_configuration.preferred_subnet_id #=> String
resp.file_system.windows_configuration.preferred_file_server_ip #=> String
resp.file_system.windows_configuration.throughput_capacity #=> Integer
resp.file_system.windows_configuration.maintenance_operations_in_progress #=> Array
resp.file_system.windows_configuration.maintenance_operations_in_progress[0] #=> String, one of "PATCHING", "BACKING_UP"
resp.file_system.windows_configuration.weekly_maintenance_start_time #=> String
resp.file_system.windows_configuration.daily_automatic_backup_start_time #=> String
resp.file_system.windows_configuration.automatic_backup_retention_days #=> Integer
resp.file_system.windows_configuration.copy_tags_to_backups #=> true/false
resp.file_system.windows_configuration.aliases #=> Array
resp.file_system.windows_configuration.aliases[0].name #=> String
resp.file_system.windows_configuration.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"
resp.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
resp.file_system.lustre_configuration.data_repository_configuration.lifecycle #=> String, one of "CREATING", "AVAILABLE", "MISCONFIGURED", "UPDATING", "DELETING"
resp.file_system.lustre_configuration.data_repository_configuration.import_path #=> String
resp.file_system.lustre_configuration.data_repository_configuration.export_path #=> String
resp.file_system.lustre_configuration.data_repository_configuration.imported_file_chunk_size #=> Integer
resp.file_system.lustre_configuration.data_repository_configuration.auto_import_policy #=> String, one of "NONE", "NEW", "NEW_CHANGED"
resp.file_system.lustre_configuration.data_repository_configuration.failure_details.message #=> String
resp.file_system.lustre_configuration.deployment_type #=> String, one of "SCRATCH_1", "SCRATCH_2", "PERSISTENT_1"
resp.file_system.lustre_configuration.per_unit_storage_throughput #=> Integer
resp.file_system.lustre_configuration.mount_name #=> String
resp.file_system.lustre_configuration.daily_automatic_backup_start_time #=> String
resp.file_system.lustre_configuration.automatic_backup_retention_days #=> Integer
resp.file_system.lustre_configuration.copy_tags_to_backups #=> true/false
resp.file_system.lustre_configuration.drive_cache_type #=> String, one of "NONE", "READ"
resp.file_system.administrative_actions #=> Array
resp.file_system.administrative_actions[0].administrative_action_type #=> String, one of "FILE_SYSTEM_UPDATE", "STORAGE_OPTIMIZATION", "FILE_SYSTEM_ALIAS_ASSOCIATION", "FILE_SYSTEM_ALIAS_DISASSOCIATION"
resp.file_system.administrative_actions[0].progress_percent #=> Integer
resp.file_system.administrative_actions[0].request_time #=> Time
resp.file_system.administrative_actions[0].status #=> String, one of "FAILED", "IN_PROGRESS", "PENDING", "COMPLETED", "UPDATED_OPTIMIZING"
resp.file_system.administrative_actions[0].target_file_system_values #=> Types::FileSystem
resp.file_system.administrative_actions[0].failure_details.message #=> String

Options Hash (options):

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

  • :file_system_type (required, String)

    The type of Amazon FSx file system to create, either WINDOWS or LUSTRE.

  • :storage_capacity (required, Integer)

    Sets the storage capacity of the file system that you\'re creating.

    For Lustre file systems:

    • For SCRATCH_2 and PERSISTENT_1 SSD deployment types, valid values are 1200 GiB, 2400 GiB, and increments of 2400 GiB.

    • For PERSISTENT HDD file systems, valid values are increments of 6000 GiB for 12 MB/s/TiB file systems and increments of 1800 GiB for 40 MB/s/TiB file systems.

    • For SCRATCH_1 deployment type, valid values are 1200 GiB, 2400 GiB, and increments of 3600 GiB.

    For Windows file systems:

    • If StorageType=SSD, valid values are 32 GiB - 65,536 GiB (64 TiB).

    • If StorageType=HDD, valid values are 2000 GiB - 65,536 GiB (64 TiB).

  • :storage_type (String)

    Sets the storage type for the file system you\'re creating. Valid values are SSD and HDD.

    • Set to SSD to use solid state drive storage. SSD is supported on all Windows and Lustre deployment types.

    • Set to HDD to use hard disk drive storage. HDD is supported on SINGLE_AZ_2 and MULTI_AZ_1 Windows file system deployment types, and on PERSISTENT Lustre file system deployment types.

    Default value is SSD. For more information, see Storage Type Options in the Amazon FSx for Windows User Guide and Multiple Storage Options in the Amazon FSx for Lustre User Guide.

  • :subnet_ids (required, Array<String>)

    Specifies the IDs of the subnets that the file system will be accessible from. For Windows MULTI_AZ_1 file system deployment types, provide exactly two subnet IDs, one for the preferred file server and one for the standby file server. You specify one of these subnets as the preferred subnet using the WindowsConfiguration > PreferredSubnetID property.

    For Windows SINGLE_AZ_1 and SINGLE_AZ_2 file system deployment types and Lustre file systems, provide exactly one subnet ID. The file server is launched in that subnet\'s Availability Zone.

  • :security_group_ids (Array<String>)

    A list of IDs specifying the security groups to apply to all network interfaces created for file system access. This list isn\'t returned in later requests to describe the file system.

  • :tags (Array<Types::Tag>)

    The tags to apply to the file system being created. The key value of the Name tag appears in the console as the file system name.

  • :kms_key_id (String)

    The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for Amazon FSx for Windows File Server file systems and Amazon FSx for Lustre PERSISTENT_1 file systems at rest. In either case, if not specified, the Amazon FSx managed key is used. The Amazon FSx for Lustre SCRATCH_1 and SCRATCH_2 file systems are always encrypted at rest using Amazon FSx managed keys. For more information, see Encrypt in the AWS Key Management Service API Reference.

  • :windows_configuration (Types::CreateFileSystemWindowsConfiguration)

    The Microsoft Windows configuration for the file system being created.

  • :lustre_configuration (Types::CreateFileSystemLustreConfiguration)

    The Lustre configuration for the file system being created.

Returns:

See Also:

#create_file_system_from_backup(options = {}) ⇒ Types::CreateFileSystemFromBackupResponse

Creates a new Amazon FSx file system from an existing Amazon FSx backup.

If a file system with the specified client request token exists and the parameters match, this operation returns the description of the file system. If a client request token specified by the file system exists and the parameters don't match, this call returns IncompatibleParameterError. If a file system with the specified client request token doesn't exist, this operation does the following:

  • Creates a new Amazon FSx file system from backup with an assigned ID, and an initial lifecycle state of CREATING.

  • Returns the description of the file system.

Parameters like Active Directory, default share name, automatic backup, and backup settings default to the parameters of the file system that was backed up, unless overridden. You can explicitly supply other settings.

By using the idempotent operation, you can retry a CreateFileSystemFromBackup call without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives success as long as the parameters are the same.

The CreateFileSystemFromBackup call returns while the file system's lifecycle state is still CREATING. You can check the file-system creation status by calling the DescribeFileSystems operation, which returns the file system state along with other information.

Examples:

Example: To create a new file system from backup


# This operation creates a new file system from backup.

resp = client.create_file_system_from_backup({
  backup_id: "backup-03e3c82e0183b7b6b", 
  client_request_token: "f4c94ed7-238d-4c46-93db-48cd62ec33b7", 
  security_group_ids: [
    "sg-edcd9784", 
  ], 
  subnet_ids: [
    "subnet-1234abcd", 
  ], 
  tags: [
    {
      key: "Name", 
      value: "MyFileSystem", 
    }, 
  ], 
  windows_configuration: {
    throughput_capacity: 8, 
  }, 
})

# resp.to_h outputs the following:
{
  file_system: {
    creation_time: Time.parse("1481841524.0"), 
    dns_name: "fs-0498eed5fe91001ec.fsx.com", 
    file_system_id: "fs-0498eed5fe91001ec", 
    kms_key_id: "arn:aws:kms:us-east-1:012345678912:key/0ff3ea8d-130e-4133-877f-93908b6fdbd6", 
    lifecycle: "CREATING", 
    owner_id: "012345678912", 
    resource_arn: "arn:aws:fsx:us-east-1:012345678912:file-system/fs-0498eed5fe91001ec", 
    storage_capacity: 300, 
    subnet_ids: [
      "subnet-1234abcd", 
    ], 
    tags: [
      {
        key: "Name", 
        value: "MyFileSystem", 
      }, 
    ], 
    vpc_id: "vpc-ab1234cd", 
    windows_configuration: {
      active_directory_id: "d-1234abcd12", 
      automatic_backup_retention_days: 30, 
      daily_automatic_backup_start_time: "05:00", 
      throughput_capacity: 8, 
      weekly_maintenance_start_time: "1:05:00", 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.create_file_system_from_backup({
  backup_id: "BackupId", # required
  client_request_token: "ClientRequestToken",
  subnet_ids: ["SubnetId"], # required
  security_group_ids: ["SecurityGroupId"],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  windows_configuration: {
    active_directory_id: "DirectoryId",
    self_managed_active_directory_configuration: {
      domain_name: "ActiveDirectoryFullyQualifiedName", # required
      organizational_unit_distinguished_name: "OrganizationalUnitDistinguishedName",
      file_system_administrators_group: "FileSystemAdministratorsGroupName",
      user_name: "DirectoryUserName", # required
      password: "DirectoryPassword", # required
      dns_ips: ["IpAddress"], # required
    },
    deployment_type: "MULTI_AZ_1", # accepts MULTI_AZ_1, SINGLE_AZ_1, SINGLE_AZ_2
    preferred_subnet_id: "SubnetId",
    throughput_capacity: 1, # required
    weekly_maintenance_start_time: "WeeklyTime",
    daily_automatic_backup_start_time: "DailyTime",
    automatic_backup_retention_days: 1,
    copy_tags_to_backups: false,
    aliases: ["AlternateDNSName"],
  },
  lustre_configuration: {
    weekly_maintenance_start_time: "WeeklyTime",
    import_path: "ArchivePath",
    export_path: "ArchivePath",
    imported_file_chunk_size: 1,
    deployment_type: "SCRATCH_1", # accepts SCRATCH_1, SCRATCH_2, PERSISTENT_1
    auto_import_policy: "NONE", # accepts NONE, NEW, NEW_CHANGED
    per_unit_storage_throughput: 1,
    daily_automatic_backup_start_time: "DailyTime",
    automatic_backup_retention_days: 1,
    copy_tags_to_backups: false,
    drive_cache_type: "NONE", # accepts NONE, READ
  },
  storage_type: "SSD", # accepts SSD, HDD
})

Response structure


resp.file_system.owner_id #=> String
resp.file_system.creation_time #=> Time
resp.file_system.file_system_id #=> String
resp.file_system.file_system_type #=> String, one of "WINDOWS", "LUSTRE"
resp.file_system.lifecycle #=> String, one of "AVAILABLE", "CREATING", "FAILED", "DELETING", "MISCONFIGURED", "UPDATING"
resp.file_system.failure_details.message #=> String
resp.file_system.storage_capacity #=> Integer
resp.file_system.storage_type #=> String, one of "SSD", "HDD"
resp.file_system.vpc_id #=> String
resp.file_system.subnet_ids #=> Array
resp.file_system.subnet_ids[0] #=> String
resp.file_system.network_interface_ids #=> Array
resp.file_system.network_interface_ids[0] #=> String
resp.file_system.dns_name #=> String
resp.file_system.kms_key_id #=> String
resp.file_system.resource_arn #=> String
resp.file_system.tags #=> Array
resp.file_system.tags[0].key #=> String
resp.file_system.tags[0].value #=> String
resp.file_system.windows_configuration.active_directory_id #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.domain_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.organizational_unit_distinguished_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.file_system_administrators_group #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.user_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips #=> Array
resp.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips[0] #=> String
resp.file_system.windows_configuration.deployment_type #=> String, one of "MULTI_AZ_1", "SINGLE_AZ_1", "SINGLE_AZ_2"
resp.file_system.windows_configuration.remote_administration_endpoint #=> String
resp.file_system.windows_configuration.preferred_subnet_id #=> String
resp.file_system.windows_configuration.preferred_file_server_ip #=> String
resp.file_system.windows_configuration.throughput_capacity #=> Integer
resp.file_system.windows_configuration.maintenance_operations_in_progress #=> Array
resp.file_system.windows_configuration.maintenance_operations_in_progress[0] #=> String, one of "PATCHING", "BACKING_UP"
resp.file_system.windows_configuration.weekly_maintenance_start_time #=> String
resp.file_system.windows_configuration.daily_automatic_backup_start_time #=> String
resp.file_system.windows_configuration.automatic_backup_retention_days #=> Integer
resp.file_system.windows_configuration.copy_tags_to_backups #=> true/false
resp.file_system.windows_configuration.aliases #=> Array
resp.file_system.windows_configuration.aliases[0].name #=> String
resp.file_system.windows_configuration.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"
resp.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
resp.file_system.lustre_configuration.data_repository_configuration.lifecycle #=> String, one of "CREATING", "AVAILABLE", "MISCONFIGURED", "UPDATING", "DELETING"
resp.file_system.lustre_configuration.data_repository_configuration.import_path #=> String
resp.file_system.lustre_configuration.data_repository_configuration.export_path #=> String
resp.file_system.lustre_configuration.data_repository_configuration.imported_file_chunk_size #=> Integer
resp.file_system.lustre_configuration.data_repository_configuration.auto_import_policy #=> String, one of "NONE", "NEW", "NEW_CHANGED"
resp.file_system.lustre_configuration.data_repository_configuration.failure_details.message #=> String
resp.file_system.lustre_configuration.deployment_type #=> String, one of "SCRATCH_1", "SCRATCH_2", "PERSISTENT_1"
resp.file_system.lustre_configuration.per_unit_storage_throughput #=> Integer
resp.file_system.lustre_configuration.mount_name #=> String
resp.file_system.lustre_configuration.daily_automatic_backup_start_time #=> String
resp.file_system.lustre_configuration.automatic_backup_retention_days #=> Integer
resp.file_system.lustre_configuration.copy_tags_to_backups #=> true/false
resp.file_system.lustre_configuration.drive_cache_type #=> String, one of "NONE", "READ"
resp.file_system.administrative_actions #=> Array
resp.file_system.administrative_actions[0].administrative_action_type #=> String, one of "FILE_SYSTEM_UPDATE", "STORAGE_OPTIMIZATION", "FILE_SYSTEM_ALIAS_ASSOCIATION", "FILE_SYSTEM_ALIAS_DISASSOCIATION"
resp.file_system.administrative_actions[0].progress_percent #=> Integer
resp.file_system.administrative_actions[0].request_time #=> Time
resp.file_system.administrative_actions[0].status #=> String, one of "FAILED", "IN_PROGRESS", "PENDING", "COMPLETED", "UPDATED_OPTIMIZING"
resp.file_system.administrative_actions[0].target_file_system_values #=> Types::FileSystem
resp.file_system.administrative_actions[0].failure_details.message #=> String

Options Hash (options):

  • :backup_id (required, String)

    The ID of the backup. Specifies the backup to use if you're creating a file system from an existing backup.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

  • :subnet_ids (required, Array<String>)

    Specifies the IDs of the subnets that the file system will be accessible from. For Windows MULTI_AZ_1 file system deployment types, provide exactly two subnet IDs, one for the preferred file server and one for the standby file server. You specify one of these subnets as the preferred subnet using the WindowsConfiguration > PreferredSubnetID property.

    For Windows SINGLE_AZ_1 and SINGLE_AZ_2 deployment types and Lustre file systems, provide exactly one subnet ID. The file server is launched in that subnet\'s Availability Zone.

  • :security_group_ids (Array<String>)

    A list of IDs for the security groups that apply to the specified network interfaces created for file system access. These security groups apply to all network interfaces. This value isn\'t returned in later DescribeFileSystem requests.

  • :tags (Array<Types::Tag>)

    The tags to be applied to the file system at file system creation. The key value of the Name tag appears in the console as the file system name.

  • :windows_configuration (Types::CreateFileSystemWindowsConfiguration)

    The configuration for this Microsoft Windows file system.

  • :lustre_configuration (Types::CreateFileSystemLustreConfiguration)

    The Lustre configuration for the file system being created.

  • :storage_type (String)

    Sets the storage type for the Windows file system you\'re creating from a backup. Valid values are SSD and HDD.

    • Set to SSD to use solid state drive storage. Supported on all Windows deployment types.

    • Set to HDD to use hard disk drive storage. Supported on SINGLE_AZ_2 and MULTI_AZ_1 Windows file system deployment types.

    Default value is SSD.

    HDD and SSD storage types have different minimum storage capacity requirements. A restored file system\'s storage capacity is tied to the file system that was backed up. You can create a file system that uses HDD storage from a backup of a file system that used SSD storage only if the original SSD file system had a storage capacity of at least 2000 GiB.

Returns:

See Also:

#delete_backup(options = {}) ⇒ Types::DeleteBackupResponse

Deletes an Amazon FSx backup, deleting its contents. After deletion, the backup no longer exists, and its data is gone.

The DeleteBackup call returns instantly. The backup will not show up in later DescribeBackups calls.

The data in a deleted backup is also deleted and can't be recovered by any means.

Examples:

Example: To delete a backup


# This operation deletes an Amazon FSx file system backup.

resp = client.delete_backup({
  backup_id: "backup-03e3c82e0183b7b6b", 
})

# resp.to_h outputs the following:
{
  backup_id: "backup-03e3c82e0183b7b6b", 
  lifecycle: "DELETED", 
}

Request syntax with placeholder values


resp = client.delete_backup({
  backup_id: "BackupId", # required
  client_request_token: "ClientRequestToken",
})

Response structure


resp.backup_id #=> String
resp.lifecycle #=> String, one of "AVAILABLE", "CREATING", "TRANSFERRING", "DELETED", "FAILED"

Options Hash (options):

  • :backup_id (required, String)

    The ID of the backup you want to delete.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This is automatically filled on your behalf when using the AWS CLI or SDK.

Returns:

See Also:

#delete_file_system(options = {}) ⇒ Types::DeleteFileSystemResponse

Deletes a file system, deleting its contents. After deletion, the file system no longer exists, and its data is gone. Any existing automatic backups will also be deleted.

By default, when you delete an Amazon FSx for Windows File Server file system, a final backup is created upon deletion. This final backup is not subject to the file system's retention policy, and must be manually deleted.

The DeleteFileSystem action returns while the file system has the DELETING status. You can check the file system deletion status by calling the DescribeFileSystems action, which returns a list of file systems in your account. If you pass the file system ID for a deleted file system, the DescribeFileSystems returns a FileSystemNotFound error.

Deleting an Amazon FSx for Lustre file system will fail with a 400 BadRequest if a data repository task is in a PENDING or EXECUTING state.

The data in a deleted file system is also deleted and can't be recovered by any means.

Examples:

Example: To delete a file system


# This operation deletes an Amazon FSx file system.

resp = client.delete_file_system({
  file_system_id: "fs-0498eed5fe91001ec", 
})

# resp.to_h outputs the following:
{
  file_system_id: "fs-0498eed5fe91001ec", 
  lifecycle: "DELETING", 
}

Request syntax with placeholder values


resp = client.delete_file_system({
  file_system_id: "FileSystemId", # required
  client_request_token: "ClientRequestToken",
  windows_configuration: {
    skip_final_backup: false,
    final_backup_tags: [
      {
        key: "TagKey", # required
        value: "TagValue", # required
      },
    ],
  },
  lustre_configuration: {
    skip_final_backup: false,
    final_backup_tags: [
      {
        key: "TagKey", # required
        value: "TagValue", # required
      },
    ],
  },
})

Response structure


resp.file_system_id #=> String
resp.lifecycle #=> String, one of "AVAILABLE", "CREATING", "FAILED", "DELETING", "MISCONFIGURED", "UPDATING"
resp.windows_response.final_backup_id #=> String
resp.windows_response.final_backup_tags #=> Array
resp.windows_response.final_backup_tags[0].key #=> String
resp.windows_response.final_backup_tags[0].value #=> String
resp.lustre_response.final_backup_id #=> String
resp.lustre_response.final_backup_tags #=> Array
resp.lustre_response.final_backup_tags[0].key #=> String
resp.lustre_response.final_backup_tags[0].value #=> String

Options Hash (options):

  • :file_system_id (required, String)

    The ID of the file system you want to delete.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This is automatically filled on your behalf when using the AWS CLI or SDK.

  • :windows_configuration (Types::DeleteFileSystemWindowsConfiguration)

    The configuration object for the Microsoft Windows file system used in the DeleteFileSystem operation.

  • :lustre_configuration (Types::DeleteFileSystemLustreConfiguration)

    The configuration object for the Amazon FSx for Lustre file system being deleted in the DeleteFileSystem operation.

Returns:

See Also:

#describe_backups(options = {}) ⇒ Types::DescribeBackupsResponse

Returns the description of specific Amazon FSx backups, if a BackupIds value is provided for that backup. Otherwise, it returns all backups owned by your AWS account in the AWS Region of the endpoint that you're calling.

When retrieving all backups, you can optionally specify the MaxResults parameter to limit the number of backups in a response. If more backups remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

This action is used in an iterative process to retrieve a list of your backups. DescribeBackups is called first without a NextTokenvalue. Then the action continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken.

When using this action, keep the following in mind:

  • The implementation might return fewer than MaxResults file system descriptions while still including a NextToken value.

  • The order of backups returned in the response of one DescribeBackups call and the order of backups returned across the responses of a multi-call iteration is unspecified.

Examples:

Example: To describe Amazon FSx backups


# This operation describes all of the Amazon FSx backups in an account.

resp = client.describe_backups({
})

# resp.to_h outputs the following:
{
  backups: [
    {
      backup_id: "backup-03e3c82e0183b7b6b", 
      creation_time: Time.parse("1481841524.0"), 
      file_system: {
        file_system_id: "fs-0498eed5fe91001ec", 
        owner_id: "012345678912", 
        storage_capacity: 300, 
        windows_configuration: {
          active_directory_id: "d-1234abcd12", 
          automatic_backup_retention_days: 30, 
          daily_automatic_backup_start_time: "05:00", 
          weekly_maintenance_start_time: "1:05:00", 
        }, 
      }, 
      lifecycle: "AVAILABLE", 
      resource_arn: "arn:aws:fsx:us-east-1:012345678912:backup/backup-03e3c82e0183b7b6b", 
      tags: [
        {
          key: "Name", 
          value: "MyBackup", 
        }, 
      ], 
      type: "USER_INITIATED", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_backups({
  backup_ids: ["BackupId"],
  filters: [
    {
      name: "file-system-id", # accepts file-system-id, backup-type, file-system-type
      values: ["FilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.backups #=> Array
resp.backups[0].backup_id #=> String
resp.backups[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "TRANSFERRING", "DELETED", "FAILED"
resp.backups[0].failure_details.message #=> String
resp.backups[0].type #=> String, one of "AUTOMATIC", "USER_INITIATED", "AWS_BACKUP"
resp.backups[0].progress_percent #=> Integer
resp.backups[0].creation_time #=> Time
resp.backups[0].kms_key_id #=> String
resp.backups[0].resource_arn #=> String
resp.backups[0].tags #=> Array
resp.backups[0].tags[0].key #=> String
resp.backups[0].tags[0].value #=> String
resp.backups[0].file_system.owner_id #=> String
resp.backups[0].file_system.creation_time #=> Time
resp.backups[0].file_system.file_system_id #=> String
resp.backups[0].file_system.file_system_type #=> String, one of "WINDOWS", "LUSTRE"
resp.backups[0].file_system.lifecycle #=> String, one of "AVAILABLE", "CREATING", "FAILED", "DELETING", "MISCONFIGURED", "UPDATING"
resp.backups[0].file_system.failure_details.message #=> String
resp.backups[0].file_system.storage_capacity #=> Integer
resp.backups[0].file_system.storage_type #=> String, one of "SSD", "HDD"
resp.backups[0].file_system.vpc_id #=> String
resp.backups[0].file_system.subnet_ids #=> Array
resp.backups[0].file_system.subnet_ids[0] #=> String
resp.backups[0].file_system.network_interface_ids #=> Array
resp.backups[0].file_system.network_interface_ids[0] #=> String
resp.backups[0].file_system.dns_name #=> String
resp.backups[0].file_system.kms_key_id #=> String
resp.backups[0].file_system.resource_arn #=> String
resp.backups[0].file_system.tags #=> Array
resp.backups[0].file_system.tags[0].key #=> String
resp.backups[0].file_system.tags[0].value #=> String
resp.backups[0].file_system.windows_configuration.active_directory_id #=> String
resp.backups[0].file_system.windows_configuration.self_managed_active_directory_configuration.domain_name #=> String
resp.backups[0].file_system.windows_configuration.self_managed_active_directory_configuration.organizational_unit_distinguished_name #=> String
resp.backups[0].file_system.windows_configuration.self_managed_active_directory_configuration.file_system_administrators_group #=> String
resp.backups[0].file_system.windows_configuration.self_managed_active_directory_configuration.user_name #=> String
resp.backups[0].file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips #=> Array
resp.backups[0].file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips[0] #=> String
resp.backups[0].file_system.windows_configuration.deployment_type #=> String, one of "MULTI_AZ_1", "SINGLE_AZ_1", "SINGLE_AZ_2"
resp.backups[0].file_system.windows_configuration.remote_administration_endpoint #=> String
resp.backups[0].file_system.windows_configuration.preferred_subnet_id #=> String
resp.backups[0].file_system.windows_configuration.preferred_file_server_ip #=> String
resp.backups[0].file_system.windows_configuration.throughput_capacity #=> Integer
resp.backups[0].file_system.windows_configuration.maintenance_operations_in_progress #=> Array
resp.backups[0].file_system.windows_configuration.maintenance_operations_in_progress[0] #=> String, one of "PATCHING", "BACKING_UP"
resp.backups[0].file_system.windows_configuration.weekly_maintenance_start_time #=> String
resp.backups[0].file_system.windows_configuration.daily_automatic_backup_start_time #=> String
resp.backups[0].file_system.windows_configuration.automatic_backup_retention_days #=> Integer
resp.backups[0].file_system.windows_configuration.copy_tags_to_backups #=> true/false
resp.backups[0].file_system.windows_configuration.aliases #=> Array
resp.backups[0].file_system.windows_configuration.aliases[0].name #=> String
resp.backups[0].file_system.windows_configuration.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"
resp.backups[0].file_system.lustre_configuration.weekly_maintenance_start_time #=> String
resp.backups[0].file_system.lustre_configuration.data_repository_configuration.lifecycle #=> String, one of "CREATING", "AVAILABLE", "MISCONFIGURED", "UPDATING", "DELETING"
resp.backups[0].file_system.lustre_configuration.data_repository_configuration.import_path #=> String
resp.backups[0].file_system.lustre_configuration.data_repository_configuration.export_path #=> String
resp.backups[0].file_system.lustre_configuration.data_repository_configuration.imported_file_chunk_size #=> Integer
resp.backups[0].file_system.lustre_configuration.data_repository_configuration.auto_import_policy #=> String, one of "NONE", "NEW", "NEW_CHANGED"
resp.backups[0].file_system.lustre_configuration.data_repository_configuration.failure_details.message #=> String
resp.backups[0].file_system.lustre_configuration.deployment_type #=> String, one of "SCRATCH_1", "SCRATCH_2", "PERSISTENT_1"
resp.backups[0].file_system.lustre_configuration.per_unit_storage_throughput #=> Integer
resp.backups[0].file_system.lustre_configuration.mount_name #=> String
resp.backups[0].file_system.lustre_configuration.daily_automatic_backup_start_time #=> String
resp.backups[0].file_system.lustre_configuration.automatic_backup_retention_days #=> Integer
resp.backups[0].file_system.lustre_configuration.copy_tags_to_backups #=> true/false
resp.backups[0].file_system.lustre_configuration.drive_cache_type #=> String, one of "NONE", "READ"
resp.backups[0].file_system.administrative_actions #=> Array
resp.backups[0].file_system.administrative_actions[0].administrative_action_type #=> String, one of "FILE_SYSTEM_UPDATE", "STORAGE_OPTIMIZATION", "FILE_SYSTEM_ALIAS_ASSOCIATION", "FILE_SYSTEM_ALIAS_DISASSOCIATION"
resp.backups[0].file_system.administrative_actions[0].progress_percent #=> Integer
resp.backups[0].file_system.administrative_actions[0].request_time #=> Time
resp.backups[0].file_system.administrative_actions[0].status #=> String, one of "FAILED", "IN_PROGRESS", "PENDING", "COMPLETED", "UPDATED_OPTIMIZING"
resp.backups[0].file_system.administrative_actions[0].target_file_system_values #=> Types::FileSystem
resp.backups[0].file_system.administrative_actions[0].failure_details.message #=> String
resp.backups[0].directory_information.domain_name #=> String
resp.backups[0].directory_information.active_directory_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :backup_ids (Array<String>)

    IDs of the backups you want to retrieve (String). This overrides any filters. If any IDs are not found, BackupNotFound will be thrown.

  • :filters (Array<Types::Filter>)

    Filters structure. Supported names are file-system-id and backup-type.

  • :max_results (Integer)

    Maximum number of backups to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service\'s internal maximum number of items per page.

  • :next_token (String)

    Opaque pagination token returned from a previous DescribeBackups operation (String). If a token present, the action continues the list from where the returning call left off.

Returns:

See Also:

#describe_data_repository_tasks(options = {}) ⇒ Types::DescribeDataRepositoryTasksResponse

Returns the description of specific Amazon FSx for Lustre data repository tasks, if one or more TaskIds values are provided in the request, or if filters are used in the request. You can use filters to narrow the response to include just tasks for specific file systems, or tasks in a specific lifecycle state. Otherwise, it returns all data repository tasks owned by your AWS account in the AWS Region of the endpoint that you're calling.

When retrieving all tasks, you can paginate the response by using the optional MaxResults parameter to limit the number of tasks returned in a response. If more tasks remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

Examples:

Request syntax with placeholder values


resp = client.describe_data_repository_tasks({
  task_ids: ["TaskId"],
  filters: [
    {
      name: "file-system-id", # accepts file-system-id, task-lifecycle
      values: ["DataRepositoryTaskFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.data_repository_tasks #=> Array
resp.data_repository_tasks[0].task_id #=> String
resp.data_repository_tasks[0].lifecycle #=> String, one of "PENDING", "EXECUTING", "FAILED", "SUCCEEDED", "CANCELED", "CANCELING"
resp.data_repository_tasks[0].type #=> String, one of "EXPORT_TO_REPOSITORY"
resp.data_repository_tasks[0].creation_time #=> Time
resp.data_repository_tasks[0].start_time #=> Time
resp.data_repository_tasks[0].end_time #=> Time
resp.data_repository_tasks[0].resource_arn #=> String
resp.data_repository_tasks[0].tags #=> Array
resp.data_repository_tasks[0].tags[0].key #=> String
resp.data_repository_tasks[0].tags[0].value #=> String
resp.data_repository_tasks[0].file_system_id #=> String
resp.data_repository_tasks[0].paths #=> Array
resp.data_repository_tasks[0].paths[0] #=> String
resp.data_repository_tasks[0].failure_details.message #=> String
resp.data_repository_tasks[0].status.total_count #=> Integer
resp.data_repository_tasks[0].status.succeeded_count #=> Integer
resp.data_repository_tasks[0].status.failed_count #=> Integer
resp.data_repository_tasks[0].status.last_updated_time #=> Time
resp.data_repository_tasks[0].report.enabled #=> true/false
resp.data_repository_tasks[0].report.path #=> String
resp.data_repository_tasks[0].report.format #=> String, one of "REPORT_CSV_20191124"
resp.data_repository_tasks[0].report.scope #=> String, one of "FAILED_FILES_ONLY"
resp.next_token #=> String

Options Hash (options):

  • :task_ids (Array<String>) — default: Optional

    IDs of the tasks whose descriptions you want to retrieve (String).

  • :filters (Array<Types::DataRepositoryTaskFilter>) — default: Optional

    You can use filters to narrow the DescribeDataRepositoryTasks response to include just tasks for specific file systems, or tasks in a specific lifecycle state.

  • :max_results (Integer)

    The maximum number of resources to return in the response. This value must be an integer greater than zero.

  • :next_token (String)

    (Optional) Opaque pagination token returned from a previous operation (String). If present, this token indicates from what point you can continue processing the request, where the previous NextToken value left off.

Returns:

See Also:

#describe_file_system_aliases(options = {}) ⇒ Types::DescribeFileSystemAliasesResponse

Returns the DNS aliases that are associated with the specified Amazon FSx for Windows File Server file system. A history of all DNS aliases that have been associated with and disassociated from the file system is available in the list of AdministrativeAction provided in the DescribeFileSystems operation response.

Examples:

Request syntax with placeholder values


resp = client.describe_file_system_aliases({
  client_request_token: "ClientRequestToken",
  file_system_id: "FileSystemId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.aliases #=> Array
resp.aliases[0].name #=> String
resp.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"
resp.next_token #=> String

Options Hash (options):

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided.

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

  • :file_system_id (required, String)

    The ID of the file system to return the associated DNS aliases for (String).

  • :max_results (Integer)

    Maximum number of DNS aliases to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service\'s internal maximum number of items per page.

  • :next_token (String)

    Opaque pagination token returned from a previous DescribeFileSystemAliases operation (String). If a token is included in the request, the action continues the list from where the previous returning call left off.

Returns:

See Also:

#describe_file_systems(options = {}) ⇒ Types::DescribeFileSystemsResponse

Returns the description of specific Amazon FSx file systems, if a FileSystemIds value is provided for that file system. Otherwise, it returns descriptions of all file systems owned by your AWS account in the AWS Region of the endpoint that you're calling.

When retrieving all file system descriptions, you can optionally specify the MaxResults parameter to limit the number of descriptions in a response. If more file system descriptions remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

This action is used in an iterative process to retrieve a list of your file system descriptions. DescribeFileSystems is called first without a NextTokenvalue. Then the action continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken.

When using this action, keep the following in mind:

  • The implementation might return fewer than MaxResults file system descriptions while still including a NextToken value.

  • The order of file systems returned in the response of one DescribeFileSystems call and the order of file systems returned across the responses of a multicall iteration is unspecified.

Examples:

Example: To describe an Amazon FSx file system


# This operation describes all of the Amazon FSx file systems in an account.

resp = client.describe_file_systems({
})

# resp.to_h outputs the following:
{
  file_systems: [
    {
      creation_time: Time.parse("1481841524.0"), 
      dns_name: "fs-0498eed5fe91001ec.fsx.com", 
      file_system_id: "fs-0498eed5fe91001ec", 
      kms_key_id: "arn:aws:kms:us-east-1:012345678912:key/0ff3ea8d-130e-4133-877f-93908b6fdbd6", 
      lifecycle: "AVAILABLE", 
      network_interface_ids: [
        "eni-abcd1234", 
      ], 
      owner_id: "012345678912", 
      resource_arn: "arn:aws:fsx:us-east-1:012345678912:file-system/fs-0498eed5fe91001ec", 
      storage_capacity: 300, 
      subnet_ids: [
        "subnet-1234abcd", 
      ], 
      tags: [
        {
          key: "Name", 
          value: "MyFileSystem", 
        }, 
      ], 
      vpc_id: "vpc-ab1234cd", 
      windows_configuration: {
        active_directory_id: "d-1234abcd12", 
        automatic_backup_retention_days: 30, 
        daily_automatic_backup_start_time: "05:00", 
        throughput_capacity: 8, 
        weekly_maintenance_start_time: "1:05:00", 
      }, 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.describe_file_systems({
  file_system_ids: ["FileSystemId"],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.file_systems #=> Array
resp.file_systems[0].owner_id #=> String
resp.file_systems[0].creation_time #=> Time
resp.file_systems[0].file_system_id #=> String
resp.file_systems[0].file_system_type #=> String, one of "WINDOWS", "LUSTRE"
resp.file_systems[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "FAILED", "DELETING", "MISCONFIGURED", "UPDATING"
resp.file_systems[0].failure_details.message #=> String
resp.file_systems[0].storage_capacity #=> Integer
resp.file_systems[0].storage_type #=> String, one of "SSD", "HDD"
resp.file_systems[0].vpc_id #=> String
resp.file_systems[0].subnet_ids #=> Array
resp.file_systems[0].subnet_ids[0] #=> String
resp.file_systems[0].network_interface_ids #=> Array
resp.file_systems[0].network_interface_ids[0] #=> String
resp.file_systems[0].dns_name #=> String
resp.file_systems[0].kms_key_id #=> String
resp.file_systems[0].resource_arn #=> String
resp.file_systems[0].tags #=> Array
resp.file_systems[0].tags[0].key #=> String
resp.file_systems[0].tags[0].value #=> String
resp.file_systems[0].windows_configuration.active_directory_id #=> String
resp.file_systems[0].windows_configuration.self_managed_active_directory_configuration.domain_name #=> String
resp.file_systems[0].windows_configuration.self_managed_active_directory_configuration.organizational_unit_distinguished_name #=> String
resp.file_systems[0].windows_configuration.self_managed_active_directory_configuration.file_system_administrators_group #=> String
resp.file_systems[0].windows_configuration.self_managed_active_directory_configuration.user_name #=> String
resp.file_systems[0].windows_configuration.self_managed_active_directory_configuration.dns_ips #=> Array
resp.file_systems[0].windows_configuration.self_managed_active_directory_configuration.dns_ips[0] #=> String
resp.file_systems[0].windows_configuration.deployment_type #=> String, one of "MULTI_AZ_1", "SINGLE_AZ_1", "SINGLE_AZ_2"
resp.file_systems[0].windows_configuration.remote_administration_endpoint #=> String
resp.file_systems[0].windows_configuration.preferred_subnet_id #=> String
resp.file_systems[0].windows_configuration.preferred_file_server_ip #=> String
resp.file_systems[0].windows_configuration.throughput_capacity #=> Integer
resp.file_systems[0].windows_configuration.maintenance_operations_in_progress #=> Array
resp.file_systems[0].windows_configuration.maintenance_operations_in_progress[0] #=> String, one of "PATCHING", "BACKING_UP"
resp.file_systems[0].windows_configuration.weekly_maintenance_start_time #=> String
resp.file_systems[0].windows_configuration.daily_automatic_backup_start_time #=> String
resp.file_systems[0].windows_configuration.automatic_backup_retention_days #=> Integer
resp.file_systems[0].windows_configuration.copy_tags_to_backups #=> true/false
resp.file_systems[0].windows_configuration.aliases #=> Array
resp.file_systems[0].windows_configuration.aliases[0].name #=> String
resp.file_systems[0].windows_configuration.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"
resp.file_systems[0].lustre_configuration.weekly_maintenance_start_time #=> String
resp.file_systems[0].lustre_configuration.data_repository_configuration.lifecycle #=> String, one of "CREATING", "AVAILABLE", "MISCONFIGURED", "UPDATING", "DELETING"
resp.file_systems[0].lustre_configuration.data_repository_configuration.import_path #=> String
resp.file_systems[0].lustre_configuration.data_repository_configuration.export_path #=> String
resp.file_systems[0].lustre_configuration.data_repository_configuration.imported_file_chunk_size #=> Integer
resp.file_systems[0].lustre_configuration.data_repository_configuration.auto_import_policy #=> String, one of "NONE", "NEW", "NEW_CHANGED"
resp.file_systems[0].lustre_configuration.data_repository_configuration.failure_details.message #=> String
resp.file_systems[0].lustre_configuration.deployment_type #=> String, one of "SCRATCH_1", "SCRATCH_2", "PERSISTENT_1"
resp.file_systems[0].lustre_configuration.per_unit_storage_throughput #=> Integer
resp.file_systems[0].lustre_configuration.mount_name #=> String
resp.file_systems[0].lustre_configuration.daily_automatic_backup_start_time #=> String
resp.file_systems[0].lustre_configuration.automatic_backup_retention_days #=> Integer
resp.file_systems[0].lustre_configuration.copy_tags_to_backups #=> true/false
resp.file_systems[0].lustre_configuration.drive_cache_type #=> String, one of "NONE", "READ"
resp.file_systems[0].administrative_actions #=> Array
resp.file_systems[0].administrative_actions[0].administrative_action_type #=> String, one of "FILE_SYSTEM_UPDATE", "STORAGE_OPTIMIZATION", "FILE_SYSTEM_ALIAS_ASSOCIATION", "FILE_SYSTEM_ALIAS_DISASSOCIATION"
resp.file_systems[0].administrative_actions[0].progress_percent #=> Integer
resp.file_systems[0].administrative_actions[0].request_time #=> Time
resp.file_systems[0].administrative_actions[0].status #=> String, one of "FAILED", "IN_PROGRESS", "PENDING", "COMPLETED", "UPDATED_OPTIMIZING"
resp.file_systems[0].administrative_actions[0].target_file_system_values #=> Types::FileSystem
resp.file_systems[0].administrative_actions[0].failure_details.message #=> String
resp.next_token #=> String

Options Hash (options):

  • :file_system_ids (Array<String>)

    IDs of the file systems whose descriptions you want to retrieve (String).

  • :max_results (Integer)

    Maximum number of file systems to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service\'s internal maximum number of items per page.

  • :next_token (String)

    Opaque pagination token returned from a previous DescribeFileSystems operation (String). If a token present, the action continues the list from where the returning call left off.

Returns:

See Also:

#disassociate_file_system_aliases(options = {}) ⇒ Types::DisassociateFileSystemAliasesResponse

Use this action to disassociate, or remove, one or more Domain Name Service (DNS) aliases from an Amazon FSx for Windows File Server file system. If you attempt to disassociate a DNS alias that is not associated with the file system, Amazon FSx responds with a 400 Bad Request. For more information, see Working with DNS Aliases.

The system generated response showing the DNS aliases that Amazon FSx is attempting to disassociate from the file system. Use the API operation to monitor the status of the aliases Amazon FSx is disassociating with the file system.

Examples:

Request syntax with placeholder values


resp = client.disassociate_file_system_aliases({
  client_request_token: "ClientRequestToken",
  file_system_id: "FileSystemId", # required
  aliases: ["AlternateDNSName"], # required
})

Response structure


resp.aliases #=> Array
resp.aliases[0].name #=> String
resp.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"

Options Hash (options):

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided.

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

  • :file_system_id (required, String)

    Specifies the file system from which to disassociate the DNS aliases.

  • :aliases (required, Array<String>)

    An array of one or more DNS alias names to disassociate, or remove, from the file system.

Returns:

See Also:

#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResponse

Lists tags for an Amazon FSx file systems and backups in the case of Amazon FSx for Windows File Server.

When retrieving all tags, you can optionally specify the MaxResults parameter to limit the number of tags in a response. If more tags remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of NextToken from the last response.

This action is used in an iterative process to retrieve a list of your tags. ListTagsForResource is called first without a NextTokenvalue. Then the action continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken.

When using this action, keep the following in mind:

  • The implementation might return fewer than MaxResults file system descriptions while still including a NextToken value.

  • The order of tags returned in the response of one ListTagsForResource call and the order of tags returned across the responses of a multi-call iteration is unspecified.

Examples:

Example: To list tags for a resource


# This operation lists tags for an Amazon FSx resource.

resp = client.list_tags_for_resource({
  resource_arn: "arn:aws:fsx:us-east-1:012345678912:file-system/fs-0498eed5fe91001ec", 
})

# resp.to_h outputs the following:
{
  tags: [
    {
      key: "Name", 
      value: "MyFileSystem", 
    }, 
  ], 
}

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ResourceARN", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :resource_arn (required, String)

    The ARN of the Amazon FSx resource that will have its tags listed.

  • :max_results (Integer)

    Maximum number of tags to return in the response (integer). This parameter value must be greater than 0. The number of items that Amazon FSx returns is the minimum of the MaxResults parameter specified in the request and the service\'s internal maximum number of items per page.

  • :next_token (String)

    Opaque pagination token returned from a previous ListTagsForResource operation (String). If a token present, the action continues the list from where the returning call left off.

Returns:

See Also:

#tag_resource(options = {}) ⇒ Struct

Tags an Amazon FSx resource.

Examples:

Example: To tag a resource


# This operation tags an Amazon FSx resource.

resp = client.tag_resource({
  resource_arn: "arn:aws:fsx:us-east-1:012345678912:file-system/fs-0498eed5fe91001ec", 
  tags: [
    {
      key: "Name", 
      value: "MyFileSystem", 
    }, 
  ], 
})

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceARN", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the Amazon FSx resource that you want to tag.

  • :tags (required, Array<Types::Tag>)

    A list of tags for the resource. If a tag with a given key already exists, the value is replaced by the one specified in this parameter.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

This action removes a tag from an Amazon FSx resource.

Examples:

Example: To untag a resource


# This operation untags an Amazon FSx resource.

resp = client.untag_resource({
  resource_arn: "arn:aws:fsx:us-east-1:012345678912:file-system/fs-0498eed5fe91001ec", 
  tag_keys: [
    "Name", 
  ], 
})

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceARN", # required
  tag_keys: ["TagKey"], # required
})

Options Hash (options):

  • :resource_arn (required, String)

    The ARN of the Amazon FSx resource to untag.

  • :tag_keys (required, Array<String>)

    A list of keys of tags on the resource to untag. In case the tag key doesn\'t exist, the call will still succeed to be idempotent.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_file_system(options = {}) ⇒ Types::UpdateFileSystemResponse

Use this operation to update the configuration of an existing Amazon FSx file system. You can update multiple properties in a single request.

For Amazon FSx for Windows File Server file systems, you can update the following properties:

  • AutomaticBackupRetentionDays

  • DailyAutomaticBackupStartTime

  • SelfManagedActiveDirectoryConfiguration

  • StorageCapacity

  • ThroughputCapacity

  • WeeklyMaintenanceStartTime

For Amazon FSx for Lustre file systems, you can update the following properties:

  • AutoImportPolicy

  • AutomaticBackupRetentionDays

  • DailyAutomaticBackupStartTime

  • WeeklyMaintenanceStartTime

Examples:

Example: To update an existing file system


# This operation updates an existing file system.

resp = client.update_file_system({
  file_system_id: "fs-0498eed5fe91001ec", 
  windows_configuration: {
    automatic_backup_retention_days: 10, 
    daily_automatic_backup_start_time: "06:00", 
    weekly_maintenance_start_time: "3:06:00", 
  }, 
})

# resp.to_h outputs the following:
{
  file_system: {
    creation_time: Time.parse("1481841524.0"), 
    dns_name: "fs-0498eed5fe91001ec.fsx.com", 
    file_system_id: "fs-0498eed5fe91001ec", 
    kms_key_id: "arn:aws:kms:us-east-1:012345678912:key/0ff3ea8d-130e-4133-877f-93908b6fdbd6", 
    lifecycle: "AVAILABLE", 
    owner_id: "012345678912", 
    resource_arn: "arn:aws:fsx:us-east-1:012345678912:file-system/fs-0498eed5fe91001ec", 
    storage_capacity: 300, 
    subnet_ids: [
      "subnet-1234abcd", 
    ], 
    tags: [
      {
        key: "Name", 
        value: "MyFileSystem", 
      }, 
    ], 
    vpc_id: "vpc-ab1234cd", 
    windows_configuration: {
      automatic_backup_retention_days: 10, 
      daily_automatic_backup_start_time: "06:00", 
      throughput_capacity: 8, 
      weekly_maintenance_start_time: "3:06:00", 
    }, 
  }, 
}

Request syntax with placeholder values


resp = client.update_file_system({
  file_system_id: "FileSystemId", # required
  client_request_token: "ClientRequestToken",
  storage_capacity: 1,
  windows_configuration: {
    weekly_maintenance_start_time: "WeeklyTime",
    daily_automatic_backup_start_time: "DailyTime",
    automatic_backup_retention_days: 1,
    throughput_capacity: 1,
    self_managed_active_directory_configuration: {
      user_name: "DirectoryUserName",
      password: "DirectoryPassword",
      dns_ips: ["IpAddress"],
    },
  },
  lustre_configuration: {
    weekly_maintenance_start_time: "WeeklyTime",
    daily_automatic_backup_start_time: "DailyTime",
    automatic_backup_retention_days: 1,
    auto_import_policy: "NONE", # accepts NONE, NEW, NEW_CHANGED
  },
})

Response structure


resp.file_system.owner_id #=> String
resp.file_system.creation_time #=> Time
resp.file_system.file_system_id #=> String
resp.file_system.file_system_type #=> String, one of "WINDOWS", "LUSTRE"
resp.file_system.lifecycle #=> String, one of "AVAILABLE", "CREATING", "FAILED", "DELETING", "MISCONFIGURED", "UPDATING"
resp.file_system.failure_details.message #=> String
resp.file_system.storage_capacity #=> Integer
resp.file_system.storage_type #=> String, one of "SSD", "HDD"
resp.file_system.vpc_id #=> String
resp.file_system.subnet_ids #=> Array
resp.file_system.subnet_ids[0] #=> String
resp.file_system.network_interface_ids #=> Array
resp.file_system.network_interface_ids[0] #=> String
resp.file_system.dns_name #=> String
resp.file_system.kms_key_id #=> String
resp.file_system.resource_arn #=> String
resp.file_system.tags #=> Array
resp.file_system.tags[0].key #=> String
resp.file_system.tags[0].value #=> String
resp.file_system.windows_configuration.active_directory_id #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.domain_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.organizational_unit_distinguished_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.file_system_administrators_group #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.user_name #=> String
resp.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips #=> Array
resp.file_system.windows_configuration.self_managed_active_directory_configuration.dns_ips[0] #=> String
resp.file_system.windows_configuration.deployment_type #=> String, one of "MULTI_AZ_1", "SINGLE_AZ_1", "SINGLE_AZ_2"
resp.file_system.windows_configuration.remote_administration_endpoint #=> String
resp.file_system.windows_configuration.preferred_subnet_id #=> String
resp.file_system.windows_configuration.preferred_file_server_ip #=> String
resp.file_system.windows_configuration.throughput_capacity #=> Integer
resp.file_system.windows_configuration.maintenance_operations_in_progress #=> Array
resp.file_system.windows_configuration.maintenance_operations_in_progress[0] #=> String, one of "PATCHING", "BACKING_UP"
resp.file_system.windows_configuration.weekly_maintenance_start_time #=> String
resp.file_system.windows_configuration.daily_automatic_backup_start_time #=> String
resp.file_system.windows_configuration.automatic_backup_retention_days #=> Integer
resp.file_system.windows_configuration.copy_tags_to_backups #=> true/false
resp.file_system.windows_configuration.aliases #=> Array
resp.file_system.windows_configuration.aliases[0].name #=> String
resp.file_system.windows_configuration.aliases[0].lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETING", "CREATE_FAILED", "DELETE_FAILED"
resp.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
resp.file_system.lustre_configuration.data_repository_configuration.lifecycle #=> String, one of "CREATING", "AVAILABLE", "MISCONFIGURED", "UPDATING", "DELETING"
resp.file_system.lustre_configuration.data_repository_configuration.import_path #=> String
resp.file_system.lustre_configuration.data_repository_configuration.export_path #=> String
resp.file_system.lustre_configuration.data_repository_configuration.imported_file_chunk_size #=> Integer
resp.file_system.lustre_configuration.data_repository_configuration.auto_import_policy #=> String, one of "NONE", "NEW", "NEW_CHANGED"
resp.file_system.lustre_configuration.data_repository_configuration.failure_details.message #=> String
resp.file_system.lustre_configuration.deployment_type #=> String, one of "SCRATCH_1", "SCRATCH_2", "PERSISTENT_1"
resp.file_system.lustre_configuration.per_unit_storage_throughput #=> Integer
resp.file_system.lustre_configuration.mount_name #=> String
resp.file_system.lustre_configuration.daily_automatic_backup_start_time #=> String
resp.file_system.lustre_configuration.automatic_backup_retention_days #=> Integer
resp.file_system.lustre_configuration.copy_tags_to_backups #=> true/false
resp.file_system.lustre_configuration.drive_cache_type #=> String, one of "NONE", "READ"
resp.file_system.administrative_actions #=> Array
resp.file_system.administrative_actions[0].administrative_action_type #=> String, one of "FILE_SYSTEM_UPDATE", "STORAGE_OPTIMIZATION", "FILE_SYSTEM_ALIAS_ASSOCIATION", "FILE_SYSTEM_ALIAS_DISASSOCIATION"
resp.file_system.administrative_actions[0].progress_percent #=> Integer
resp.file_system.administrative_actions[0].request_time #=> Time
resp.file_system.administrative_actions[0].status #=> String, one of "FAILED", "IN_PROGRESS", "PENDING", "COMPLETED", "UPDATED_OPTIMIZING"
resp.file_system.administrative_actions[0].target_file_system_values #=> Types::FileSystem
resp.file_system.administrative_actions[0].failure_details.message #=> String

Options Hash (options):

  • :file_system_id (required, String)

    Identifies the file system that you are updating.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent updates. This string is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

  • :storage_capacity (Integer)

    Use this parameter to increase the storage capacity of an Amazon FSx for Windows File Server file system. Specifies the storage capacity target value, GiB, for the file system you\'re updating. The storage capacity target value must be at least 10 percent (%) greater than the current storage capacity value. In order to increase storage capacity, the file system needs to have at least 16 MB/s of throughput capacity. You cannot make a storage capacity increase request if there is an existing storage capacity increase request in progress. For more information, see Managing Storage Capacity.

  • :windows_configuration (Types::UpdateFileSystemWindowsConfiguration)

    The configuration updates for an Amazon FSx for Windows File Server file system.

  • :lustre_configuration (Types::UpdateFileSystemLustreConfiguration)

    The configuration object for Amazon FSx for Lustre file systems used in the UpdateFileSystem operation.

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.