Struct Client

Source
pub struct Client { /* private fields */ }
Expand description

Client for AWS Storage Gateway

Client for invoking operations on AWS Storage Gateway. Each operation on AWS Storage Gateway 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_storagegateway::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Builder 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_storagegateway::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 ActivateGateway operation has a Client::activate_gateway, 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.activate_gateway()
    .activation_key("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 activate_gateway(&self) -> ActivateGatewayFluentBuilder

Constructs a fluent builder for the ActivateGateway operation.

  • The fluent builder is configurable:
    • activation_key(impl Into<String>) / set_activation_key(Option<String>):
      required: true

      Your gateway activation key. You can obtain the activation key by sending an HTTP GET request with redirects enabled to the gateway IP address (port 80). The redirect URL returned in the response provides you the activation key for your gateway in the query string parameter activationKey. It may also include other activation-related parameters, however, these are merely defaults – the arguments you pass to the ActivateGateway API call determine the actual configuration of your gateway.

      For more information, see Getting activation key in the Storage Gateway User Guide.


    • gateway_name(impl Into<String>) / set_gateway_name(Option<String>):
      required: true

      The name you configured for your gateway.


    • gateway_timezone(impl Into<String>) / set_gateway_timezone(Option<String>):
      required: true

      A value that indicates the time zone you want to set for the gateway. The time zone is of the format “GMT”, “GMT-hr:mm”, or “GMT+hr:mm”. For example, GMT indicates Greenwich Mean Time without any offset. GMT-4:00 indicates the time is 4 hours behind GMT. GMT+2:00 indicates the time is 2 hours ahead of GMT. The time zone is used, for example, for scheduling snapshots and your gateway’s maintenance schedule.


    • gateway_region(impl Into<String>) / set_gateway_region(Option<String>):
      required: true

      A value that indicates the Amazon Web Services Region where you want to store your data. The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region as the Amazon Web Services Region in your Host header in the request. For more information about available Amazon Web Services Regions and endpoints for Storage Gateway, see Storage Gateway endpoints and quotas in the Amazon Web Services General Reference.

      Valid Values: See Storage Gateway endpoints and quotas in the Amazon Web Services General Reference.


    • gateway_type(impl Into<String>) / set_gateway_type(Option<String>):
      required: false

      A value that defines the type of gateway to activate. The type specified is critical to all later functions of the gateway and cannot be changed after activation. The default value is CACHED.

      Amazon FSx File Gateway is no longer available to new customers. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit this blog post.

      Valid Values: STORED | CACHED | VTL | FILE_S3 | FILE_FSX_SMB


    • tape_drive_type(impl Into<String>) / set_tape_drive_type(Option<String>):
      required: false

      The value that indicates the type of tape drive to use for tape gateway. This field is optional.

      Valid Values: IBM-ULT3580-TD5


    • medium_changer_type(impl Into<String>) / set_medium_changer_type(Option<String>):
      required: false

      The value that indicates the type of medium changer to use for tape gateway. This field is optional.

      Valid Values: STK-L700 | AWS-Gateway-VTL | IBM-03584L32-0402


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

      A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value pair.

      Valid characters for key and value are letters, spaces, and numbers that can be represented in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag’s key is 128 characters, and the maximum length for a tag’s value is 256 characters.


  • On success, responds with ActivateGatewayOutput with field(s):
    • gateway_arn(Option<String>):

      The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

  • On failure, responds with SdkError<ActivateGatewayError>
Source§

impl Client

Source

pub fn add_cache(&self) -> AddCacheFluentBuilder

Constructs a fluent builder for the AddCache operation.

Source§

impl Client

Source

pub fn add_tags_to_resource(&self) -> AddTagsToResourceFluentBuilder

Constructs a fluent builder for the AddTagsToResource operation.

Source§

impl Client

Source

pub fn add_upload_buffer(&self) -> AddUploadBufferFluentBuilder

Constructs a fluent builder for the AddUploadBuffer operation.

Source§

impl Client

Source

pub fn add_working_storage(&self) -> AddWorkingStorageFluentBuilder

Constructs a fluent builder for the AddWorkingStorage operation.

Source§

impl Client

Source

pub fn assign_tape_pool(&self) -> AssignTapePoolFluentBuilder

Constructs a fluent builder for the AssignTapePool operation.

  • The fluent builder is configurable:
    • tape_arn(impl Into<String>) / set_tape_arn(Option<String>):
      required: true

      The unique Amazon Resource Name (ARN) of the virtual tape that you want to add to the tape pool.


    • pool_id(impl Into<String>) / set_pool_id(Option<String>):
      required: true

      The ID of the pool that you want to add your tape to for archiving. The tape in this pool is archived in the S3 storage class that is associated with the pool. When you use your backup application to eject the tape, the tape is archived directly into the storage class (S3 Glacier or S3 Glacier Deep Archive) that corresponds to the pool.


    • bypass_governance_retention(bool) / set_bypass_governance_retention(Option<bool>):
      required: false

      Set permissions to bypass governance retention. If the lock type of the archived tape is Governance, the tape’s archived age is not older than RetentionLockInDays, and the user does not already have BypassGovernanceRetention, setting this to TRUE enables the user to bypass the retention lock. This parameter is set to true by default for calls from the console.

      Valid values: TRUE | FALSE


  • On success, responds with AssignTapePoolOutput with field(s):
  • On failure, responds with SdkError<AssignTapePoolError>
Source§

impl Client

Source

pub fn associate_file_system(&self) -> AssociateFileSystemFluentBuilder

Constructs a fluent builder for the AssociateFileSystem operation.

Source§

impl Client

Source

pub fn attach_volume(&self) -> AttachVolumeFluentBuilder

Constructs a fluent builder for the AttachVolume operation.

Source§

impl Client

Source

pub fn cancel_archival(&self) -> CancelArchivalFluentBuilder

Constructs a fluent builder for the CancelArchival operation.

Source§

impl Client

Source

pub fn cancel_cache_report(&self) -> CancelCacheReportFluentBuilder

Constructs a fluent builder for the CancelCacheReport operation.

Source§

impl Client

Source

pub fn cancel_retrieval(&self) -> CancelRetrievalFluentBuilder

Constructs a fluent builder for the CancelRetrieval operation.

Source§

impl Client

Source

pub fn create_cachedi_scsi_volume(&self) -> CreateCachediSCSIVolumeFluentBuilder

Constructs a fluent builder for the CreateCachediSCSIVolume operation.

Source§

impl Client

Source

pub fn create_nfs_file_share(&self) -> CreateNFSFileShareFluentBuilder

Constructs a fluent builder for the CreateNFSFileShare operation.

  • The fluent builder is configurable:
    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: true

      A unique string value that you supply that is used by S3 File Gateway to ensure idempotent file share creation.


    • nfs_file_share_defaults(NfsFileShareDefaults) / set_nfs_file_share_defaults(Option<NfsFileShareDefaults>):
      required: false

      File share default values. Optional.


    • gateway_arn(impl Into<String>) / set_gateway_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the S3 File Gateway on which you want to create a file share.


    • encryption_type(EncryptionType) / set_encryption_type(Option<EncryptionType>):
      required: false

      A value that specifies the type of server-side encryption that the file share will use for the data that it stores in Amazon S3.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.


    • kms_encrypted(bool) / set_kms_encrypted(Option<bool>):
      required: false

      Optional. Set to true to use Amazon S3 server-side encryption with your own KMS key (SSE-KMS), or false to use a key managed by Amazon S3 (SSE-S3). To use dual-layer encryption (DSSE-KMS), set the EncryptionType parameter instead.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.

      Valid Values: true | false


    • kms_key(impl Into<String>) / set_kms_key(Option<String>):
      required: false

      Optional. The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. Storage Gateway does not support asymmetric CMKs. This value must be set if KMSEncrypted is true, or if EncryptionType is SseKms or DsseKms.


    • role(impl Into<String>) / set_role(Option<String>):
      required: true

      The ARN of the Identity and Access Management (IAM) role that an S3 File Gateway assumes when it accesses the underlying storage.


    • location_arn(impl Into<String>) / set_location_arn(Option<String>):
      required: true

      A custom ARN for the backend storage used for storing data for file shares. It includes a resource ARN with an optional prefix concatenation. The prefix must end with a forward slash (/).

      You can specify LocationARN as a bucket ARN, access point ARN or access point alias, as shown in the following examples.

      Bucket ARN:

      arn:aws:s3:::amzn-s3-demo-bucket/prefix/

      Access point ARN:

      arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/

      If you specify an access point, the bucket policy must be configured to delegate access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

      Access point alias:

      test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias


    • default_storage_class(impl Into<String>) / set_default_storage_class(Option<String>):
      required: false

      The default storage class for objects put into an Amazon S3 bucket by the S3 File Gateway. The default value is S3_STANDARD. Optional.

      Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING | S3_STANDARD_IA | S3_ONEZONE_IA


    • object_acl(ObjectAcl) / set_object_acl(Option<ObjectAcl>):
      required: false

      A value that sets the access control list (ACL) permission for objects in the S3 bucket that a S3 File Gateway puts objects into. The default value is private.


    • client_list(impl Into<String>) / set_client_list(Option<Vec::<String>>):
      required: false

      The list of clients that are allowed to access the S3 File Gateway. The list must contain either valid IP addresses or valid CIDR blocks.


    • squash(impl Into<String>) / set_squash(Option<String>):
      required: false

      A value that maps a user to anonymous user.

      Valid values are the following:

      • RootSquash: Only root is mapped to anonymous user.

      • NoSquash: No one is mapped to anonymous user.

      • AllSquash: Everyone is mapped to anonymous user.


    • read_only(bool) / set_read_only(Option<bool>):
      required: false

      A value that sets the write status of a file share. Set this value to true to set the write status to read-only, otherwise set to false.

      Valid Values: true | false


    • guess_mime_type_enabled(bool) / set_guess_mime_type_enabled(Option<bool>):
      required: false

      A value that enables guessing of the MIME type for uploaded objects based on file extensions. Set this value to true to enable MIME type guessing, otherwise set to false. The default value is true.

      Valid Values: true | false


    • requester_pays(bool) / set_requester_pays(Option<bool>):
      required: false

      A value that sets who pays the cost of the request and the cost associated with data download from the S3 bucket. If this value is set to true, the requester pays the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays the cost of storing data.

      RequesterPays is a configuration for the S3 bucket that backs the file share, so make sure that the configuration on the file share is the same as the S3 bucket configuration.

      Valid Values: true | false


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

      A list of up to 50 tags that can be assigned to the NFS file share. Each tag is a key-value pair.

      Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag’s key is 128 characters, and the maximum length for a tag’s value is 256.


    • file_share_name(impl Into<String>) / set_file_share_name(Option<String>):
      required: false

      The name of the file share. Optional.

      FileShareName must be set if an S3 prefix name is set in LocationARN, or if an access point or access point alias is used.

      A valid NFS file share name can only contain the following characters: a-z, A-Z, 0-9, -, ., and _.


    • cache_attributes(CacheAttributes) / set_cache_attributes(Option<CacheAttributes>):
      required: false

      Specifies refresh cache information for the file share.


    • notification_policy(impl Into<String>) / set_notification_policy(Option<String>):
      required: false

      The notification policy of the file share. SettlingTimeInSeconds controls the number of seconds to wait after the last point in time a client wrote to a file before generating an ObjectUploaded notification. Because clients can make many small writes to files, it’s best to set this parameter for as long as possible to avoid generating multiple notifications for the same file in a small time period.

      SettlingTimeInSeconds has no effect on the timing of the object uploading to Amazon S3, only the timing of the notification.

      This setting is not meant to specify an exact time at which the notification will be sent. In some cases, the gateway might require more than the specified delay time to generate and send notifications.

      The following example sets NotificationPolicy on with SettlingTimeInSeconds set to 60.

      {"Upload": {"SettlingTimeInSeconds": 60}}

      The following example sets NotificationPolicy off.

      {}


    • vpc_endpoint_dns_name(impl Into<String>) / set_vpc_endpoint_dns_name(Option<String>):
      required: false

      Specifies the DNS name for the VPC endpoint that the NFS file share uses to connect to Amazon S3.

      This parameter is required for NFS file shares that connect to Amazon S3 through a VPC endpoint, a VPC access point, or an access point alias that points to a VPC access point.


    • bucket_region(impl Into<String>) / set_bucket_region(Option<String>):
      required: false

      Specifies the Region of the S3 bucket where the NFS file share stores files.

      This parameter is required for NFS file shares that connect to Amazon S3 through a VPC endpoint, a VPC access point, or an access point alias that points to a VPC access point.


    • audit_destination_arn(impl Into<String>) / set_audit_destination_arn(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the storage used for audit logs.


  • On success, responds with CreateNfsFileShareOutput with field(s):
  • On failure, responds with SdkError<CreateNFSFileShareError>
Source§

impl Client

Source

pub fn create_smb_file_share(&self) -> CreateSMBFileShareFluentBuilder

Constructs a fluent builder for the CreateSMBFileShare operation.

  • The fluent builder is configurable:
    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: true

      A unique string value that you supply that is used by S3 File Gateway to ensure idempotent file share creation.


    • gateway_arn(impl Into<String>) / set_gateway_arn(Option<String>):
      required: true

      The ARN of the S3 File Gateway on which you want to create a file share.


    • encryption_type(EncryptionType) / set_encryption_type(Option<EncryptionType>):
      required: false

      A value that specifies the type of server-side encryption that the file share will use for the data that it stores in Amazon S3.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.


    • kms_encrypted(bool) / set_kms_encrypted(Option<bool>):
      required: false

      Optional. Set to true to use Amazon S3 server-side encryption with your own KMS key (SSE-KMS), or false to use a key managed by Amazon S3 (SSE-S3). To use dual-layer encryption (DSSE-KMS), set the EncryptionType parameter instead.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.

      Valid Values: true | false


    • kms_key(impl Into<String>) / set_kms_key(Option<String>):
      required: false

      Optional. The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. Storage Gateway does not support asymmetric CMKs. This value must be set if KMSEncrypted is true, or if EncryptionType is SseKms or DsseKms.


    • role(impl Into<String>) / set_role(Option<String>):
      required: true

      The ARN of the Identity and Access Management (IAM) role that an S3 File Gateway assumes when it accesses the underlying storage.


    • location_arn(impl Into<String>) / set_location_arn(Option<String>):
      required: true

      A custom ARN for the backend storage used for storing data for file shares. It includes a resource ARN with an optional prefix concatenation. The prefix must end with a forward slash (/).

      You can specify LocationARN as a bucket ARN, access point ARN or access point alias, as shown in the following examples.

      Bucket ARN:

      arn:aws:s3:::amzn-s3-demo-bucket/prefix/

      Access point ARN:

      arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/

      If you specify an access point, the bucket policy must be configured to delegate access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

      Access point alias:

      test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias


    • default_storage_class(impl Into<String>) / set_default_storage_class(Option<String>):
      required: false

      The default storage class for objects put into an Amazon S3 bucket by the S3 File Gateway. The default value is S3_STANDARD. Optional.

      Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING | S3_STANDARD_IA | S3_ONEZONE_IA


    • object_acl(ObjectAcl) / set_object_acl(Option<ObjectAcl>):
      required: false

      A value that sets the access control list (ACL) permission for objects in the S3 bucket that a S3 File Gateway puts objects into. The default value is private.


    • read_only(bool) / set_read_only(Option<bool>):
      required: false

      A value that sets the write status of a file share. Set this value to true to set the write status to read-only, otherwise set to false.

      Valid Values: true | false


    • guess_mime_type_enabled(bool) / set_guess_mime_type_enabled(Option<bool>):
      required: false

      A value that enables guessing of the MIME type for uploaded objects based on file extensions. Set this value to true to enable MIME type guessing, otherwise set to false. The default value is true.

      Valid Values: true | false


    • requester_pays(bool) / set_requester_pays(Option<bool>):
      required: false

      A value that sets who pays the cost of the request and the cost associated with data download from the S3 bucket. If this value is set to true, the requester pays the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays the cost of storing data.

      RequesterPays is a configuration for the S3 bucket that backs the file share, so make sure that the configuration on the file share is the same as the S3 bucket configuration.

      Valid Values: true | false


    • smbacl_enabled(bool) / set_smbacl_enabled(Option<bool>):
      required: false

      Set this value to true to enable access control list (ACL) on the SMB file share. Set it to false to map file and directory permissions to the POSIX permissions.

      For more information, see Using Windows ACLs to limit SMB file share access in the Amazon S3 File Gateway User Guide.

      Valid Values: true | false


    • access_based_enumeration(bool) / set_access_based_enumeration(Option<bool>):
      required: false

      The files and folders on this share will only be visible to users with read access.


    • admin_user_list(impl Into<String>) / set_admin_user_list(Option<Vec::<String>>):
      required: false

      A list of users or groups in the Active Directory that will be granted administrator privileges on the file share. These users can do all file operations as the super-user. Acceptable formats include: DOMAIN\User1, user1, @group1, and @DOMAIN\group1.

      Use this option very carefully, because any user in this list can do anything they like on the file share, regardless of file permissions.


    • valid_user_list(impl Into<String>) / set_valid_user_list(Option<Vec::<String>>):
      required: false

      A list of users or groups in the Active Directory that are allowed to access the file share. A group must be prefixed with the @ character. Acceptable formats include: DOMAIN\User1, user1, @group1, and @DOMAIN\group1. Can only be set if Authentication is set to ActiveDirectory.


    • invalid_user_list(impl Into<String>) / set_invalid_user_list(Option<Vec::<String>>):
      required: false

      A list of users or groups in the Active Directory that are not allowed to access the file share. A group must be prefixed with the @ character. Acceptable formats include: DOMAIN\User1, user1, @group1, and @DOMAIN\group1. Can only be set if Authentication is set to ActiveDirectory.


    • audit_destination_arn(impl Into<String>) / set_audit_destination_arn(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the storage used for audit logs.


    • authentication(impl Into<String>) / set_authentication(Option<String>):
      required: false

      The authentication method that users use to access the file share. The default is ActiveDirectory.

      Valid Values: ActiveDirectory | GuestAccess


    • case_sensitivity(CaseSensitivity) / set_case_sensitivity(Option<CaseSensitivity>):
      required: false

      The case of an object name in an Amazon S3 bucket. For ClientSpecified, the client determines the case sensitivity. For CaseSensitive, the gateway determines the case sensitivity. The default value is ClientSpecified.


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

      A list of up to 50 tags that can be assigned to the NFS file share. Each tag is a key-value pair.

      Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag’s key is 128 characters, and the maximum length for a tag’s value is 256.


    • file_share_name(impl Into<String>) / set_file_share_name(Option<String>):
      required: false

      The name of the file share. Optional.

      FileShareName must be set if an S3 prefix name is set in LocationARN, or if an access point or access point alias is used.

      A valid SMB file share name cannot contain the following characters: [,],#,;,<,>,:,,</code>,/,|,?,*,+, or ASCII control characters 1-31.


    • cache_attributes(CacheAttributes) / set_cache_attributes(Option<CacheAttributes>):
      required: false

      Specifies refresh cache information for the file share.


    • notification_policy(impl Into<String>) / set_notification_policy(Option<String>):
      required: false

      The notification policy of the file share. SettlingTimeInSeconds controls the number of seconds to wait after the last point in time a client wrote to a file before generating an ObjectUploaded notification. Because clients can make many small writes to files, it’s best to set this parameter for as long as possible to avoid generating multiple notifications for the same file in a small time period.

      SettlingTimeInSeconds has no effect on the timing of the object uploading to Amazon S3, only the timing of the notification.

      This setting is not meant to specify an exact time at which the notification will be sent. In some cases, the gateway might require more than the specified delay time to generate and send notifications.

      The following example sets NotificationPolicy on with SettlingTimeInSeconds set to 60.

      {"Upload": {"SettlingTimeInSeconds": 60}}

      The following example sets NotificationPolicy off.

      {}


    • vpc_endpoint_dns_name(impl Into<String>) / set_vpc_endpoint_dns_name(Option<String>):
      required: false

      Specifies the DNS name for the VPC endpoint that the SMB file share uses to connect to Amazon S3.

      This parameter is required for SMB file shares that connect to Amazon S3 through a VPC endpoint, a VPC access point, or an access point alias that points to a VPC access point.


    • bucket_region(impl Into<String>) / set_bucket_region(Option<String>):
      required: false

      Specifies the Region of the S3 bucket where the SMB file share stores files.

      This parameter is required for SMB file shares that connect to Amazon S3 through a VPC endpoint, a VPC access point, or an access point alias that points to a VPC access point.


    • oplocks_enabled(bool) / set_oplocks_enabled(Option<bool>):
      required: false

      Specifies whether opportunistic locking is enabled for the SMB file share.

      Enabling opportunistic locking on case-sensitive shares is not recommended for workloads that involve access to files with the same name in different case.

      Valid Values: true | false


  • On success, responds with CreateSmbFileShareOutput with field(s):
  • On failure, responds with SdkError<CreateSMBFileShareError>
Source§

impl Client

Source

pub fn create_snapshot(&self) -> CreateSnapshotFluentBuilder

Constructs a fluent builder for the CreateSnapshot operation.

  • The fluent builder is configurable:
    • volume_arn(impl Into<String>) / set_volume_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.


    • snapshot_description(impl Into<String>) / set_snapshot_description(Option<String>):
      required: true

      Textual description of the snapshot that appears in the Amazon EC2 console, Elastic Block Store snapshots panel in the Description field, and in the Storage Gateway snapshot Details pane, Description field.


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

      A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value pair.

      Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag’s key is 128 characters, and the maximum length for a tag’s value is 256.


  • On success, responds with CreateSnapshotOutput with field(s):
    • volume_arn(Option<String>):

      The Amazon Resource Name (ARN) of the volume of which the snapshot was taken.

    • snapshot_id(Option<String>):

      The snapshot ID that is used to refer to the snapshot in future operations such as describing snapshots (Amazon Elastic Compute Cloud API DescribeSnapshots) or creating a volume from a snapshot (CreateStorediSCSIVolume).

  • On failure, responds with SdkError<CreateSnapshotError>
Source§

impl Client

Source

pub fn create_snapshot_from_volume_recovery_point( &self, ) -> CreateSnapshotFromVolumeRecoveryPointFluentBuilder

Constructs a fluent builder for the CreateSnapshotFromVolumeRecoveryPoint operation.

Source§

impl Client

Source

pub fn create_storedi_scsi_volume(&self) -> CreateStorediSCSIVolumeFluentBuilder

Constructs a fluent builder for the CreateStorediSCSIVolume operation.

Source§

impl Client

Source

pub fn create_tape_pool(&self) -> CreateTapePoolFluentBuilder

Constructs a fluent builder for the CreateTapePool operation.

Source§

impl Client

Source

pub fn create_tape_with_barcode(&self) -> CreateTapeWithBarcodeFluentBuilder

Constructs a fluent builder for the CreateTapeWithBarcode operation.

  • The fluent builder is configurable:
    • gateway_arn(impl Into<String>) / set_gateway_arn(Option<String>):
      required: true

      The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tape with. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.


    • tape_size_in_bytes(i64) / set_tape_size_in_bytes(Option<i64>):
      required: true

      The size, in bytes, of the virtual tape that you want to create.

      The size must be aligned by gigabyte (102410241024 bytes).


    • tape_barcode(impl Into<String>) / set_tape_barcode(Option<String>):
      required: true

      The barcode that you want to assign to the tape.

      Barcodes cannot be reused. This includes barcodes used for tapes that have been deleted.


    • kms_encrypted(bool) / set_kms_encrypted(Option<bool>):
      required: false

      Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3. Optional.

      Valid Values: true | false


    • kms_key(impl Into<String>) / set_kms_key(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. Storage Gateway does not support asymmetric CMKs. This value can only be set when KMSEncrypted is true. Optional.


    • pool_id(impl Into<String>) / set_pool_id(Option<String>):
      required: false

      The ID of the pool that you want to add your tape to for archiving. The tape in this pool is archived in the S3 storage class that is associated with the pool. When you use your backup application to eject the tape, the tape is archived directly into the storage class (S3 Glacier or S3 Deep Archive) that corresponds to the pool.


    • worm(bool) / set_worm(Option<bool>):
      required: false

      Set to TRUE if the tape you are creating is to be configured as a write-once-read-many (WORM) tape.


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

      A list of up to 50 tags that can be assigned to a virtual tape that has a barcode. Each tag is a key-value pair.

      Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag’s key is 128 characters, and the maximum length for a tag’s value is 256.


  • On success, responds with CreateTapeWithBarcodeOutput with field(s):
  • On failure, responds with SdkError<CreateTapeWithBarcodeError>
Source§

impl Client

Source

pub fn create_tapes(&self) -> CreateTapesFluentBuilder

Constructs a fluent builder for the CreateTapes operation.

Source§

impl Client

Source

pub fn delete_automatic_tape_creation_policy( &self, ) -> DeleteAutomaticTapeCreationPolicyFluentBuilder

Constructs a fluent builder for the DeleteAutomaticTapeCreationPolicy operation.

Source§

impl Client

Source

pub fn delete_bandwidth_rate_limit( &self, ) -> DeleteBandwidthRateLimitFluentBuilder

Constructs a fluent builder for the DeleteBandwidthRateLimit operation.

Source§

impl Client

Source

pub fn delete_cache_report(&self) -> DeleteCacheReportFluentBuilder

Constructs a fluent builder for the DeleteCacheReport operation.

Source§

impl Client

Source

pub fn delete_chap_credentials(&self) -> DeleteChapCredentialsFluentBuilder

Constructs a fluent builder for the DeleteChapCredentials operation.

Source§

impl Client

Source

pub fn delete_file_share(&self) -> DeleteFileShareFluentBuilder

Constructs a fluent builder for the DeleteFileShare operation.

Source§

impl Client

Source

pub fn delete_gateway(&self) -> DeleteGatewayFluentBuilder

Constructs a fluent builder for the DeleteGateway operation.

Source§

impl Client

Source

pub fn delete_snapshot_schedule(&self) -> DeleteSnapshotScheduleFluentBuilder

Constructs a fluent builder for the DeleteSnapshotSchedule operation.

Source§

impl Client

Source

pub fn delete_tape(&self) -> DeleteTapeFluentBuilder

Constructs a fluent builder for the DeleteTape operation.

Source§

impl Client

Source

pub fn delete_tape_archive(&self) -> DeleteTapeArchiveFluentBuilder

Constructs a fluent builder for the DeleteTapeArchive operation.

Source§

impl Client

Source

pub fn delete_tape_pool(&self) -> DeleteTapePoolFluentBuilder

Constructs a fluent builder for the DeleteTapePool 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_availability_monitor_test( &self, ) -> DescribeAvailabilityMonitorTestFluentBuilder

Constructs a fluent builder for the DescribeAvailabilityMonitorTest operation.

Source§

impl Client

Source

pub fn describe_bandwidth_rate_limit( &self, ) -> DescribeBandwidthRateLimitFluentBuilder

Constructs a fluent builder for the DescribeBandwidthRateLimit operation.

Source§

impl Client

Source

pub fn describe_bandwidth_rate_limit_schedule( &self, ) -> DescribeBandwidthRateLimitScheduleFluentBuilder

Constructs a fluent builder for the DescribeBandwidthRateLimitSchedule operation.

Source§

impl Client

Source

pub fn describe_cache(&self) -> DescribeCacheFluentBuilder

Constructs a fluent builder for the DescribeCache operation.

  • The fluent builder is configurable:
  • On success, responds with DescribeCacheOutput with field(s):
    • gateway_arn(Option<String>):

      The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

    • disk_ids(Option<Vec::<String>>):

      An array of strings that identify disks that are to be configured as working storage. Each string has a minimum length of 1 and maximum length of 300. You can get the disk IDs from the ListLocalDisks API.

    • cache_allocated_in_bytes(i64):

      The amount of cache in bytes allocated to a gateway.

    • cache_used_percentage(f64):

      Percent use of the gateway’s cache storage. This metric applies only to the gateway-cached volume setup. The sample is taken at the end of the reporting period.

    • cache_dirty_percentage(f64):

      The file share’s contribution to the overall percentage of the gateway’s cache that has not been persisted to Amazon Web Services. The sample is taken at the end of the reporting period.

    • cache_hit_percentage(f64):

      Percent of application read operations from the file shares that are served from cache. The sample is taken at the end of the reporting period.

    • cache_miss_percentage(f64):

      Percent of application read operations from the file shares that are not served from cache. The sample is taken at the end of the reporting period.

  • On failure, responds with SdkError<DescribeCacheError>
Source§

impl Client

Source

pub fn describe_cache_report(&self) -> DescribeCacheReportFluentBuilder

Constructs a fluent builder for the DescribeCacheReport operation.

Source§

impl Client

Source

pub fn describe_cachedi_scsi_volumes( &self, ) -> DescribeCachediSCSIVolumesFluentBuilder

Constructs a fluent builder for the DescribeCachediSCSIVolumes operation.

Source§

impl Client

Source

pub fn describe_chap_credentials(&self) -> DescribeChapCredentialsFluentBuilder

Constructs a fluent builder for the DescribeChapCredentials operation.

  • The fluent builder is configurable:
  • On success, responds with DescribeChapCredentialsOutput with field(s):
    • chap_credentials(Option<Vec::<ChapInfo>>):

      An array of ChapInfo objects that represent CHAP credentials. Each object in the array contains CHAP credential information for one target-initiator pair. If no CHAP credentials are set, an empty array is returned. CHAP credential information is provided in a JSON object with the following fields:

      • InitiatorName: The iSCSI initiator that connects to the target.

      • SecretToAuthenticateInitiator: The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.

      • SecretToAuthenticateTarget: The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).

      • TargetARN: The Amazon Resource Name (ARN) of the storage volume.

  • On failure, responds with SdkError<DescribeChapCredentialsError>
Source§

impl Client

Source

pub fn describe_file_system_associations( &self, ) -> DescribeFileSystemAssociationsFluentBuilder

Constructs a fluent builder for the DescribeFileSystemAssociations operation.

Source§

impl Client

Source

pub fn describe_gateway_information( &self, ) -> DescribeGatewayInformationFluentBuilder

Constructs a fluent builder for the DescribeGatewayInformation operation.

Source§

impl Client

Source

pub fn describe_maintenance_start_time( &self, ) -> DescribeMaintenanceStartTimeFluentBuilder

Constructs a fluent builder for the DescribeMaintenanceStartTime operation.

  • The fluent builder is configurable:
  • On success, responds with DescribeMaintenanceStartTimeOutput with field(s):
    • gateway_arn(Option<String>):

      The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

    • hour_of_day(Option<i32>):

      The hour component of the maintenance start time represented as hh, where hh is the hour (0 to 23). The hour of the day is in the time zone of the gateway.

    • minute_of_hour(Option<i32>):

      The minute component of the maintenance start time represented as mm, where mm is the minute (0 to 59). The minute of the hour is in the time zone of the gateway.

    • day_of_week(Option<i32>):

      An ordinal number between 0 and 6 that represents the day of the week, where 0 represents Sunday and 6 represents Saturday. The day of week is in the time zone of the gateway.

    • day_of_month(Option<i32>):

      The day of the month component of the maintenance start time represented as an ordinal number from 1 to 28, where 1 represents the first day of the month. It is not possible to set the maintenance schedule to start on days 29 through 31.

    • timezone(Option<String>):

      A value that indicates the time zone that is set for the gateway. The start time and day of week specified should be in the time zone of the gateway.

    • software_update_preferences(Option<SoftwareUpdatePreferences>):

      A set of variables indicating the software update preferences for the gateway.

      Includes AutomaticUpdatePolicy parameter with the following inputs:

      ALL_VERSIONS - Enables regular gateway maintenance updates.

      EMERGENCY_VERSIONS_ONLY - Disables regular gateway maintenance updates. The gateway will still receive emergency version updates on rare occasions if necessary to remedy highly critical security or durability issues. You will be notified before an emergency version update is applied. These updates are applied during your gateway’s scheduled maintenance window.

  • On failure, responds with SdkError<DescribeMaintenanceStartTimeError>
Source§

impl Client

Source

pub fn describe_nfs_file_shares(&self) -> DescribeNFSFileSharesFluentBuilder

Constructs a fluent builder for the DescribeNFSFileShares operation.

Source§

impl Client

Source

pub fn describe_smb_file_shares(&self) -> DescribeSMBFileSharesFluentBuilder

Constructs a fluent builder for the DescribeSMBFileShares operation.

Source§

impl Client

Source

pub fn describe_smb_settings(&self) -> DescribeSMBSettingsFluentBuilder

Constructs a fluent builder for the DescribeSMBSettings operation.

  • The fluent builder is configurable:
  • On success, responds with DescribeSmbSettingsOutput with field(s):
    • gateway_arn(Option<String>):

      The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

    • domain_name(Option<String>):

      The name of the domain that the gateway is joined to.

    • active_directory_status(Option<ActiveDirectoryStatus>):

      Indicates the status of a gateway that is a member of the Active Directory domain.

      This field is only used as part of a JoinDomain request. It is not affected by Active Directory connectivity changes that occur after the JoinDomain request succeeds.

      • ACCESS_DENIED: Indicates that the JoinDomain operation failed due to an authentication error.

      • DETACHED: Indicates that gateway is not joined to a domain.

      • JOINED: Indicates that the gateway has successfully joined a domain.

      • JOINING: Indicates that a JoinDomain operation is in progress.

      • NETWORK_ERROR: Indicates that JoinDomain operation failed due to a network or connectivity error.

      • TIMEOUT: Indicates that the JoinDomain operation failed because the operation didn’t complete within the allotted time.

      • UNKNOWN_ERROR: Indicates that the JoinDomain operation failed due to another type of error.

    • smb_guest_password_set(Option<bool>):

      This value is true if a password for the guest user smbguest is set, otherwise false. Only supported for S3 File Gateways.

      Valid Values: true | false

    • smb_security_strategy(Option<SmbSecurityStrategy>):

      The type of security strategy that was specified for file gateway.

      • ClientSpecified: If you choose this option, requests are established based on what is negotiated by the client. This option is recommended when you want to maximize compatibility across different clients in your environment. Supported only for S3 File Gateway.

      • MandatorySigning: If you choose this option, File Gateway only allows connections from SMBv2 or SMBv3 clients that have signing turned on. This option works with SMB clients on Microsoft Windows Vista, Windows Server 2008, or later.

      • MandatoryEncryption: If you choose this option, File Gateway only allows connections from SMBv3 clients that have encryption turned on. Both 256-bit and 128-bit algorithms are allowed. This option is recommended for environments that handle sensitive data. It works with SMB clients on Microsoft Windows 8, Windows Server 2012, or later.

      • MandatoryEncryptionNoAes128: If you choose this option, File Gateway only allows connections from SMBv3 clients that use 256-bit AES encryption algorithms. 128-bit algorithms are not allowed. This option is recommended for environments that handle sensitive data. It works with SMB clients on Microsoft Windows 8, Windows Server 2012, or later.

    • file_shares_visible(Option<bool>):

      The shares on this gateway appear when listing shares. Only supported for S3 File Gateways.

    • smb_local_groups(Option<SmbLocalGroups>):

      A list of Active Directory users and groups that have special permissions for SMB file shares on the gateway.

  • On failure, responds with SdkError<DescribeSMBSettingsError>
Source§

impl Client

Source

pub fn describe_snapshot_schedule( &self, ) -> DescribeSnapshotScheduleFluentBuilder

Constructs a fluent builder for the DescribeSnapshotSchedule operation.

Source§

impl Client

Source

pub fn describe_storedi_scsi_volumes( &self, ) -> DescribeStorediSCSIVolumesFluentBuilder

Constructs a fluent builder for the DescribeStorediSCSIVolumes operation.

  • The fluent builder is configurable:
  • On success, responds with DescribeStorediScsiVolumesOutput with field(s):
    • storedi_scsi_volumes(Option<Vec::<StorediScsiVolume>>):

      Describes a single unit of output from DescribeStorediSCSIVolumes. The following fields are returned:

      • ChapEnabled: Indicates whether mutual CHAP is enabled for the iSCSI target.

      • LunNumber: The logical disk number.

      • NetworkInterfaceId: The network interface ID of the stored volume that initiator use to map the stored volume as an iSCSI target.

      • NetworkInterfacePort: The port used to communicate with iSCSI targets.

      • PreservedExistingData: Indicates when the stored volume was created, existing data on the underlying local disk was preserved.

      • SourceSnapshotId: If the stored volume was created from a snapshot, this field contains the snapshot ID used, e.g. snap-1122aabb. Otherwise, this field is not included.

      • StorediSCSIVolumes: An array of StorediSCSIVolume objects where each object contains metadata about one stored volume.

      • TargetARN: The Amazon Resource Name (ARN) of the volume target.

      • VolumeARN: The Amazon Resource Name (ARN) of the stored volume.

      • VolumeDiskId: The disk ID of the local disk that was specified in the CreateStorediSCSIVolume operation.

      • VolumeId: The unique identifier of the storage volume, e.g. vol-1122AABB.

      • VolumeiSCSIAttributes: An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes for one stored volume.

      • VolumeProgress: Represents the percentage complete if the volume is restoring or bootstrapping that represents the percent of data transferred. This field does not appear in the response if the stored volume is not restoring or bootstrapping.

      • VolumeSizeInBytes: The size of the volume in bytes.

      • VolumeStatus: One of the VolumeStatus values that indicates the state of the volume.

      • VolumeType: One of the enumeration values describing the type of the volume. Currently, only STORED volumes are supported.

  • On failure, responds with SdkError<DescribeStorediSCSIVolumesError>
Source§

impl Client

Source

pub fn describe_tape_archives(&self) -> DescribeTapeArchivesFluentBuilder

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

  • The fluent builder is configurable:
  • On success, responds with DescribeTapeArchivesOutput with field(s):
    • tape_archives(Option<Vec::<TapeArchive>>):

      An array of virtual tape objects in the virtual tape shelf (VTS). The description includes of the Amazon Resource Name (ARN) of the virtual tapes. The information returned includes the Amazon Resource Names (ARNs) of the tapes, size of the tapes, status of the tapes, progress of the description, and tape barcode.

    • marker(Option<String>):

      An opaque string that indicates the position at which the virtual tapes that were fetched for description ended. Use this marker in your next request to fetch the next set of virtual tapes in the virtual tape shelf (VTS). If there are no more virtual tapes to describe, this field does not appear in the response.

  • On failure, responds with SdkError<DescribeTapeArchivesError>
Source§

impl Client

Source

pub fn describe_tape_recovery_points( &self, ) -> DescribeTapeRecoveryPointsFluentBuilder

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

Source§

impl Client

Source

pub fn describe_tapes(&self) -> DescribeTapesFluentBuilder

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

Source§

impl Client

Source

pub fn describe_upload_buffer(&self) -> DescribeUploadBufferFluentBuilder

Constructs a fluent builder for the DescribeUploadBuffer operation.

Source§

impl Client

Source

pub fn describe_vtl_devices(&self) -> DescribeVTLDevicesFluentBuilder

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

Source§

impl Client

Source

pub fn describe_working_storage(&self) -> DescribeWorkingStorageFluentBuilder

Constructs a fluent builder for the DescribeWorkingStorage operation.

Source§

impl Client

Source

pub fn detach_volume(&self) -> DetachVolumeFluentBuilder

Constructs a fluent builder for the DetachVolume operation.

Source§

impl Client

Source

pub fn disable_gateway(&self) -> DisableGatewayFluentBuilder

Constructs a fluent builder for the DisableGateway operation.

Source§

impl Client

Source

pub fn disassociate_file_system(&self) -> DisassociateFileSystemFluentBuilder

Constructs a fluent builder for the DisassociateFileSystem operation.

Source§

impl Client

Source

pub fn evict_files_failing_upload(&self) -> EvictFilesFailingUploadFluentBuilder

Constructs a fluent builder for the EvictFilesFailingUpload operation.

  • The fluent builder is configurable:
    • file_share_arn(impl Into<String>) / set_file_share_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the file share for which you want to start the cache clean operation.


    • force_remove(bool) / set_force_remove(Option<bool>):
      required: false

      Specifies whether cache entries with full or partial file data currently stored on the gateway will be forcibly removed by the cache clean operation.

      Valid arguments:

      • False - The cache clean operation skips cache entries failing upload if they are associated with data currently stored on the gateway. This preserves the cached data.

      • True - The cache clean operation removes cache entries failing upload even if they are associated with data currently stored on the gateway. This deletes the cached data.

        If ForceRemove is set to True, the cache clean operation will delete file data from the gateway which might otherwise be recoverable.


  • On success, responds with EvictFilesFailingUploadOutput with field(s):
    • notification_id(Option<String>):

      The randomly generated ID of the CloudWatch notification associated with the cache clean operation. This ID is in UUID format.

  • On failure, responds with SdkError<EvictFilesFailingUploadError>
Source§

impl Client

Source

pub fn join_domain(&self) -> JoinDomainFluentBuilder

Constructs a fluent builder for the JoinDomain operation.

  • The fluent builder is configurable:
  • On success, responds with JoinDomainOutput with field(s):
    • gateway_arn(Option<String>):

      The unique Amazon Resource Name (ARN) of the gateway that joined the domain.

    • active_directory_status(Option<ActiveDirectoryStatus>):

      Indicates the status of the gateway as a member of the Active Directory domain.

      This field is only used as part of a JoinDomain request. It is not affected by Active Directory connectivity changes that occur after the JoinDomain request succeeds.

      • ACCESS_DENIED: Indicates that the JoinDomain operation failed due to an authentication error.

      • DETACHED: Indicates that gateway is not joined to a domain.

      • JOINED: Indicates that the gateway has successfully joined a domain.

      • JOINING: Indicates that a JoinDomain operation is in progress.

      • INSUFFICIENT_PERMISSIONS: Indicates that the JoinDomain operation failed because the specified user lacks the necessary permissions to join the domain.

      • NETWORK_ERROR: Indicates that JoinDomain operation failed due to a network or connectivity error.

      • TIMEOUT: Indicates that the JoinDomain operation failed because the operation didn’t complete within the allotted time.

      • UNKNOWN_ERROR: Indicates that the JoinDomain operation failed due to another type of error.

  • On failure, responds with SdkError<JoinDomainError>
Source§

impl Client

Source

pub fn list_automatic_tape_creation_policies( &self, ) -> ListAutomaticTapeCreationPoliciesFluentBuilder

Constructs a fluent builder for the ListAutomaticTapeCreationPolicies operation.

Source§

impl Client

Source

pub fn list_cache_reports(&self) -> ListCacheReportsFluentBuilder

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

Source§

impl Client

Source

pub fn list_file_shares(&self) -> ListFileSharesFluentBuilder

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

Source§

impl Client

Source

pub fn list_file_system_associations( &self, ) -> ListFileSystemAssociationsFluentBuilder

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

Source§

impl Client

Source

pub fn list_gateways(&self) -> ListGatewaysFluentBuilder

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

Source§

impl Client

Source

pub fn list_local_disks(&self) -> ListLocalDisksFluentBuilder

Constructs a fluent builder for the ListLocalDisks 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 list_tape_pools(&self) -> ListTapePoolsFluentBuilder

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

Source§

impl Client

Source

pub fn list_tapes(&self) -> ListTapesFluentBuilder

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

Source§

impl Client

Source

pub fn list_volume_initiators(&self) -> ListVolumeInitiatorsFluentBuilder

Constructs a fluent builder for the ListVolumeInitiators operation.

Source§

impl Client

Source

pub fn list_volume_recovery_points( &self, ) -> ListVolumeRecoveryPointsFluentBuilder

Constructs a fluent builder for the ListVolumeRecoveryPoints operation.

Source§

impl Client

Source

pub fn list_volumes(&self) -> ListVolumesFluentBuilder

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

Source§

impl Client

Source

pub fn notify_when_uploaded(&self) -> NotifyWhenUploadedFluentBuilder

Constructs a fluent builder for the NotifyWhenUploaded operation.

Source§

impl Client

Source

pub fn refresh_cache(&self) -> RefreshCacheFluentBuilder

Constructs a fluent builder for the RefreshCache operation.

  • The fluent builder is configurable:
    • file_share_arn(impl Into<String>) / set_file_share_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the file share you want to refresh.


    • folder_list(impl Into<String>) / set_folder_list(Option<Vec::<String>>):
      required: false

      A comma-separated list of the paths of folders to refresh in the cache. The default is [“/”]. The default refreshes objects and folders at the root of the Amazon S3 bucket. If Recursive is set to true, the entire S3 bucket that the file share has access to is refreshed.

      Do not include / when specifying folder names. For example, you would specify samplefolder rather than samplefolder/.


    • recursive(bool) / set_recursive(Option<bool>):
      required: false

      A value that specifies whether to recursively refresh folders in the cache. The refresh includes folders that were in the cache the last time the gateway listed the folder’s contents. If this value set to true, each folder that is listed in FolderList is recursively updated. Otherwise, subfolders listed in FolderList are not refreshed. Only objects that are in folders listed directly under FolderList are found and used for the update. The default is true.

      Valid Values: true | false


  • On success, responds with RefreshCacheOutput with field(s):
  • On failure, responds with SdkError<RefreshCacheError>
Source§

impl Client

Source

pub fn remove_tags_from_resource(&self) -> RemoveTagsFromResourceFluentBuilder

Constructs a fluent builder for the RemoveTagsFromResource operation.

Source§

impl Client

Source

pub fn reset_cache(&self) -> ResetCacheFluentBuilder

Constructs a fluent builder for the ResetCache operation.

Source§

impl Client

Source

pub fn retrieve_tape_archive(&self) -> RetrieveTapeArchiveFluentBuilder

Constructs a fluent builder for the RetrieveTapeArchive operation.

Source§

impl Client

Source

pub fn retrieve_tape_recovery_point( &self, ) -> RetrieveTapeRecoveryPointFluentBuilder

Constructs a fluent builder for the RetrieveTapeRecoveryPoint operation.

Source§

impl Client

Source

pub fn set_local_console_password(&self) -> SetLocalConsolePasswordFluentBuilder

Constructs a fluent builder for the SetLocalConsolePassword operation.

Source§

impl Client

Source

pub fn set_smb_guest_password(&self) -> SetSMBGuestPasswordFluentBuilder

Constructs a fluent builder for the SetSMBGuestPassword operation.

Source§

impl Client

Source

pub fn shutdown_gateway(&self) -> ShutdownGatewayFluentBuilder

Constructs a fluent builder for the ShutdownGateway operation.

Source§

impl Client

Source

pub fn start_availability_monitor_test( &self, ) -> StartAvailabilityMonitorTestFluentBuilder

Constructs a fluent builder for the StartAvailabilityMonitorTest operation.

Source§

impl Client

Source

pub fn start_cache_report(&self) -> StartCacheReportFluentBuilder

Constructs a fluent builder for the StartCacheReport operation.

Source§

impl Client

Source

pub fn start_gateway(&self) -> StartGatewayFluentBuilder

Constructs a fluent builder for the StartGateway operation.

Source§

impl Client

Source

pub fn update_automatic_tape_creation_policy( &self, ) -> UpdateAutomaticTapeCreationPolicyFluentBuilder

Constructs a fluent builder for the UpdateAutomaticTapeCreationPolicy operation.

Source§

impl Client

Source

pub fn update_bandwidth_rate_limit( &self, ) -> UpdateBandwidthRateLimitFluentBuilder

Constructs a fluent builder for the UpdateBandwidthRateLimit operation.

Source§

impl Client

Source

pub fn update_bandwidth_rate_limit_schedule( &self, ) -> UpdateBandwidthRateLimitScheduleFluentBuilder

Constructs a fluent builder for the UpdateBandwidthRateLimitSchedule operation.

Source§

impl Client

Source

pub fn update_chap_credentials(&self) -> UpdateChapCredentialsFluentBuilder

Constructs a fluent builder for the UpdateChapCredentials operation.

Source§

impl Client

Source

pub fn update_file_system_association( &self, ) -> UpdateFileSystemAssociationFluentBuilder

Constructs a fluent builder for the UpdateFileSystemAssociation operation.

Source§

impl Client

Source

pub fn update_gateway_information( &self, ) -> UpdateGatewayInformationFluentBuilder

Constructs a fluent builder for the UpdateGatewayInformation operation.

Source§

impl Client

Source

pub fn update_gateway_software_now( &self, ) -> UpdateGatewaySoftwareNowFluentBuilder

Constructs a fluent builder for the UpdateGatewaySoftwareNow operation.

Source§

impl Client

Source

pub fn update_maintenance_start_time( &self, ) -> UpdateMaintenanceStartTimeFluentBuilder

Constructs a fluent builder for the UpdateMaintenanceStartTime operation.

Source§

impl Client

Source

pub fn update_nfs_file_share(&self) -> UpdateNFSFileShareFluentBuilder

Constructs a fluent builder for the UpdateNFSFileShare operation.

  • The fluent builder is configurable:
    • file_share_arn(impl Into<String>) / set_file_share_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the file share to be updated.


    • encryption_type(EncryptionType) / set_encryption_type(Option<EncryptionType>):
      required: false

      A value that specifies the type of server-side encryption that the file share will use for the data that it stores in Amazon S3.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.


    • kms_encrypted(bool) / set_kms_encrypted(Option<bool>):
      required: false

      Optional. Set to true to use Amazon S3 server-side encryption with your own KMS key (SSE-KMS), or false to use a key managed by Amazon S3 (SSE-S3). To use dual-layer encryption (DSSE-KMS), set the EncryptionType parameter instead.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.

      Valid Values: true | false


    • kms_key(impl Into<String>) / set_kms_key(Option<String>):
      required: false

      Optional. The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. Storage Gateway does not support asymmetric CMKs. This value must be set if KMSEncrypted is true, or if EncryptionType is SseKms or DsseKms.


    • nfs_file_share_defaults(NfsFileShareDefaults) / set_nfs_file_share_defaults(Option<NfsFileShareDefaults>):
      required: false

      The default values for the file share. Optional.


    • default_storage_class(impl Into<String>) / set_default_storage_class(Option<String>):
      required: false

      The default storage class for objects put into an Amazon S3 bucket by the S3 File Gateway. The default value is S3_STANDARD. Optional.

      Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING | S3_STANDARD_IA | S3_ONEZONE_IA


    • object_acl(ObjectAcl) / set_object_acl(Option<ObjectAcl>):
      required: false

      A value that sets the access control list (ACL) permission for objects in the S3 bucket that a S3 File Gateway puts objects into. The default value is private.


    • client_list(impl Into<String>) / set_client_list(Option<Vec::<String>>):
      required: false

      The list of clients that are allowed to access the S3 File Gateway. The list must contain either valid IP addresses or valid CIDR blocks.


    • squash(impl Into<String>) / set_squash(Option<String>):
      required: false

      The user mapped to anonymous user.

      Valid values are the following:

      • RootSquash: Only root is mapped to anonymous user.

      • NoSquash: No one is mapped to anonymous user.

      • AllSquash: Everyone is mapped to anonymous user.


    • read_only(bool) / set_read_only(Option<bool>):
      required: false

      A value that sets the write status of a file share. Set this value to true to set the write status to read-only, otherwise set to false.

      Valid Values: true | false


    • guess_mime_type_enabled(bool) / set_guess_mime_type_enabled(Option<bool>):
      required: false

      A value that enables guessing of the MIME type for uploaded objects based on file extensions. Set this value to true to enable MIME type guessing, otherwise set to false. The default value is true.

      Valid Values: true | false


    • requester_pays(bool) / set_requester_pays(Option<bool>):
      required: false

      A value that sets who pays the cost of the request and the cost associated with data download from the S3 bucket. If this value is set to true, the requester pays the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays the cost of storing data.

      RequesterPays is a configuration for the S3 bucket that backs the file share, so make sure that the configuration on the file share is the same as the S3 bucket configuration.

      Valid Values: true | false


    • file_share_name(impl Into<String>) / set_file_share_name(Option<String>):
      required: false

      The name of the file share. Optional.

      FileShareName must be set if an S3 prefix name is set in LocationARN, or if an access point or access point alias is used.

      A valid NFS file share name can only contain the following characters: a-z, A-Z, 0-9, -, ., and _.


    • cache_attributes(CacheAttributes) / set_cache_attributes(Option<CacheAttributes>):
      required: false

      Specifies refresh cache information for the file share.


    • notification_policy(impl Into<String>) / set_notification_policy(Option<String>):
      required: false

      The notification policy of the file share. SettlingTimeInSeconds controls the number of seconds to wait after the last point in time a client wrote to a file before generating an ObjectUploaded notification. Because clients can make many small writes to files, it’s best to set this parameter for as long as possible to avoid generating multiple notifications for the same file in a small time period.

      SettlingTimeInSeconds has no effect on the timing of the object uploading to Amazon S3, only the timing of the notification.

      This setting is not meant to specify an exact time at which the notification will be sent. In some cases, the gateway might require more than the specified delay time to generate and send notifications.

      The following example sets NotificationPolicy on with SettlingTimeInSeconds set to 60.

      {"Upload": {"SettlingTimeInSeconds": 60}}

      The following example sets NotificationPolicy off.

      {}


    • audit_destination_arn(impl Into<String>) / set_audit_destination_arn(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the storage used for audit logs.


  • On success, responds with UpdateNfsFileShareOutput with field(s):
  • On failure, responds with SdkError<UpdateNFSFileShareError>
Source§

impl Client

Source

pub fn update_smb_file_share(&self) -> UpdateSMBFileShareFluentBuilder

Constructs a fluent builder for the UpdateSMBFileShare operation.

  • The fluent builder is configurable:
    • file_share_arn(impl Into<String>) / set_file_share_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the SMB file share that you want to update.


    • encryption_type(EncryptionType) / set_encryption_type(Option<EncryptionType>):
      required: false

      A value that specifies the type of server-side encryption that the file share will use for the data that it stores in Amazon S3.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.


    • kms_encrypted(bool) / set_kms_encrypted(Option<bool>):
      required: false

      Optional. Set to true to use Amazon S3 server-side encryption with your own KMS key (SSE-KMS), or false to use a key managed by Amazon S3 (SSE-S3). To use dual-layer encryption (DSSE-KMS), set the EncryptionType parameter instead.

      We recommend using EncryptionType instead of KMSEncrypted to set the file share encryption method. You do not need to provide values for both parameters.

      If values for both parameters exist in the same request, then the specified encryption methods must not conflict. For example, if EncryptionType is SseS3, then KMSEncrypted must be false. If EncryptionType is SseKms or DsseKms, then KMSEncrypted must be true.

      Valid Values: true | false


    • kms_key(impl Into<String>) / set_kms_key(Option<String>):
      required: false

      Optional. The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. Storage Gateway does not support asymmetric CMKs. This value must be set if KMSEncrypted is true, or if EncryptionType is SseKms or DsseKms.


    • default_storage_class(impl Into<String>) / set_default_storage_class(Option<String>):
      required: false

      The default storage class for objects put into an Amazon S3 bucket by the S3 File Gateway. The default value is S3_STANDARD. Optional.

      Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING | S3_STANDARD_IA | S3_ONEZONE_IA


    • object_acl(ObjectAcl) / set_object_acl(Option<ObjectAcl>):
      required: false

      A value that sets the access control list (ACL) permission for objects in the S3 bucket that a S3 File Gateway puts objects into. The default value is private.


    • read_only(bool) / set_read_only(Option<bool>):
      required: false

      A value that sets the write status of a file share. Set this value to true to set write status to read-only, otherwise set to false.

      Valid Values: true | false


    • guess_mime_type_enabled(bool) / set_guess_mime_type_enabled(Option<bool>):
      required: false

      A value that enables guessing of the MIME type for uploaded objects based on file extensions. Set this value to true to enable MIME type guessing, otherwise set to false. The default value is true.

      Valid Values: true | false


    • requester_pays(bool) / set_requester_pays(Option<bool>):
      required: false

      A value that sets who pays the cost of the request and the cost associated with data download from the S3 bucket. If this value is set to true, the requester pays the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays the cost of storing data.

      RequesterPays is a configuration for the S3 bucket that backs the file share, so make sure that the configuration on the file share is the same as the S3 bucket configuration.

      Valid Values: true | false


    • smbacl_enabled(bool) / set_smbacl_enabled(Option<bool>):
      required: false

      Set this value to true to enable access control list (ACL) on the SMB file share. Set it to false to map file and directory permissions to the POSIX permissions.

      For more information, see Using Windows ACLs to limit SMB file share access in the Amazon S3 File Gateway User Guide.

      Valid Values: true | false


    • access_based_enumeration(bool) / set_access_based_enumeration(Option<bool>):
      required: false

      The files and folders on this share will only be visible to users with read access.


    • admin_user_list(impl Into<String>) / set_admin_user_list(Option<Vec::<String>>):
      required: false

      A list of users or groups in the Active Directory that have administrator rights to the file share. A group must be prefixed with the @ character. Acceptable formats include: DOMAIN\User1, user1, @group1, and @DOMAIN\group1. Can only be set if Authentication is set to ActiveDirectory.


    • valid_user_list(impl Into<String>) / set_valid_user_list(Option<Vec::<String>>):
      required: false

      A list of users or groups in the Active Directory that are allowed to access the file share. A group must be prefixed with the @ character. Acceptable formats include: DOMAIN\User1, user1, @group1, and @DOMAIN\group1. Can only be set if Authentication is set to ActiveDirectory.


    • invalid_user_list(impl Into<String>) / set_invalid_user_list(Option<Vec::<String>>):
      required: false

      A list of users or groups in the Active Directory that are not allowed to access the file share. A group must be prefixed with the @ character. Acceptable formats include: DOMAIN\User1, user1, @group1, and @DOMAIN\group1. Can only be set if Authentication is set to ActiveDirectory.


    • audit_destination_arn(impl Into<String>) / set_audit_destination_arn(Option<String>):
      required: false

      The Amazon Resource Name (ARN) of the storage used for audit logs.


    • case_sensitivity(CaseSensitivity) / set_case_sensitivity(Option<CaseSensitivity>):
      required: false

      The case of an object name in an Amazon S3 bucket. For ClientSpecified, the client determines the case sensitivity. For CaseSensitive, the gateway determines the case sensitivity. The default value is ClientSpecified.


    • file_share_name(impl Into<String>) / set_file_share_name(Option<String>):
      required: false

      The name of the file share. Optional.

      FileShareName must be set if an S3 prefix name is set in LocationARN, or if an access point or access point alias is used.

      A valid SMB file share name cannot contain the following characters: [,],#,;,<,>,:,,</code>,/,|,?,*,+, or ASCII control characters 1-31.


    • cache_attributes(CacheAttributes) / set_cache_attributes(Option<CacheAttributes>):
      required: false

      Specifies refresh cache information for the file share.


    • notification_policy(impl Into<String>) / set_notification_policy(Option<String>):
      required: false

      The notification policy of the file share. SettlingTimeInSeconds controls the number of seconds to wait after the last point in time a client wrote to a file before generating an ObjectUploaded notification. Because clients can make many small writes to files, it’s best to set this parameter for as long as possible to avoid generating multiple notifications for the same file in a small time period.

      SettlingTimeInSeconds has no effect on the timing of the object uploading to Amazon S3, only the timing of the notification.

      This setting is not meant to specify an exact time at which the notification will be sent. In some cases, the gateway might require more than the specified delay time to generate and send notifications.

      The following example sets NotificationPolicy on with SettlingTimeInSeconds set to 60.

      {"Upload": {"SettlingTimeInSeconds": 60}}

      The following example sets NotificationPolicy off.

      {}


    • oplocks_enabled(bool) / set_oplocks_enabled(Option<bool>):
      required: false

      Specifies whether opportunistic locking is enabled for the SMB file share.

      Enabling opportunistic locking on case-sensitive shares is not recommended for workloads that involve access to files with the same name in different case.

      Valid Values: true | false


  • On success, responds with UpdateSmbFileShareOutput with field(s):
  • On failure, responds with SdkError<UpdateSMBFileShareError>
Source§

impl Client

Source

pub fn update_smb_file_share_visibility( &self, ) -> UpdateSMBFileShareVisibilityFluentBuilder

Constructs a fluent builder for the UpdateSMBFileShareVisibility operation.

Source§

impl Client

Source

pub fn update_smb_local_groups(&self) -> UpdateSMBLocalGroupsFluentBuilder

Constructs a fluent builder for the UpdateSMBLocalGroups operation.

Source§

impl Client

Source

pub fn update_smb_security_strategy( &self, ) -> UpdateSMBSecurityStrategyFluentBuilder

Constructs a fluent builder for the UpdateSMBSecurityStrategy operation.

  • The fluent builder is configurable:
    • gateway_arn(impl Into<String>) / set_gateway_arn(Option<String>):
      required: true

      The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.


    • smb_security_strategy(SmbSecurityStrategy) / set_smb_security_strategy(Option<SmbSecurityStrategy>):
      required: true

      Specifies the type of security strategy.

      ClientSpecified: If you choose this option, requests are established based on what is negotiated by the client. This option is recommended when you want to maximize compatibility across different clients in your environment. Supported only for S3 File Gateway.

      MandatorySigning: If you choose this option, File Gateway only allows connections from SMBv2 or SMBv3 clients that have signing enabled. This option works with SMB clients on Microsoft Windows Vista, Windows Server 2008 or newer.

      MandatoryEncryption: If you choose this option, File Gateway only allows connections from SMBv3 clients that have encryption enabled. This option is recommended for environments that handle sensitive data. This option works with SMB clients on Microsoft Windows 8, Windows Server 2012 or newer.

      MandatoryEncryptionNoAes128: If you choose this option, File Gateway only allows connections from SMBv3 clients that use 256-bit AES encryption algorithms. 128-bit algorithms are not allowed. This option is recommended for environments that handle sensitive data. It works with SMB clients on Microsoft Windows 8, Windows Server 2012, or later.


  • On success, responds with UpdateSmbSecurityStrategyOutput with field(s):
    • gateway_arn(Option<String>):

      The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

  • On failure, responds with SdkError<UpdateSMBSecurityStrategyError>
Source§

impl Client

Source

pub fn update_snapshot_schedule(&self) -> UpdateSnapshotScheduleFluentBuilder

Constructs a fluent builder for the UpdateSnapshotSchedule operation.

Source§

impl Client

Source

pub fn update_vtl_device_type(&self) -> UpdateVTLDeviceTypeFluentBuilder

Constructs a fluent builder for the UpdateVTLDeviceType 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 in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

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.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate 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 Freeze for Client

§

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 T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,