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 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 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: trueThe ID of the workspace to add the alert manager definition to.
data(Blob)
/set_data(Option<Blob>)
:
required: trueThe alert manager definition to add. A base64-encoded version of the YAML alert manager definition file.
For details about the alert manager definition, see AlertManagedDefinitionData.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- On success, responds with
CreateAlertManagerDefinitionOutput
with field(s):status(Option<AlertManagerDefinitionStatus>)
:A structure that displays the current status of the 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: trueThe ID of the workspace to create the logging configuration for.
log_group_arn(impl Into<String>)
/set_log_group_arn(Option<String>)
:
required: trueThe ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this API.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- On success, responds with
CreateLoggingConfigurationOutput
with field(s):status(Option<LoggingConfigurationStatus>)
:A structure that displays the current 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: trueThe ID of the workspace to add the rule groups namespace.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name for the new rule groups namespace.
data(Blob)
/set_data(Option<Blob>)
:
required: trueThe rules file to use in the new namespace.
Contains the base64-encoded version of the YAML rules file.
For details about the rule groups namespace structure, see RuleGroupsNamespaceData.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe list of tag keys and values to associate with the rule groups namespace.
- On success, responds with
CreateRuleGroupsNamespaceOutput
with field(s):name(String)
:The name of the new rule groups namespace.
arn(String)
:The Amazon Resource Name (ARN) of the new rule groups namespace.
status(Option<RuleGroupsNamespaceStatus>)
:A structure that returns the current status of the rule groups namespace.
tags(Option<HashMap::<String, String>>)
:The list of tag keys and values that are associated with the 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(optional) a name to associate with the scraper. This is for your use, and does not need to be unique.
scrape_configuration(ScrapeConfiguration)
/set_scrape_configuration(Option<ScrapeConfiguration>)
:
required: trueThe configuration file to use in the new scraper. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User Guide.
source(Source)
/set_source(Option<Source>)
:
required: trueThe Amazon EKS cluster from which the scraper will collect metrics.
destination(Destination)
/set_destination(Option<Destination>)
:
required: trueThe Amazon Managed Service for Prometheus workspace to send metrics to.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: false(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: false(Optional) The list of tag keys and values to associate with the scraper.
- On success, responds with
CreateScraperOutput
with field(s):scraper_id(String)
:The ID of the new scraper.
arn(String)
:The Amazon Resource Name (ARN) of the new scraper.
status(Option<ScraperStatus>)
:A structure that displays the current status of the scraper.
tags(Option<HashMap::<String, String>>)
:The list of tag keys and values that are associated with the 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: falseAn alias that you assign to this workspace to help you identify it. It does not need to be unique.
Blank spaces at the beginning or end of the alias that you specify will be trimmed from the value used.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe list of tag keys and values to associate with the workspace.
kms_key_arn(impl Into<String>)
/set_kms_key_arn(Option<String>)
:
required: false(optional) The ARN for a customer managed KMS key to use for encrypting data within your workspace. For more information about using your own key in your workspace, see Encryption at rest in the Amazon Managed Service for Prometheus User Guide.
- On success, responds with
CreateWorkspaceOutput
with field(s):workspace_id(String)
:The unique ID for the new workspace.
arn(String)
:The ARN for the new workspace.
status(Option<WorkspaceStatus>)
:The current status of the new workspace. Immediately after you create the workspace, the status is usually
CREATING
.tags(Option<HashMap::<String, String>>)
:The list of tag keys and values that are associated with the workspace.
kms_key_arn(Option<String>)
:(optional) If the workspace was created with a customer managed KMS key, the ARN for the key used.
- 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: trueThe ID of the workspace to delete the alert manager definition from.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- 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: trueThe ID of the workspace containing the logging configuration to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- 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: trueThe ID of the workspace containing the rule groups namespace and definition to delete.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the rule groups namespace to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- 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: trueThe ID of the scraper to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: false(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.
- On success, responds with
DeleteScraperOutput
with field(s):scraper_id(String)
:The ID of the scraper to delete.
status(Option<ScraperStatus>)
:The current status of the scraper.
- 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: trueThe ID of the workspace to delete.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- 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: trueThe ID of the workspace to retrieve the alert manager definition from.
- On success, responds with
DescribeAlertManagerDefinitionOutput
with field(s):alert_manager_definition(Option<AlertManagerDefinitionDescription>)
:The 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: trueThe ID of the workspace to describe the logging configuration for.
- On success, responds with
DescribeLoggingConfigurationOutput
with field(s):logging_configuration(Option<LoggingConfigurationMetadata>)
:A structure that displays the information about the logging configuration.
- 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: trueThe ID of the workspace containing the rule groups namespace.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the rule groups namespace that you want information for.
- On success, responds with
DescribeRuleGroupsNamespaceOutput
with field(s):rule_groups_namespace(Option<RuleGroupsNamespaceDescription>)
:The information about the 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: trueThe ID of the scraper to describe.
- On success, responds with
DescribeScraperOutput
with field(s):scraper(Option<ScraperDescription>)
:Contains details about the scraper.
- 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: trueThe ID of the workspace to describe.
- On success, responds with
DescribeWorkspaceOutput
with field(s):workspace(Option<WorkspaceDescription>)
:A structure that contains details about the 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
send
it. - On success, responds with
GetDefaultScraperConfigurationOutput
with field(s):configuration(Blob)
:The configuration file. Base 64 encoded. For more information, see Scraper configurationin the Amazon Managed Service for Prometheus User Guide.
- 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: trueThe ID of the workspace containing the rule groups namespaces.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseUse this parameter to filter the rule groups namespaces that are returned. Only the namespaces with names that begin with the value that you specify are returned.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of items to return. You receive this token from a previous call, and use it to get the next page of results. The other parameters must be the same as the initial call.
For example, if your initial request has
maxResults
of 10, and there are 12 rule groups namespaces to return, then your initial request will return 10 and anextToken
. Using the next token in a subsequent call will return the remaining 2 namespaces.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return. The default is 100.
- On success, responds with
ListRuleGroupsNamespacesOutput
with field(s):rule_groups_namespaces(Vec::<RuleGroupsNamespaceSummary>)
:The returned list of rule groups namespaces.
next_token(Option<String>)
:A token indicating that there are more results to retrieve. You can use this token as part of your next
ListRuleGroupsNamespaces
request to retrieve those results.
- 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(Optional) A list of key-value pairs to filter the list of scrapers returned. Keys include
status
,sourceArn
,destinationArn
, andalias
.Filters on the same key are
OR
’d together, and filters on different keys areAND
’d together. For example,status=ACTIVE&status=CREATING&alias=Test
, will return all scrapers that have the alias Test, and are either in status ACTIVE or CREATING.To find all active scrapers that are sending metrics to a specific Amazon Managed Service for Prometheus workspace, you would use the ARN of the workspace in a query:
status=ACTIVE&destinationArn=arn:aws:aps:us-east-1:123456789012:workspace/ws-example1-1234-abcd-56ef-123456789012
If this is included, it filters the results to only the scrapers that match the filter.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: false(Optional) The token for the next set of items to return. (You received this token from a previous call.)
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseOptional) The maximum number of scrapers to return in one
ListScrapers
operation. The range is 1-1000.If you omit this parameter, the default of 100 is used.
- On success, responds with
ListScrapersOutput
with field(s):scrapers(Vec::<ScraperSummary>)
:A list of
ScraperSummary
structures giving information about scrapers in the account that match the filters provided.next_token(Option<String>)
:A token indicating that there are more results to retrieve. You can use this token as part of your next
ListScrapers
operation to retrieve those results.
- 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: trueThe ARN of the resource to list tages for. Must be a workspace or rule groups namespace resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The list of tag keys and values associated with 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: falseThe token for the next set of items to return. You receive this token from a previous call, and use it to get the next page of results. The other parameters must be the same as the initial call.
For example, if your initial request has
maxResults
of 10, and there are 12 workspaces to return, then your initial request will return 10 and anextToken
. Using the next token in a subsequent call will return the remaining 2 workspaces.alias(impl Into<String>)
/set_alias(Option<String>)
:
required: falseIf this is included, it filters the results to only the workspaces with names that start with the value that you specify here.
Amazon Managed Service for Prometheus will automatically strip any blank spaces from the beginning and end of the alias that you specify.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of workspaces to return per request. The default is 100.
- On success, responds with
ListWorkspacesOutput
with field(s):workspaces(Vec::<WorkspaceSummary>)
:An array of
WorkspaceSummary
structures containing information about the workspaces requested.next_token(Option<String>)
:A token indicating that there are more results to retrieve. You can use this token as part of your next
ListWorkspaces
request to retrieve those results.
- 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: trueThe ID of the workspace to update the alert manager definition in.
data(Blob)
/set_data(Option<Blob>)
:
required: trueThe alert manager definition to use. A base64-encoded version of the YAML alert manager definition file.
For details about the alert manager definition, see AlertManagedDefinitionData.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- On success, responds with
PutAlertManagerDefinitionOutput
with field(s):status(Option<AlertManagerDefinitionStatus>)
:A structure that returns the current status of the 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: trueThe ID of the workspace where you are updating the rule groups namespace.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the rule groups namespace that you are updating.
data(Blob)
/set_data(Option<Blob>)
:
required: trueThe new rules file to use in the namespace. A base64-encoded version of the YAML rule groups file.
For details about the rule groups namespace structure, see RuleGroupsNamespaceData.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- On success, responds with
PutRuleGroupsNamespaceOutput
with field(s):name(String)
:The name of the rule groups namespace that was updated.
arn(String)
:The ARN of the rule groups namespace.
status(Option<RuleGroupsNamespaceStatus>)
:A structure that includes the current status of the rule groups namespace.
tags(Option<HashMap::<String, String>>)
:The list of tag keys and values that are associated with the 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: trueThe ARN of the workspace or rule groups namespace to apply tags to.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe list of tag keys and values to associate with the resource.
Keys may not begin with
aws:
.
- 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: trueThe ARN of the workspace or rule groups namespace.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe keys of the tags to remove.
- 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: trueThe ID of the workspace to update the logging configuration for.
log_group_arn(impl Into<String>)
/set_log_group_arn(Option<String>)
:
required: trueThe ARN of the CloudWatch log group to which the vended log data will be published.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- On success, responds with
UpdateLoggingConfigurationOutput
with field(s):status(Option<LoggingConfigurationStatus>)
:A structure that contains the current 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: trueThe ID of the workspace to update.
alias(impl Into<String>)
/set_alias(Option<String>)
:
required: falseThe new alias for the workspace. It does not need to be unique.
Amazon Managed Service for Prometheus will automatically strip any blank spaces from the beginning and end of the alias that you specify.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.
- 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_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.