Struct aws_sdk_amp::Client
source · pub struct Client { /* private fields */ }Expand description
Client for Amazon Prometheus Service
Client for invoking operations on Amazon Prometheus Service. Each operation on Amazon Prometheus Service 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_amp::Client::new(&config);Occasionally, SDKs may have additional service-specific that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Config struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_amp::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 ListTagsForResource operation has
a Client::list_tags_for_resource, 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.list_tags_for_resource()
.resource_arn("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 create_alert_manager_definition(
&self
) -> CreateAlertManagerDefinitionFluentBuilder
pub fn create_alert_manager_definition( &self ) -> CreateAlertManagerDefinitionFluentBuilder
Constructs a fluent builder for the CreateAlertManagerDefinition operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace in which to create the alert manager definition.data(Blob)/set_data(Option<Blob>):
required: true
The alert manager definition data.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
CreateAlertManagerDefinitionOutputwith field(s):status(Option<AlertManagerDefinitionStatus>): The status of alert manager definition.
- On failure, responds with
SdkError<CreateAlertManagerDefinitionError>
source§impl Client
impl Client
sourcepub fn create_logging_configuration(
&self
) -> CreateLoggingConfigurationFluentBuilder
pub fn create_logging_configuration( &self ) -> CreateLoggingConfigurationFluentBuilder
Constructs a fluent builder for the CreateLoggingConfiguration operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to vend logs to.log_group_arn(impl Into<String>)/set_log_group_arn(Option<String>):
required: true
The ARN of the CW log group to which the vended log data will be published.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
CreateLoggingConfigurationOutputwith field(s):status(Option<LoggingConfigurationStatus>): The status of the logging configuration.
- On failure, responds with
SdkError<CreateLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn create_rule_groups_namespace(
&self
) -> CreateRuleGroupsNamespaceFluentBuilder
pub fn create_rule_groups_namespace( &self ) -> CreateRuleGroupsNamespaceFluentBuilder
Constructs a fluent builder for the CreateRuleGroupsNamespace operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace in which to create the rule group namespace.name(impl Into<String>)/set_name(Option<String>):
required: true
The rule groups namespace name.data(Blob)/set_data(Option<Blob>):
required: true
The namespace data that define the rule groups.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Optional, user-provided tags for this rule groups namespace.
- On success, responds with
CreateRuleGroupsNamespaceOutputwith field(s):name(String): The rule groups namespace name.arn(String): The Amazon Resource Name (ARN) of this rule groups namespace.status(Option<RuleGroupsNamespaceStatus>): The status of rule groups namespace.tags(Option<HashMap::<String, String>>): The tags of this rule groups namespace.
- On failure, responds with
SdkError<CreateRuleGroupsNamespaceError>
source§impl Client
impl Client
sourcepub fn create_scraper(&self) -> CreateScraperFluentBuilder
pub fn create_scraper(&self) -> CreateScraperFluentBuilder
Constructs a fluent builder for the CreateScraper operation.
- The fluent builder is configurable:
alias(impl Into<String>)/set_alias(Option<String>):
required: false
An optional user-assigned alias for this scraper. This alias is for user reference and does not need to be unique.scrape_configuration(ScrapeConfiguration)/set_scrape_configuration(Option<ScrapeConfiguration>):
required: true
The configuration used to create the scraper.source(Source)/set_source(Option<Source>):
required: true
The source that the scraper will be discovering and collecting metrics from.destination(Destination)/set_destination(Option<Destination>):
required: true
The destination that the scraper will be producing metrics to.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Optional, user-provided tags for this scraper.
- On success, responds with
CreateScraperOutputwith field(s):scraper_id(String): The generated ID of the scraper that was just created.arn(String): The ARN of the scraper that was just created.status(Option<ScraperStatus>): The status of the scraper that was just created (usually CREATING).tags(Option<HashMap::<String, String>>): The tags of this scraper.
- On failure, responds with
SdkError<CreateScraperError>
source§impl Client
impl Client
sourcepub fn create_workspace(&self) -> CreateWorkspaceFluentBuilder
pub fn create_workspace(&self) -> CreateWorkspaceFluentBuilder
Constructs a fluent builder for the CreateWorkspace operation.
- The fluent builder is configurable:
alias(impl Into<String>)/set_alias(Option<String>):
required: false
An optional user-assigned alias for this workspace. This alias is for user reference and does not need to be unique.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Optional, user-provided tags for this workspace.kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):
required: false
Optional, customer managed KMS key used to encrypt data for this workspace
- On success, responds with
CreateWorkspaceOutputwith field(s):workspace_id(String): The generated ID of the workspace that was just created.arn(String): The ARN of the workspace that was just created.status(Option<WorkspaceStatus>): The status of the workspace that was just created (usually CREATING).tags(Option<HashMap::<String, String>>): The tags of this workspace.kms_key_arn(Option<String>): Customer managed KMS key ARN for this workspace
- On failure, responds with
SdkError<CreateWorkspaceError>
source§impl Client
impl Client
sourcepub fn delete_alert_manager_definition(
&self
) -> DeleteAlertManagerDefinitionFluentBuilder
pub fn delete_alert_manager_definition( &self ) -> DeleteAlertManagerDefinitionFluentBuilder
Constructs a fluent builder for the DeleteAlertManagerDefinition operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace in which to delete the alert manager definition.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
DeleteAlertManagerDefinitionOutput - On failure, responds with
SdkError<DeleteAlertManagerDefinitionError>
source§impl Client
impl Client
sourcepub fn delete_logging_configuration(
&self
) -> DeleteLoggingConfigurationFluentBuilder
pub fn delete_logging_configuration( &self ) -> DeleteLoggingConfigurationFluentBuilder
Constructs a fluent builder for the DeleteLoggingConfiguration operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to vend logs to.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
DeleteLoggingConfigurationOutput - On failure, responds with
SdkError<DeleteLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn delete_rule_groups_namespace(
&self
) -> DeleteRuleGroupsNamespaceFluentBuilder
pub fn delete_rule_groups_namespace( &self ) -> DeleteRuleGroupsNamespaceFluentBuilder
Constructs a fluent builder for the DeleteRuleGroupsNamespace operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to delete rule group definition.name(impl Into<String>)/set_name(Option<String>):
required: true
The rule groups namespace name.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
DeleteRuleGroupsNamespaceOutput - On failure, responds with
SdkError<DeleteRuleGroupsNamespaceError>
source§impl Client
impl Client
sourcepub fn delete_scraper(&self) -> DeleteScraperFluentBuilder
pub fn delete_scraper(&self) -> DeleteScraperFluentBuilder
Constructs a fluent builder for the DeleteScraper operation.
- The fluent builder is configurable:
scraper_id(impl Into<String>)/set_scraper_id(Option<String>):
required: true
The ID of the scraper to delete.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
DeleteScraperOutputwith field(s):scraper_id(String): The ID of the scraper that was deleted.status(Option<ScraperStatus>): The status of the scraper that is being deleted.
- On failure, responds with
SdkError<DeleteScraperError>
source§impl Client
impl Client
sourcepub fn delete_workspace(&self) -> DeleteWorkspaceFluentBuilder
pub fn delete_workspace(&self) -> DeleteWorkspaceFluentBuilder
Constructs a fluent builder for the DeleteWorkspace operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to delete.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
DeleteWorkspaceOutput - On failure, responds with
SdkError<DeleteWorkspaceError>
source§impl Client
impl Client
sourcepub fn describe_alert_manager_definition(
&self
) -> DescribeAlertManagerDefinitionFluentBuilder
pub fn describe_alert_manager_definition( &self ) -> DescribeAlertManagerDefinitionFluentBuilder
Constructs a fluent builder for the DescribeAlertManagerDefinition operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to describe.
- On success, responds with
DescribeAlertManagerDefinitionOutputwith field(s):alert_manager_definition(Option<AlertManagerDefinitionDescription>): The properties of the selected workspace’s alert manager definition.
- On failure, responds with
SdkError<DescribeAlertManagerDefinitionError>
source§impl Client
impl Client
sourcepub fn describe_logging_configuration(
&self
) -> DescribeLoggingConfigurationFluentBuilder
pub fn describe_logging_configuration( &self ) -> DescribeLoggingConfigurationFluentBuilder
Constructs a fluent builder for the DescribeLoggingConfiguration operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to vend logs to.
- On success, responds with
DescribeLoggingConfigurationOutputwith field(s):logging_configuration(Option<LoggingConfigurationMetadata>): Metadata object containing information about the logging configuration of a workspace.
- On failure, responds with
SdkError<DescribeLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn describe_rule_groups_namespace(
&self
) -> DescribeRuleGroupsNamespaceFluentBuilder
pub fn describe_rule_groups_namespace( &self ) -> DescribeRuleGroupsNamespaceFluentBuilder
Constructs a fluent builder for the DescribeRuleGroupsNamespace operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to describe.name(impl Into<String>)/set_name(Option<String>):
required: true
The rule groups namespace.
- On success, responds with
DescribeRuleGroupsNamespaceOutputwith field(s):rule_groups_namespace(Option<RuleGroupsNamespaceDescription>): The selected rule groups namespace.
- On failure, responds with
SdkError<DescribeRuleGroupsNamespaceError>
source§impl Client
impl Client
sourcepub fn describe_scraper(&self) -> DescribeScraperFluentBuilder
pub fn describe_scraper(&self) -> DescribeScraperFluentBuilder
Constructs a fluent builder for the DescribeScraper operation.
- The fluent builder is configurable:
scraper_id(impl Into<String>)/set_scraper_id(Option<String>):
required: true
The IDs of the scraper to describe.
- On success, responds with
DescribeScraperOutputwith field(s):scraper(Option<ScraperDescription>): The properties of the selected scrapers.
- On failure, responds with
SdkError<DescribeScraperError>
source§impl Client
impl Client
sourcepub fn describe_workspace(&self) -> DescribeWorkspaceFluentBuilder
pub fn describe_workspace(&self) -> DescribeWorkspaceFluentBuilder
Constructs a fluent builder for the DescribeWorkspace operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to describe.
- On success, responds with
DescribeWorkspaceOutputwith field(s):workspace(Option<WorkspaceDescription>): The properties of the selected workspace.
- On failure, responds with
SdkError<DescribeWorkspaceError>
source§impl Client
impl Client
sourcepub fn get_default_scraper_configuration(
&self
) -> GetDefaultScraperConfigurationFluentBuilder
pub fn get_default_scraper_configuration( &self ) -> GetDefaultScraperConfigurationFluentBuilder
Constructs a fluent builder for the GetDefaultScraperConfiguration operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetDefaultScraperConfigurationOutputwith field(s):configuration(Blob): The default configuration.
- On failure, responds with
SdkError<GetDefaultScraperConfigurationError>
source§impl Client
impl Client
sourcepub fn list_rule_groups_namespaces(
&self
) -> ListRuleGroupsNamespacesFluentBuilder
pub fn list_rule_groups_namespaces( &self ) -> ListRuleGroupsNamespacesFluentBuilder
Constructs a fluent builder for the ListRuleGroupsNamespaces operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace.name(impl Into<String>)/set_name(Option<String>):
required: false
Optional filter for rule groups namespace name. Only the rule groups namespace that begin with this value will be returned.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListRuleGroupsNamespaces request.max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum results to return in response (default=100, maximum=1000).
- On success, responds with
ListRuleGroupsNamespacesOutputwith field(s):rule_groups_namespaces(Vec::<RuleGroupsNamespaceSummary>): The list of the selected rule groups namespaces.next_token(Option<String>): Pagination token to use when requesting the next page in this list.
- On failure, responds with
SdkError<ListRuleGroupsNamespacesError>
source§impl Client
impl Client
sourcepub fn list_scrapers(&self) -> ListScrapersFluentBuilder
pub fn list_scrapers(&self) -> ListScrapersFluentBuilder
Constructs a fluent builder for the ListScrapers operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(impl Into<String>, Vec::<String>)/set_filters(Option<HashMap::<String, Vec::<String>>>):
required: false
A list of scraper filters.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListScrapers request.max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum results to return in response (default=100, maximum=1000).
- On success, responds with
ListScrapersOutputwith field(s):scrapers(Vec::<ScraperSummary>): The list of scrapers, filtered down if a set of filters was provided in the request.next_token(Option<String>): Pagination token to use when requesting the next page in this list.
- On failure, responds with
SdkError<ListScrapersError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: true
The ARN of the resource.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>): The list of tags assigned to the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn list_workspaces(&self) -> ListWorkspacesFluentBuilder
pub fn list_workspaces(&self) -> ListWorkspacesFluentBuilder
Constructs a fluent builder for the ListWorkspaces operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListWorkspaces request.alias(impl Into<String>)/set_alias(Option<String>):
required: false
Optional filter for workspace alias. Only the workspaces with aliases that begin with this value will be returned.max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum results to return in response (default=100, maximum=1000).
- On success, responds with
ListWorkspacesOutputwith field(s):workspaces(Vec::<WorkspaceSummary>): The list of existing workspaces, including those undergoing creation or deletion.next_token(Option<String>): Pagination token to use when requesting the next page in this list.
- On failure, responds with
SdkError<ListWorkspacesError>
source§impl Client
impl Client
sourcepub fn put_alert_manager_definition(
&self
) -> PutAlertManagerDefinitionFluentBuilder
pub fn put_alert_manager_definition( &self ) -> PutAlertManagerDefinitionFluentBuilder
Constructs a fluent builder for the PutAlertManagerDefinition operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace in which to update the alert manager definition.data(Blob)/set_data(Option<Blob>):
required: true
The alert manager definition data.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
PutAlertManagerDefinitionOutputwith field(s):status(Option<AlertManagerDefinitionStatus>): The status of alert manager definition.
- On failure, responds with
SdkError<PutAlertManagerDefinitionError>
source§impl Client
impl Client
sourcepub fn put_rule_groups_namespace(&self) -> PutRuleGroupsNamespaceFluentBuilder
pub fn put_rule_groups_namespace(&self) -> PutRuleGroupsNamespaceFluentBuilder
Constructs a fluent builder for the PutRuleGroupsNamespace operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace in which to update the rule group namespace.name(impl Into<String>)/set_name(Option<String>):
required: true
The rule groups namespace name.data(Blob)/set_data(Option<Blob>):
required: true
The namespace data that define the rule groups.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
PutRuleGroupsNamespaceOutputwith field(s):name(String): The rule groups namespace name.arn(String): The Amazon Resource Name (ARN) of this rule groups namespace.status(Option<RuleGroupsNamespaceStatus>): The status of rule groups namespace.tags(Option<HashMap::<String, String>>): The tags of this rule groups namespace.
- On failure, responds with
SdkError<PutRuleGroupsNamespaceError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: true
The ARN of the resource.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: true
The list of tags assigned to the resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: true
The ARN of the resource.tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: true
One or more tag keys
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_logging_configuration(
&self
) -> UpdateLoggingConfigurationFluentBuilder
pub fn update_logging_configuration( &self ) -> UpdateLoggingConfigurationFluentBuilder
Constructs a fluent builder for the UpdateLoggingConfiguration operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace to vend logs to.log_group_arn(impl Into<String>)/set_log_group_arn(Option<String>):
required: true
The ARN of the CW log group to which the vended log data will be published.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
UpdateLoggingConfigurationOutputwith field(s):status(Option<LoggingConfigurationStatus>): The status of the logging configuration.
- On failure, responds with
SdkError<UpdateLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn update_workspace_alias(&self) -> UpdateWorkspaceAliasFluentBuilder
pub fn update_workspace_alias(&self) -> UpdateWorkspaceAliasFluentBuilder
Constructs a fluent builder for the UpdateWorkspaceAlias operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)/set_workspace_id(Option<String>):
required: true
The ID of the workspace being updated.alias(impl Into<String>)/set_alias(Option<String>):
required: false
The new alias of the workspace.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
UpdateWorkspaceAliasOutput - On failure, responds with
SdkError<UpdateWorkspaceAliasError>
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_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis 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_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.