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

Class: Aws::FSx::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::SharedCredentials - Used for loading credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is search for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

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

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test endpoints. This should be avalid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    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.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :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.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.

  • :secret_access_key (String)
  • :session_token (String)
  • :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.

  • :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.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before rasing a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session yeidled by #session_for.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idble before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session yeidled by #session_for.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



261
262
263
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 261

def initialize(*args)
  super
end

Instance Method Details

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

Creates a backup of an existing Amazon FSx for Windows File Server file system. Creating regular backups for your file system is a best practice that complements the replication that Amazon FSx for Windows File Server performs for your file system. It also enables you to restore from user modification of data.

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 CreateFileSystem operation returns while the backup's lifecycle state is still CREATING. You can check the file system 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",
      value: "TagValue",
    },
  ],
})

Response structure


resp.backup.backup_id #=> String
resp.backup.lifecycle #=> String, one of "AVAILABLE", "CREATING", "DELETED", "FAILED"
resp.backup.failure_details.message #=> String
resp.backup.type #=> String, one of "AUTOMATIC", "USER_INITIATED"
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.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.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 #=> Boolean
resp.backup.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
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.directory_information.domain_name #=> String
resp.backup.directory_information.active_directory_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :file_system_id (required, String)

    The ID of the file system to back up.

  • :client_request_token (String) — default: 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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

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

    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.

Returns:

See Also:



434
435
436
437
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 434

def create_backup(params = {}, options = {})
  req = build_request(:create_backup, params)
  req.send_request(options)
end

#create_file_system(params = {}) ⇒ 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 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/0ff3ea8d-130e-4133-877f-93908b6fdbd6", 
  security_group_ids: [
    "sg-edcd9784", 
  ], 
  storage_capacity: 300, 
  subnet_ids: [
    "subnet-1234abcd", 
  ], 
  tags: [
    {
      key: "Name", 
      value: "MyFileSystem", 
    }, 
  ], 
  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", 
  }, 
})

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({
  client_request_token: "ClientRequestToken",
  file_system_type: "WINDOWS", # required, accepts WINDOWS, LUSTRE
  storage_capacity: 1, # required
  subnet_ids: ["SubnetId"], # required
  security_group_ids: ["SecurityGroupId"],
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
  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
    },
    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,
  },
  lustre_configuration: {
    weekly_maintenance_start_time: "WeeklyTime",
    import_path: "ArchivePath",
    export_path: "ArchivePath",
    imported_file_chunk_size: 1,
  },
})

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.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.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 #=> Boolean
resp.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
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

Parameters:

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

    ({})

Options Hash (params):

  • :client_request_token (String) — default: 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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :file_system_type (required, String)

    The type of Amazon FSx file system to create.

  • :storage_capacity (required, Integer)

    The storage capacity of the file system being created.

    For Windows file systems, the storage capacity has a minimum of 300 GiB, and a maximum of 65,536 GiB.

    For Lustre file systems, the storage capacity has a minimum of 3,600 GiB. Storage capacity is provisioned in increments of 3,600 GiB.

  • :subnet_ids (required, Array<String>)

    The IDs of the subnets that the file system will be accessible from. File systems support only one subnet. The file server is also 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 your AWS Key Management Service (AWS KMS) key. This ID is used to encrypt the data in your file system at rest. 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. This value is required if FileSystemType is set to WINDOWS.

  • :lustre_configuration (Types::CreateFileSystemLustreConfiguration)

    The Lustre configuration for the file system being created. This value is required if FileSystemType is set to LUSTRE.

Returns:

See Also:



674
675
676
677
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 674

def create_file_system(params = {}, options = {})
  req = build_request(:create_file_system, params)
  req.send_request(options)
end

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

Creates a new Amazon FSx file system from an existing Amazon FSx for Windows File Server 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",
      value: "TagValue",
    },
  ],
  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
    },
    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,
  },
})

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.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.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 #=> Boolean
resp.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
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

Parameters:

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

    ({})

Options Hash (params):

  • :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) — default: 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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :subnet_ids (required, Array<String>)

    A list of IDs for the subnets that the file system will be accessible from. Currently, you can specify only one subnet. The file server is also 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 describe 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.

Returns:

See Also:



882
883
884
885
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 882

def create_file_system_from_backup(params = {}, options = {})
  req = build_request(:create_file_system_from_backup, params)
  req.send_request(options)
end

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

Deletes an Amazon FSx for Windows File Server 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", "DELETED", "FAILED"

Parameters:

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

    ({})

Options Hash (params):

  • :backup_id (required, String)

    The ID of the backup you want to delete.

  • :client_request_token (String) — default: Optional

    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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



944
945
946
947
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 944

def delete_backup(params = {}, options = {})
  req = build_request(:delete_backup, params)
  req.send_request(options)
end

#delete_file_system(params = {}) ⇒ 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.

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",
        value: "TagValue",
      },
    ],
  },
})

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

Parameters:

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

    ({})

Options Hash (params):

  • :file_system_id (required, String)

    The ID of the file system you want to delete.

  • :client_request_token (String) — default: Optional

    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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :windows_configuration (Types::DeleteFileSystemWindowsConfiguration)

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

Returns:

See Also:



1033
1034
1035
1036
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 1033

def delete_file_system(params = {}, options = {})
  req = build_request(:delete_file_system, params)
  req.send_request(options)
end

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

Returns the description of specific Amazon FSx for Windows File Server 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
      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", "DELETED", "FAILED"
resp.backups[0].failure_details.message #=> String
resp.backups[0].type #=> String, one of "AUTOMATIC", "USER_INITIATED"
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.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.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 #=> Boolean
resp.backups[0].file_system.lustre_configuration.weekly_maintenance_start_time #=> String
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].directory_information.domain_name #=> String
resp.backups[0].directory_information.active_directory_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

    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>) — default: Optional

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

  • :max_results (Integer) — default: Optional

    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) — default: Optional

    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:



1201
1202
1203
1204
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 1201

def describe_backups(params = {}, options = {})
  req = build_request(:describe_backups, params)
  req.send_request(options)
end

#describe_file_systems(params = {}) ⇒ 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].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.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 #=> Boolean
resp.file_systems[0].lustre_configuration.weekly_maintenance_start_time #=> String
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.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

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

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

  • :max_results (Integer) — default: Optional

    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) — default: Optional

    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:



1351
1352
1353
1354
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 1351

def describe_file_systems(params = {}, options = {})
  req = build_request(:describe_file_systems, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :max_results (Integer) — default: Optional

    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) — default: Optional

    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:



1438
1439
1440
1441
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 1438

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ 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",
      value: "TagValue",
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1486
1487
1488
1489
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 1486

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



1525
1526
1527
1528
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 1525

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

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

Updates a file system configuration.

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",
  windows_configuration: {
    weekly_maintenance_start_time: "WeeklyTime",
    daily_automatic_backup_start_time: "DailyTime",
    automatic_backup_retention_days: 1,
    self_managed_active_directory_configuration: {
      user_name: "DirectoryUserName",
      password: "DirectoryPassword",
      dns_ips: ["IpAddress"],
    },
  },
  lustre_configuration: {
    weekly_maintenance_start_time: "WeeklyTime",
  },
})

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.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.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 #=> Boolean
resp.file_system.lustre_configuration.weekly_maintenance_start_time #=> String
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

Parameters:

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

    ({})

Options Hash (params):

  • :file_system_id (required, String)

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

  • :client_request_token (String) — default: Optional

    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.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :windows_configuration (Types::UpdateFileSystemWindowsConfiguration)

    The configuration update for this Microsoft Windows file system. The only supported options are for backup and maintenance and for self-managed Active Directory configuration.

  • :lustre_configuration (Types::UpdateFileSystemLustreConfiguration)

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

Returns:

See Also:



1664
1665
1666
1667
# File 'gems/aws-sdk-fsx/lib/aws-sdk-fsx/client.rb', line 1664

def update_file_system(params = {}, options = {})
  req = build_request(:update_file_system, params)
  req.send_request(options)
end