pub struct Client { /* private fields */ }
Expand description
Client for FinSpace Public API
Client for invoking operations on FinSpace Public API. Each operation on FinSpace Public API 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_finspacedata::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_finspacedata::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 AssociateUserToPermissionGroup
operation has
a Client::associate_user_to_permission_group
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.associate_user_to_permission_group()
.permission_group_id("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
impl Client
Sourcepub fn associate_user_to_permission_group(
&self,
) -> AssociateUserToPermissionGroupFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn associate_user_to_permission_group( &self, ) -> AssociateUserToPermissionGroupFluentBuilder
Constructs a fluent builder for the AssociateUserToPermissionGroup
operation.
- The fluent builder is configurable:
permission_group_id(impl Into<String>)
/set_permission_group_id(Option<String>)
:
required: trueThe unique identifier for the permission group.
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier for the user.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
AssociateUserToPermissionGroupOutput
with field(s):status_code(i32)
:The returned status code of the response.
- On failure, responds with
SdkError<AssociateUserToPermissionGroupError>
Source§impl Client
impl Client
Sourcepub fn create_changeset(&self) -> CreateChangesetFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn create_changeset(&self) -> CreateChangesetFluentBuilder
Constructs a fluent builder for the CreateChangeset
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for the FinSpace Dataset where the Changeset will be created.
change_type(ChangeType)
/set_change_type(Option<ChangeType>)
:
required: trueThe option to indicate how a Changeset will be applied to a Dataset.
-
REPLACE
– Changeset will be considered as a replacement to all prior loaded Changesets. -
APPEND
– Changeset will be considered as an addition to the end of all prior loaded Changesets. -
MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
-
source_params(impl Into<String>, impl Into<String>)
/set_source_params(Option<HashMap::<String, String>>)
:
required: trueOptions that define the location of the data being ingested (
s3SourcePath
) and the source of the changeset (sourceType
).Both
s3SourcePath
andsourceType
are required attributes.Here is an example of how you could specify the
sourceParams
:“sourceParams”: { “s3SourcePath”: “s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv”, “sourceType”: “S3” }
The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see Loading data from an Amazon S3 Bucket using the FinSpace API section.
format_params(impl Into<String>, impl Into<String>)
/set_format_params(Option<HashMap::<String, String>>)
:
required: trueOptions that define the structure of the source file(s) including the format type (
formatType
), header row (withHeader
), data separation character (separator
) and the type of compression (compression
).formatType
is a required attribute and can have the following values:-
PARQUET
– Parquet source file format. -
CSV
– CSV source file format. -
JSON
– JSON source file format. -
XML
– XML source file format.
Here is an example of how you could specify the
formatParams
:“formatParams”: { “formatType”: “CSV”, “withHeader”: “true”, “separator”: “,”, “compression”:“None” }
Note that if you only provide
formatType
asCSV
, the rest of the attributes will automatically default to CSV values as following:{ “withHeader”: “true”, “separator”: “,” }
For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.
-
- On success, responds with
CreateChangesetOutput
with field(s):dataset_id(Option<String>)
:The unique identifier for the FinSpace Dataset where the Changeset is created.
changeset_id(Option<String>)
:The unique identifier of the Changeset that is created.
- On failure, responds with
SdkError<CreateChangesetError>
Source§impl Client
impl Client
Sourcepub fn create_data_view(&self) -> CreateDataViewFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn create_data_view(&self) -> CreateDataViewFluentBuilder
Constructs a fluent builder for the CreateDataView
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique Dataset identifier that is used to create a Dataview.
auto_update(bool)
/set_auto_update(Option<bool>)
:
required: falseFlag to indicate Dataview should be updated automatically.
sort_columns(impl Into<String>)
/set_sort_columns(Option<Vec::<String>>)
:
required: falseColumns to be used for sorting the data.
partition_columns(impl Into<String>)
/set_partition_columns(Option<Vec::<String>>)
:
required: falseOrdered set of column names used to partition data.
as_of_timestamp(i64)
/set_as_of_timestamp(Option<i64>)
:
required: falseBeginning time to use for the Dataview. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
destination_type_params(DataViewDestinationTypeParams)
/set_destination_type_params(Option<DataViewDestinationTypeParams>)
:
required: trueOptions that define the destination type for the Dataview.
- On success, responds with
CreateDataViewOutput
with field(s):dataset_id(Option<String>)
:The unique identifier of the Dataset used for the Dataview.
data_view_id(Option<String>)
:The unique identifier for the created Dataview.
- On failure, responds with
SdkError<CreateDataViewError>
Source§impl Client
impl Client
Sourcepub fn create_dataset(&self) -> CreateDatasetFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn create_dataset(&self) -> CreateDatasetFluentBuilder
Constructs a fluent builder for the CreateDataset
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
dataset_title(impl Into<String>)
/set_dataset_title(Option<String>)
:
required: trueDisplay title for a FinSpace Dataset.
kind(DatasetKind)
/set_kind(Option<DatasetKind>)
:
required: trueThe format in which Dataset data is structured.
-
TABULAR
– Data is structured in a tabular format. -
NON_TABULAR
– Data is structured in a non-tabular format.
-
dataset_description(impl Into<String>)
/set_dataset_description(Option<String>)
:
required: falseDescription of a Dataset.
owner_info(DatasetOwnerInfo)
/set_owner_info(Option<DatasetOwnerInfo>)
:
required: falseContact information for a Dataset owner.
permission_group_params(PermissionGroupParams)
/set_permission_group_params(Option<PermissionGroupParams>)
:
required: truePermission group parameters for Dataset permissions.
alias(impl Into<String>)
/set_alias(Option<String>)
:
required: falseThe unique resource identifier for a Dataset.
schema_definition(SchemaUnion)
/set_schema_definition(Option<SchemaUnion>)
:
required: falseDefinition for a schema on a tabular Dataset.
- On success, responds with
CreateDatasetOutput
with field(s):dataset_id(Option<String>)
:The unique identifier for the created Dataset.
- On failure, responds with
SdkError<CreateDatasetError>
Source§impl Client
impl Client
Sourcepub fn create_permission_group(&self) -> CreatePermissionGroupFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn create_permission_group(&self) -> CreatePermissionGroupFluentBuilder
Constructs a fluent builder for the CreatePermissionGroup
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the permission group.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description for the permission group.
application_permissions(ApplicationPermission)
/set_application_permissions(Option<Vec::<ApplicationPermission>>)
:
required: trueThe option to indicate FinSpace application permissions that are granted to a specific group.
When assigning application permissions, be aware that the permission
ManageUsersAndGroups
allows users to grant themselves or others access to any functionality in their FinSpace environment’s application. It should only be granted to trusted users.-
CreateDataset
– Group members can create new datasets. -
ManageClusters
– Group members can manage Apache Spark clusters from FinSpace notebooks. -
ManageUsersAndGroups
– Group members can manage users and permission groups. This is a privileged permission that allows users to grant themselves or others access to any functionality in the application. It should only be granted to trusted users. -
ManageAttributeSets
– Group members can manage attribute sets. -
ViewAuditData
– Group members can view audit data. -
AccessNotebooks
– Group members will have access to FinSpace notebooks. -
GetTemporaryCredentials
– Group members can get temporary API credentials.
-
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
CreatePermissionGroupOutput
with field(s):permission_group_id(Option<String>)
:The unique identifier for the permission group.
- On failure, responds with
SdkError<CreatePermissionGroupError>
Source§impl Client
impl Client
Sourcepub fn create_user(&self) -> CreateUserFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn create_user(&self) -> CreateUserFluentBuilder
Constructs a fluent builder for the CreateUser
operation.
- The fluent builder is configurable:
email_address(impl Into<String>)
/set_email_address(Option<String>)
:
required: trueThe email address of the user that you want to register. The email address serves as a uniquer identifier for each user and cannot be changed after it’s created.
r#type(UserType)
/set_type(Option<UserType>)
:
required: trueThe option to indicate the type of user. Use one of the following options to specify this parameter:
-
SUPER_USER
– A user with permission to all the functionality and data in FinSpace. -
APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by adding them to a permission group.
-
first_name(impl Into<String>)
/set_first_name(Option<String>)
:
required: falseThe first name of the user that you want to register.
last_name(impl Into<String>)
/set_last_name(Option<String>)
:
required: falseThe last name of the user that you want to register.
api_access(ApiAccess)
/set_api_access(Option<ApiAccess>)
:
required: falseThe option to indicate whether the user can use the
GetProgrammaticAccessCredentials
API to obtain credentials that can then be used to access other FinSpace Data API operations.-
ENABLED
– The user has permissions to use the APIs. -
DISABLED
– The user does not have permissions to use any APIs.
-
api_access_principal_arn(impl Into<String>)
/set_api_access_principal_arn(Option<String>)
:
required: falseThe ARN identifier of an AWS user or role that is allowed to call the
GetProgrammaticAccessCredentials
API to obtain a credentials token for a specific FinSpace user. This must be an IAM role within your FinSpace account.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
CreateUserOutput
with field(s):user_id(Option<String>)
:The unique identifier for the user.
- On failure, responds with
SdkError<CreateUserError>
Source§impl Client
impl Client
Sourcepub fn delete_dataset(&self) -> DeleteDatasetFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn delete_dataset(&self) -> DeleteDatasetFluentBuilder
Constructs a fluent builder for the DeleteDataset
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier of the Dataset to be deleted.
- On success, responds with
DeleteDatasetOutput
with field(s):dataset_id(Option<String>)
:The unique identifier for the deleted Dataset.
- On failure, responds with
SdkError<DeleteDatasetError>
Source§impl Client
impl Client
Sourcepub fn delete_permission_group(&self) -> DeletePermissionGroupFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn delete_permission_group(&self) -> DeletePermissionGroupFluentBuilder
Constructs a fluent builder for the DeletePermissionGroup
operation.
- The fluent builder is configurable:
permission_group_id(impl Into<String>)
/set_permission_group_id(Option<String>)
:
required: trueThe unique identifier for the permission group that you want to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
DeletePermissionGroupOutput
with field(s):permission_group_id(Option<String>)
:The unique identifier for the deleted permission group.
- On failure, responds with
SdkError<DeletePermissionGroupError>
Source§impl Client
impl Client
Sourcepub fn disable_user(&self) -> DisableUserFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn disable_user(&self) -> DisableUserFluentBuilder
Constructs a fluent builder for the DisableUser
operation.
- The fluent builder is configurable:
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier for the user that you want to deactivate.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
DisableUserOutput
with field(s):user_id(Option<String>)
:The unique identifier for the deactivated user.
- On failure, responds with
SdkError<DisableUserError>
Source§impl Client
impl Client
Sourcepub fn disassociate_user_from_permission_group(
&self,
) -> DisassociateUserFromPermissionGroupFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn disassociate_user_from_permission_group( &self, ) -> DisassociateUserFromPermissionGroupFluentBuilder
Constructs a fluent builder for the DisassociateUserFromPermissionGroup
operation.
- The fluent builder is configurable:
permission_group_id(impl Into<String>)
/set_permission_group_id(Option<String>)
:
required: trueThe unique identifier for the permission group.
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier for the user.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
DisassociateUserFromPermissionGroupOutput
with field(s):status_code(i32)
:The returned status code of the response.
- On failure, responds with
SdkError<DisassociateUserFromPermissionGroupError>
Source§impl Client
impl Client
Sourcepub fn enable_user(&self) -> EnableUserFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn enable_user(&self) -> EnableUserFluentBuilder
Constructs a fluent builder for the EnableUser
operation.
- The fluent builder is configurable:
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier for the user that you want to activate.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
EnableUserOutput
with field(s):user_id(Option<String>)
:The unique identifier for the active user.
- On failure, responds with
SdkError<EnableUserError>
Source§impl Client
impl Client
Sourcepub fn get_changeset(&self) -> GetChangesetFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_changeset(&self) -> GetChangesetFluentBuilder
Constructs a fluent builder for the GetChangeset
operation.
- The fluent builder is configurable:
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for the FinSpace Dataset where the Changeset is created.
changeset_id(impl Into<String>)
/set_changeset_id(Option<String>)
:
required: trueThe unique identifier of the Changeset for which to get data.
- On success, responds with
GetChangesetOutput
with field(s):changeset_id(Option<String>)
:The unique identifier for a Changeset.
changeset_arn(Option<String>)
:The ARN identifier of the Changeset.
dataset_id(Option<String>)
:The unique identifier for the FinSpace Dataset where the Changeset is created.
change_type(Option<ChangeType>)
:Type that indicates how a Changeset is applied to a Dataset.
-
REPLACE
– Changeset is considered as a replacement to all prior loaded Changesets. -
APPEND
– Changeset is considered as an addition to the end of all prior loaded Changesets. -
MODIFY
– Changeset is considered as a replacement to a specific prior ingested Changeset.
-
source_params(Option<HashMap::<String, String>>)
:Options that define the location of the data being ingested.
format_params(Option<HashMap::<String, String>>)
:Structure of the source file(s).
create_time(i64)
:The timestamp at which the Changeset was created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
status(Option<IngestionStatus>)
:The status of Changeset creation operation.
error_info(Option<ChangesetErrorInfo>)
:The structure with error messages.
active_until_timestamp(Option<i64>)
:Time until which the Changeset is active. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
active_from_timestamp(Option<i64>)
:Beginning time from which the Changeset is active. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
updates_changeset_id(Option<String>)
:The unique identifier of the Changeset that is being updated.
updated_by_changeset_id(Option<String>)
:The unique identifier of the updated Changeset.
- On failure, responds with
SdkError<GetChangesetError>
Source§impl Client
impl Client
Sourcepub fn get_data_view(&self) -> GetDataViewFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_data_view(&self) -> GetDataViewFluentBuilder
Constructs a fluent builder for the GetDataView
operation.
- The fluent builder is configurable:
data_view_id(impl Into<String>)
/set_data_view_id(Option<String>)
:
required: trueThe unique identifier for the Dataview.
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for the Dataset used in the Dataview.
- On success, responds with
GetDataViewOutput
with field(s):auto_update(bool)
:Flag to indicate Dataview should be updated automatically.
partition_columns(Option<Vec::<String>>)
:Ordered set of column names used to partition data.
dataset_id(Option<String>)
:The unique identifier for the Dataset used in the Dataview.
as_of_timestamp(Option<i64>)
:Time range to use for the Dataview. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
error_info(Option<DataViewErrorInfo>)
:Information about an error that occurred for the Dataview.
last_modified_time(i64)
:The last time that a Dataview was modified. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
create_time(i64)
:The timestamp at which the Dataview was created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
sort_columns(Option<Vec::<String>>)
:Columns to be used for sorting the data.
data_view_id(Option<String>)
:The unique identifier for the Dataview.
data_view_arn(Option<String>)
:The ARN identifier of the Dataview.
destination_type_params(Option<DataViewDestinationTypeParams>)
:Options that define the destination type for the Dataview.
status(Option<DataViewStatus>)
:The status of a Dataview creation.
-
RUNNING
– Dataview creation is running. -
STARTING
– Dataview creation is starting. -
FAILED
– Dataview creation has failed. -
CANCELLED
– Dataview creation has been cancelled. -
TIMEOUT
– Dataview creation has timed out. -
SUCCESS
– Dataview creation has succeeded. -
PENDING
– Dataview creation is pending. -
FAILED_CLEANUP_FAILED
– Dataview creation failed and resource cleanup failed.
-
- On failure, responds with
SdkError<GetDataViewError>
Source§impl Client
impl Client
Sourcepub fn get_dataset(&self) -> GetDatasetFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_dataset(&self) -> GetDatasetFluentBuilder
Constructs a fluent builder for the GetDataset
operation.
- The fluent builder is configurable:
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for a Dataset.
- On success, responds with
GetDatasetOutput
with field(s):dataset_id(Option<String>)
:The unique identifier for a Dataset.
dataset_arn(Option<String>)
:The ARN identifier of the Dataset.
dataset_title(Option<String>)
:Display title for a Dataset.
kind(Option<DatasetKind>)
:The format in which Dataset data is structured.
-
TABULAR
– Data is structured in a tabular format. -
NON_TABULAR
– Data is structured in a non-tabular format.
-
dataset_description(Option<String>)
:A description of the Dataset.
create_time(i64)
:The timestamp at which the Dataset was created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
last_modified_time(i64)
:The last time that the Dataset was modified. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
schema_definition(Option<SchemaUnion>)
:Definition for a schema on a tabular Dataset.
alias(Option<String>)
:The unique resource identifier for a Dataset.
status(Option<DatasetStatus>)
:Status of the Dataset creation.
-
PENDING
– Dataset is pending creation. -
FAILED
– Dataset creation has failed. -
SUCCESS
– Dataset creation has succeeded. -
RUNNING
– Dataset creation is running.
-
- On failure, responds with
SdkError<GetDatasetError>
Source§impl Client
impl Client
Sourcepub fn get_external_data_view_access_details(
&self,
) -> GetExternalDataViewAccessDetailsFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_external_data_view_access_details( &self, ) -> GetExternalDataViewAccessDetailsFluentBuilder
Constructs a fluent builder for the GetExternalDataViewAccessDetails
operation.
- The fluent builder is configurable:
data_view_id(impl Into<String>)
/set_data_view_id(Option<String>)
:
required: trueThe unique identifier for the Dataview that you want to access.
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for the Dataset.
- On success, responds with
GetExternalDataViewAccessDetailsOutput
with field(s):credentials(Option<AwsCredentials>)
:The credentials required to access the external Dataview from the S3 location.
s3_location(Option<S3Location>)
:The location where the external Dataview is stored.
- On failure, responds with
SdkError<GetExternalDataViewAccessDetailsError>
Source§impl Client
impl Client
Sourcepub fn get_permission_group(&self) -> GetPermissionGroupFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_permission_group(&self) -> GetPermissionGroupFluentBuilder
Constructs a fluent builder for the GetPermissionGroup
operation.
- The fluent builder is configurable:
permission_group_id(impl Into<String>)
/set_permission_group_id(Option<String>)
:
required: trueThe unique identifier for the permission group.
- On success, responds with
GetPermissionGroupOutput
with field(s):permission_group(Option<PermissionGroup>)
:The structure for a permission group.
- On failure, responds with
SdkError<GetPermissionGroupError>
Source§impl Client
impl Client
Sourcepub fn get_programmatic_access_credentials(
&self,
) -> GetProgrammaticAccessCredentialsFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_programmatic_access_credentials( &self, ) -> GetProgrammaticAccessCredentialsFluentBuilder
Constructs a fluent builder for the GetProgrammaticAccessCredentials
operation.
- The fluent builder is configurable:
duration_in_minutes(i64)
/set_duration_in_minutes(Option<i64>)
:
required: falseThe time duration in which the credentials remain valid.
environment_id(impl Into<String>)
/set_environment_id(Option<String>)
:
required: trueThe FinSpace environment identifier.
- On success, responds with
GetProgrammaticAccessCredentialsOutput
with field(s):credentials(Option<Credentials>)
:Returns the programmatic credentials.
duration_in_minutes(Option<i64>)
:Returns the duration in which the credentials will remain valid.
- On failure, responds with
SdkError<GetProgrammaticAccessCredentialsError>
Source§impl Client
impl Client
Sourcepub fn get_user(&self) -> GetUserFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_user(&self) -> GetUserFluentBuilder
Constructs a fluent builder for the GetUser
operation.
- The fluent builder is configurable:
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier of the user to get data for.
- On success, responds with
GetUserOutput
with field(s):user_id(Option<String>)
:The unique identifier for the user that is retrieved.
status(Option<UserStatus>)
:The current status of the user.
-
CREATING
– The creation is in progress. -
ENABLED
– The user is created and is currently active. -
DISABLED
– The user is currently inactive.
-
first_name(Option<String>)
:The first name of the user.
last_name(Option<String>)
:The last name of the user.
email_address(Option<String>)
:The email address that is associated with the user.
r#type(Option<UserType>)
:Indicates the type of user.
-
SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
-
APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by adding them to a permission group.
-
api_access(Option<ApiAccess>)
:Indicates whether the user can use the
GetProgrammaticAccessCredentials
API to obtain credentials that can then be used to access other FinSpace Data API operations.-
ENABLED
– The user has permissions to use the APIs. -
DISABLED
– The user does not have permissions to use any APIs.
-
api_access_principal_arn(Option<String>)
:The ARN identifier of an AWS user or role that is allowed to call the
GetProgrammaticAccessCredentials
API to obtain a credentials token for a specific FinSpace user. This must be an IAM role within your FinSpace account.create_time(i64)
:The timestamp at which the user was created in FinSpace. The value is determined as epoch time in milliseconds.
last_enabled_time(i64)
:Describes the last time the user was activated. The value is determined as epoch time in milliseconds.
last_disabled_time(i64)
:Describes the last time the user was deactivated. The value is determined as epoch time in milliseconds.
last_modified_time(i64)
:Describes the last time the user details were updated. The value is determined as epoch time in milliseconds.
last_login_time(i64)
:Describes the last time that the user logged into their account. The value is determined as epoch time in milliseconds.
- On failure, responds with
SdkError<GetUserError>
Source§impl Client
impl Client
Sourcepub fn get_working_location(&self) -> GetWorkingLocationFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn get_working_location(&self) -> GetWorkingLocationFluentBuilder
Constructs a fluent builder for the GetWorkingLocation
operation.
- The fluent builder is configurable:
location_type(LocationType)
/set_location_type(Option<LocationType>)
:
required: falseSpecify the type of the working location.
-
SAGEMAKER
– Use the Amazon S3 location as a temporary location to store data content when working with FinSpace Notebooks that run on SageMaker studio. -
INGESTION
– Use the Amazon S3 location as a staging location to copy your data content and then use the location with the Changeset creation operation.
-
- On success, responds with
GetWorkingLocationOutput
with field(s):s3_uri(Option<String>)
:Returns the Amazon S3 URI for the working location.
s3_path(Option<String>)
:Returns the Amazon S3 Path for the working location.
s3_bucket(Option<String>)
:Returns the Amazon S3 bucket name for the working location.
- On failure, responds with
SdkError<GetWorkingLocationError>
Source§impl Client
impl Client
Sourcepub fn list_changesets(&self) -> ListChangesetsFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn list_changesets(&self) -> ListChangesetsFluentBuilder
Constructs a fluent builder for the ListChangesets
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for the FinSpace Dataset to which the Changeset belongs.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token that indicates where a results page should begin.
- On success, responds with
ListChangesetsOutput
with field(s):changesets(Option<Vec::<ChangesetSummary>>)
:List of Changesets found.
next_token(Option<String>)
:A token that indicates where a results page should begin.
- On failure, responds with
SdkError<ListChangesetsError>
Source§impl Client
impl Client
Sourcepub fn list_data_views(&self) -> ListDataViewsFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn list_data_views(&self) -> ListDataViewsFluentBuilder
Constructs a fluent builder for the ListDataViews
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier of the Dataset for which to retrieve Dataviews.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token that indicates where a results page should begin.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results per page.
- On success, responds with
ListDataViewsOutput
with field(s):next_token(Option<String>)
:A token that indicates where a results page should begin.
data_views(Option<Vec::<DataViewSummary>>)
:A list of Dataviews.
- On failure, responds with
SdkError<ListDataViewsError>
Source§impl Client
impl Client
Sourcepub fn list_datasets(&self) -> ListDatasetsFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn list_datasets(&self) -> ListDatasetsFluentBuilder
Constructs a fluent builder for the ListDatasets
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token that indicates where a results page should begin.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results per page.
- On success, responds with
ListDatasetsOutput
with field(s):datasets(Option<Vec::<Dataset>>)
:List of Datasets.
next_token(Option<String>)
:A token that indicates where a results page should begin.
- On failure, responds with
SdkError<ListDatasetsError>
Source§impl Client
impl Client
Sourcepub fn list_permission_groups(&self) -> ListPermissionGroupsFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn list_permission_groups(&self) -> ListPermissionGroupsFluentBuilder
Constructs a fluent builder for the ListPermissionGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token that indicates where a results page should begin.
max_results(i32)
/set_max_results(Option<i32>)
:
required: trueThe maximum number of results per page.
- On success, responds with
ListPermissionGroupsOutput
with field(s):permission_groups(Option<Vec::<PermissionGroup>>)
:A list of all the permission groups.
next_token(Option<String>)
:A token that indicates where a results page should begin.
- On failure, responds with
SdkError<ListPermissionGroupsError>
Source§impl Client
impl Client
Sourcepub fn list_permission_groups_by_user(
&self,
) -> ListPermissionGroupsByUserFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn list_permission_groups_by_user( &self, ) -> ListPermissionGroupsByUserFluentBuilder
Constructs a fluent builder for the ListPermissionGroupsByUser
operation.
- The fluent builder is configurable:
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier for the user.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token that indicates where a results page should begin.
max_results(i32)
/set_max_results(Option<i32>)
:
required: trueThe maximum number of results per page.
- On success, responds with
ListPermissionGroupsByUserOutput
with field(s):permission_groups(Option<Vec::<PermissionGroupByUser>>)
:A list of returned permission groups.
next_token(Option<String>)
:A token that indicates where a results page should begin.
- On failure, responds with
SdkError<ListPermissionGroupsByUserError>
Source§impl Client
impl Client
Sourcepub fn list_users(&self) -> ListUsersFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn list_users(&self) -> ListUsersFluentBuilder
Constructs a fluent builder for the ListUsers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token that indicates where a results page should begin.
max_results(i32)
/set_max_results(Option<i32>)
:
required: trueThe maximum number of results per page.
- On success, responds with
ListUsersOutput
with field(s):users(Option<Vec::<User>>)
:A list of all the users.
next_token(Option<String>)
:A token that indicates where a results page should begin.
- On failure, responds with
SdkError<ListUsersError>
Source§impl Client
impl Client
Sourcepub fn list_users_by_permission_group(
&self,
) -> ListUsersByPermissionGroupFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn list_users_by_permission_group( &self, ) -> ListUsersByPermissionGroupFluentBuilder
Constructs a fluent builder for the ListUsersByPermissionGroup
operation.
- The fluent builder is configurable:
permission_group_id(impl Into<String>)
/set_permission_group_id(Option<String>)
:
required: trueThe unique identifier for the permission group.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseA token that indicates where a results page should begin.
max_results(i32)
/set_max_results(Option<i32>)
:
required: trueThe maximum number of results per page.
- On success, responds with
ListUsersByPermissionGroupOutput
with field(s):users(Option<Vec::<UserByPermissionGroup>>)
:Lists details of all users in a specific permission group.
next_token(Option<String>)
:A token that indicates where a results page should begin.
- On failure, responds with
SdkError<ListUsersByPermissionGroupError>
Source§impl Client
impl Client
Sourcepub fn reset_user_password(&self) -> ResetUserPasswordFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn reset_user_password(&self) -> ResetUserPasswordFluentBuilder
Constructs a fluent builder for the ResetUserPassword
operation.
- The fluent builder is configurable:
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier of the user that a temporary password is requested for.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
ResetUserPasswordOutput
with field(s):user_id(Option<String>)
:The unique identifier of the user that a new password is generated for.
temporary_password(Option<String>)
:A randomly generated temporary password for the requested user. This password expires in 7 days.
- On failure, responds with
SdkError<ResetUserPasswordError>
Source§impl Client
impl Client
Sourcepub fn update_changeset(&self) -> UpdateChangesetFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn update_changeset(&self) -> UpdateChangesetFluentBuilder
Constructs a fluent builder for the UpdateChangeset
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for the FinSpace Dataset in which the Changeset is created.
changeset_id(impl Into<String>)
/set_changeset_id(Option<String>)
:
required: trueThe unique identifier for the Changeset to update.
source_params(impl Into<String>, impl Into<String>)
/set_source_params(Option<HashMap::<String, String>>)
:
required: trueOptions that define the location of the data being ingested (
s3SourcePath
) and the source of the changeset (sourceType
).Both
s3SourcePath
andsourceType
are required attributes.Here is an example of how you could specify the
sourceParams
:“sourceParams”: { “s3SourcePath”: “s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv”, “sourceType”: “S3” }
The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see Loading data from an Amazon S3 Bucket using the FinSpace APIsection.
format_params(impl Into<String>, impl Into<String>)
/set_format_params(Option<HashMap::<String, String>>)
:
required: trueOptions that define the structure of the source file(s) including the format type (
formatType
), header row (withHeader
), data separation character (separator
) and the type of compression (compression
).formatType
is a required attribute and can have the following values:-
PARQUET
– Parquet source file format. -
CSV
– CSV source file format. -
JSON
– JSON source file format. -
XML
– XML source file format.
Here is an example of how you could specify the
formatParams
:“formatParams”: { “formatType”: “CSV”, “withHeader”: “true”, “separator”: “,”, “compression”:“None” }
Note that if you only provide
formatType
asCSV
, the rest of the attributes will automatically default to CSV values as following:{ “withHeader”: “true”, “separator”: “,” }
For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.
-
- On success, responds with
UpdateChangesetOutput
with field(s):changeset_id(Option<String>)
:The unique identifier for the Changeset to update.
dataset_id(Option<String>)
:The unique identifier for the FinSpace Dataset in which the Changeset is created.
- On failure, responds with
SdkError<UpdateChangesetError>
Source§impl Client
impl Client
Sourcepub fn update_dataset(&self) -> UpdateDatasetFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn update_dataset(&self) -> UpdateDatasetFluentBuilder
Constructs a fluent builder for the UpdateDataset
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
dataset_id(impl Into<String>)
/set_dataset_id(Option<String>)
:
required: trueThe unique identifier for the Dataset to update.
dataset_title(impl Into<String>)
/set_dataset_title(Option<String>)
:
required: trueA display title for the Dataset.
kind(DatasetKind)
/set_kind(Option<DatasetKind>)
:
required: trueThe format in which the Dataset data is structured.
-
TABULAR
– Data is structured in a tabular format. -
NON_TABULAR
– Data is structured in a non-tabular format.
-
dataset_description(impl Into<String>)
/set_dataset_description(Option<String>)
:
required: falseA description for the Dataset.
alias(impl Into<String>)
/set_alias(Option<String>)
:
required: falseThe unique resource identifier for a Dataset.
schema_definition(SchemaUnion)
/set_schema_definition(Option<SchemaUnion>)
:
required: falseDefinition for a schema on a tabular Dataset.
- On success, responds with
UpdateDatasetOutput
with field(s):dataset_id(Option<String>)
:The unique identifier for updated Dataset.
- On failure, responds with
SdkError<UpdateDatasetError>
Source§impl Client
impl Client
Sourcepub fn update_permission_group(&self) -> UpdatePermissionGroupFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn update_permission_group(&self) -> UpdatePermissionGroupFluentBuilder
Constructs a fluent builder for the UpdatePermissionGroup
operation.
- The fluent builder is configurable:
permission_group_id(impl Into<String>)
/set_permission_group_id(Option<String>)
:
required: trueThe unique identifier for the permission group to update.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the permission group.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description for the permission group.
application_permissions(ApplicationPermission)
/set_application_permissions(Option<Vec::<ApplicationPermission>>)
:
required: falseThe permissions that are granted to a specific group for accessing the FinSpace application.
When assigning application permissions, be aware that the permission
ManageUsersAndGroups
allows users to grant themselves or others access to any functionality in their FinSpace environment’s application. It should only be granted to trusted users.-
CreateDataset
– Group members can create new datasets. -
ManageClusters
– Group members can manage Apache Spark clusters from FinSpace notebooks. -
ManageUsersAndGroups
– Group members can manage users and permission groups. This is a privileged permission that allows users to grant themselves or others access to any functionality in the application. It should only be granted to trusted users. -
ManageAttributeSets
– Group members can manage attribute sets. -
ViewAuditData
– Group members can view audit data. -
AccessNotebooks
– Group members will have access to FinSpace notebooks. -
GetTemporaryCredentials
– Group members can get temporary API credentials.
-
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
UpdatePermissionGroupOutput
with field(s):permission_group_id(Option<String>)
:The unique identifier for the updated permission group.
- On failure, responds with
SdkError<UpdatePermissionGroupError>
Source§impl Client
impl Client
Sourcepub fn update_user(&self) -> UpdateUserFluentBuilder
👎Deprecated: This method will be discontinued.
pub fn update_user(&self) -> UpdateUserFluentBuilder
Constructs a fluent builder for the UpdateUser
operation.
- The fluent builder is configurable:
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueThe unique identifier for the user that you want to update.
r#type(UserType)
/set_type(Option<UserType>)
:
required: falseThe option to indicate the type of user.
-
SUPER_USER
– A user with permission to all the functionality and data in FinSpace. -
APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by adding them to a permission group.
-
first_name(impl Into<String>)
/set_first_name(Option<String>)
:
required: falseThe first name of the user.
last_name(impl Into<String>)
/set_last_name(Option<String>)
:
required: falseThe last name of the user.
api_access(ApiAccess)
/set_api_access(Option<ApiAccess>)
:
required: falseThe option to indicate whether the user can use the
GetProgrammaticAccessCredentials
API to obtain credentials that can then be used to access other FinSpace Data API operations.-
ENABLED
– The user has permissions to use the APIs. -
DISABLED
– The user does not have permissions to use any APIs.
-
api_access_principal_arn(impl Into<String>)
/set_api_access_principal_arn(Option<String>)
:
required: falseThe ARN identifier of an AWS user or role that is allowed to call the
GetProgrammaticAccessCredentials
API to obtain a credentials token for a specific FinSpace user. This must be an IAM role within your FinSpace account.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA token that ensures idempotency. This token expires in 10 minutes.
- On success, responds with
UpdateUserOutput
with field(s):user_id(Option<String>)
:The unique identifier of the updated user.
- On failure, responds with
SdkError<UpdateUserError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
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
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
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 thesleep_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 thehttp_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, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
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 bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
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>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
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 rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
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 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.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
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);