Struct aws_sdk_fsx::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for Amazon FSx

Client for invoking operations on Amazon FSx. Each operation on Amazon FSx is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_fsx::Client::new(&config);

Occasionally, SDKs may have additional service-specific that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_fsx::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

Using the Client

A client has a function for every operation that can be performed by the service. For example, the AssociateFileSystemAliases operation has a Client::associate_file_system_aliases, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.associate_file_system_aliases()
    .client_request_token("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

source§

impl Client

source

pub fn associate_file_system_aliases( &self ) -> AssociateFileSystemAliasesFluentBuilder

Constructs a fluent builder for the AssociateFileSystemAliases operation.

source§

impl Client

source

pub fn cancel_data_repository_task( &self ) -> CancelDataRepositoryTaskFluentBuilder

Constructs a fluent builder for the CancelDataRepositoryTask operation.

source§

impl Client

source

pub fn copy_backup(&self) -> CopyBackupFluentBuilder

Constructs a fluent builder for the CopyBackup operation.

  • The fluent builder is configurable:
    • client_request_token(impl Into<String>) / set_client_request_token(Option<String>):

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

    • source_backup_id(impl Into<String>) / set_source_backup_id(Option<String>):

      The ID of the source backup. Specifies the ID of the backup that’s being copied.

    • source_region(impl Into<String>) / set_source_region(Option<String>):

      The source Amazon Web Services Region of the backup. Specifies the Amazon Web Services Region from which the backup is being copied. The source and destination Regions must be in the same Amazon Web Services partition. If you don’t specify a Region, SourceRegion defaults to the Region where the request is sent from (in-Region copy).

    • kms_key_id(impl Into<String>) / set_kms_key_id(Option<String>):

      Specifies the ID of the Key Management Service (KMS) key to use for encrypting data on Amazon FSx file systems, as follows:

      • Amazon FSx for Lustre PERSISTENT_1 and PERSISTENT_2 deployment types only.

        SCRATCH_1 and SCRATCH_2 types are encrypted using the Amazon FSx service KMS key for your account.

      • Amazon FSx for NetApp ONTAP

      • Amazon FSx for OpenZFS

      • Amazon FSx for Windows File Server

      If a KmsKeyId isn’t specified, the Amazon FSx-managed KMS key for your account is used. For more information, see Encrypt in the Key Management Service API Reference.

    • copy_tags(bool) / set_copy_tags(Option<bool>):

      A Boolean flag indicating whether tags from the source backup should be copied to the backup copy. This value defaults to false.

      If you set CopyTags to true and the source backup has existing tags, you can use the Tags parameter to create new tags, provided that the sum of the source backup tags and the new tags doesn’t exceed 50. Both sets of tags are merged. If there are tag conflicts (for example, two tags with the same key but different values), the tags created with the Tags parameter take precedence.

    • tags(Tag) / set_tags(Option<Vec<Tag>>):

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

  • On success, responds with CopyBackupOutput with field(s):
    • backup(Option<Backup>):

      A backup of an Amazon FSx for Windows File Server, Amazon FSx for Lustre file system, Amazon FSx for NetApp ONTAP volume, or Amazon FSx for OpenZFS file system.

  • On failure, responds with SdkError<CopyBackupError>
source§

impl Client

source

pub fn create_backup(&self) -> CreateBackupFluentBuilder

Constructs a fluent builder for the CreateBackup operation.

source§

impl Client

source

pub fn create_data_repository_association( &self ) -> CreateDataRepositoryAssociationFluentBuilder

Constructs a fluent builder for the CreateDataRepositoryAssociation operation.

source§

impl Client

source

pub fn create_data_repository_task( &self ) -> CreateDataRepositoryTaskFluentBuilder

Constructs a fluent builder for the CreateDataRepositoryTask operation.

source§

impl Client

source

pub fn create_file_cache(&self) -> CreateFileCacheFluentBuilder

Constructs a fluent builder for the CreateFileCache operation.

source§

impl Client

source

pub fn create_file_system(&self) -> CreateFileSystemFluentBuilder

Constructs a fluent builder for the CreateFileSystem operation.

source§

impl Client

source

pub fn create_file_system_from_backup( &self ) -> CreateFileSystemFromBackupFluentBuilder

Constructs a fluent builder for the CreateFileSystemFromBackup operation.

source§

impl Client

source

pub fn create_snapshot(&self) -> CreateSnapshotFluentBuilder

Constructs a fluent builder for the CreateSnapshot operation.

source§

impl Client

source

pub fn create_storage_virtual_machine( &self ) -> CreateStorageVirtualMachineFluentBuilder

Constructs a fluent builder for the CreateStorageVirtualMachine operation.

source§

impl Client

source

pub fn create_volume(&self) -> CreateVolumeFluentBuilder

Constructs a fluent builder for the CreateVolume operation.

source§

impl Client

source

pub fn create_volume_from_backup(&self) -> CreateVolumeFromBackupFluentBuilder

Constructs a fluent builder for the CreateVolumeFromBackup operation.

source§

impl Client

source

pub fn delete_backup(&self) -> DeleteBackupFluentBuilder

Constructs a fluent builder for the DeleteBackup operation.

source§

impl Client

source

pub fn delete_data_repository_association( &self ) -> DeleteDataRepositoryAssociationFluentBuilder

Constructs a fluent builder for the DeleteDataRepositoryAssociation operation.

source§

impl Client

source

pub fn delete_file_cache(&self) -> DeleteFileCacheFluentBuilder

Constructs a fluent builder for the DeleteFileCache operation.

source§

impl Client

source

pub fn delete_file_system(&self) -> DeleteFileSystemFluentBuilder

Constructs a fluent builder for the DeleteFileSystem operation.

source§

impl Client

source

pub fn delete_snapshot(&self) -> DeleteSnapshotFluentBuilder

Constructs a fluent builder for the DeleteSnapshot operation.

source§

impl Client

source

pub fn delete_storage_virtual_machine( &self ) -> DeleteStorageVirtualMachineFluentBuilder

Constructs a fluent builder for the DeleteStorageVirtualMachine operation.

source§

impl Client

source

pub fn delete_volume(&self) -> DeleteVolumeFluentBuilder

Constructs a fluent builder for the DeleteVolume operation.

source§

impl Client

source

pub fn describe_backups(&self) -> DescribeBackupsFluentBuilder

Constructs a fluent builder for the DescribeBackups operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_data_repository_associations( &self ) -> DescribeDataRepositoryAssociationsFluentBuilder

Constructs a fluent builder for the DescribeDataRepositoryAssociations operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_data_repository_tasks( &self ) -> DescribeDataRepositoryTasksFluentBuilder

Constructs a fluent builder for the DescribeDataRepositoryTasks operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_file_caches(&self) -> DescribeFileCachesFluentBuilder

Constructs a fluent builder for the DescribeFileCaches operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_file_system_aliases( &self ) -> DescribeFileSystemAliasesFluentBuilder

Constructs a fluent builder for the DescribeFileSystemAliases operation.

source§

impl Client

source

pub fn describe_file_systems(&self) -> DescribeFileSystemsFluentBuilder

Constructs a fluent builder for the DescribeFileSystems operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_snapshots(&self) -> DescribeSnapshotsFluentBuilder

Constructs a fluent builder for the DescribeSnapshots operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_storage_virtual_machines( &self ) -> DescribeStorageVirtualMachinesFluentBuilder

Constructs a fluent builder for the DescribeStorageVirtualMachines operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_volumes(&self) -> DescribeVolumesFluentBuilder

Constructs a fluent builder for the DescribeVolumes operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn disassociate_file_system_aliases( &self ) -> DisassociateFileSystemAliasesFluentBuilder

Constructs a fluent builder for the DisassociateFileSystemAliases operation.

source§

impl Client

source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn release_file_system_nfs_v3_locks( &self ) -> ReleaseFileSystemNfsV3LocksFluentBuilder

Constructs a fluent builder for the ReleaseFileSystemNfsV3Locks operation.

source§

impl Client

source

pub fn restore_volume_from_snapshot( &self ) -> RestoreVolumeFromSnapshotFluentBuilder

Constructs a fluent builder for the RestoreVolumeFromSnapshot operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_data_repository_association( &self ) -> UpdateDataRepositoryAssociationFluentBuilder

Constructs a fluent builder for the UpdateDataRepositoryAssociation operation.

source§

impl Client

source

pub fn update_file_cache(&self) -> UpdateFileCacheFluentBuilder

Constructs a fluent builder for the UpdateFileCache operation.

source§

impl Client

source

pub fn update_file_system(&self) -> UpdateFileSystemFluentBuilder

Constructs a fluent builder for the UpdateFileSystem operation.

source§

impl Client

source

pub fn update_snapshot(&self) -> UpdateSnapshotFluentBuilder

Constructs a fluent builder for the UpdateSnapshot operation.

source§

impl Client

source

pub fn update_storage_virtual_machine( &self ) -> UpdateStorageVirtualMachineFluentBuilder

Constructs a fluent builder for the UpdateStorageVirtualMachine operation.

source§

impl Client

source

pub fn update_volume(&self) -> UpdateVolumeFluentBuilder

Constructs a fluent builder for the UpdateVolume operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

Panics

This method will panic if the conf has retry or timeouts enabled without a sleep_impl. If you experience this panic, it can be fixed by setting the sleep_impl, or by disabling retries and timeouts.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more