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.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_amp::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_amp::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_amp::Client::from_conf(config);
Implementations§
source§impl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
source§impl Client
impl Client
sourcepub fn create_alert_manager_definition(&self) -> CreateAlertManagerDefinition
pub fn create_alert_manager_definition(&self) -> CreateAlertManagerDefinition
Constructs a fluent builder for the CreateAlertManagerDefinition
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace in which to create the alert manager definition.data(Blob)
/set_data(Option<Blob>)
: The alert manager definition data.client_token(impl Into<String>)
/set_client_token(Option<String>)
: Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
CreateAlertManagerDefinitionOutput
with field(s):status(Option<AlertManagerDefinitionStatus>)
: The status of alert manager definition.
- On failure, responds with
SdkError<CreateAlertManagerDefinitionError>
sourcepub fn create_logging_configuration(&self) -> CreateLoggingConfiguration
pub fn create_logging_configuration(&self) -> CreateLoggingConfiguration
Constructs a fluent builder for the CreateLoggingConfiguration
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to vend logs to.log_group_arn(impl Into<String>)
/set_log_group_arn(Option<String>)
: 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>)
: Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
CreateLoggingConfigurationOutput
with field(s):status(Option<LoggingConfigurationStatus>)
: The status of the logging configuration.
- On failure, responds with
SdkError<CreateLoggingConfigurationError>
sourcepub fn create_rule_groups_namespace(&self) -> CreateRuleGroupsNamespace
pub fn create_rule_groups_namespace(&self) -> CreateRuleGroupsNamespace
Constructs a fluent builder for the CreateRuleGroupsNamespace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace in which to create the rule group namespace.name(impl Into<String>)
/set_name(Option<String>)
: The rule groups namespace name.data(Blob)
/set_data(Option<Blob>)
: The namespace data that define the rule groups.client_token(impl Into<String>)
/set_client_token(Option<String>)
: Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
: Optional, user-provided tags for this rule groups namespace.
- On success, responds with
CreateRuleGroupsNamespaceOutput
with field(s):name(Option<String>)
: The rule groups namespace name.arn(Option<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>
sourcepub fn create_workspace(&self) -> CreateWorkspace
pub fn create_workspace(&self) -> CreateWorkspace
Constructs a fluent builder for the CreateWorkspace
operation.
- The fluent builder is configurable:
alias(impl Into<String>)
/set_alias(Option<String>)
: 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>)
: Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
: Optional, user-provided tags for this workspace.
- On success, responds with
CreateWorkspaceOutput
with field(s):workspace_id(Option<String>)
: The generated ID of the workspace that was just created.arn(Option<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.
- On failure, responds with
SdkError<CreateWorkspaceError>
sourcepub fn delete_alert_manager_definition(&self) -> DeleteAlertManagerDefinition
pub fn delete_alert_manager_definition(&self) -> DeleteAlertManagerDefinition
Constructs a fluent builder for the DeleteAlertManagerDefinition
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace in which to delete the alert manager definition.client_token(impl Into<String>)
/set_client_token(Option<String>)
: 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>
sourcepub fn delete_logging_configuration(&self) -> DeleteLoggingConfiguration
pub fn delete_logging_configuration(&self) -> DeleteLoggingConfiguration
Constructs a fluent builder for the DeleteLoggingConfiguration
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to vend logs to.client_token(impl Into<String>)
/set_client_token(Option<String>)
: 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>
sourcepub fn delete_rule_groups_namespace(&self) -> DeleteRuleGroupsNamespace
pub fn delete_rule_groups_namespace(&self) -> DeleteRuleGroupsNamespace
Constructs a fluent builder for the DeleteRuleGroupsNamespace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to delete rule group definition.name(impl Into<String>)
/set_name(Option<String>)
: The rule groups namespace name.client_token(impl Into<String>)
/set_client_token(Option<String>)
: 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>
sourcepub fn delete_workspace(&self) -> DeleteWorkspace
pub fn delete_workspace(&self) -> DeleteWorkspace
Constructs a fluent builder for the DeleteWorkspace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to delete.client_token(impl Into<String>)
/set_client_token(Option<String>)
: 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>
sourcepub fn describe_alert_manager_definition(
&self
) -> DescribeAlertManagerDefinition
pub fn describe_alert_manager_definition(
&self
) -> DescribeAlertManagerDefinition
Constructs a fluent builder for the DescribeAlertManagerDefinition
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to describe.
- On success, responds with
DescribeAlertManagerDefinitionOutput
with field(s):alert_manager_definition(Option<AlertManagerDefinitionDescription>)
: The properties of the selected workspace’s alert manager definition.
- On failure, responds with
SdkError<DescribeAlertManagerDefinitionError>
sourcepub fn describe_logging_configuration(&self) -> DescribeLoggingConfiguration
pub fn describe_logging_configuration(&self) -> DescribeLoggingConfiguration
Constructs a fluent builder for the DescribeLoggingConfiguration
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to vend logs to.
- On success, responds with
DescribeLoggingConfigurationOutput
with field(s):logging_configuration(Option<LoggingConfigurationMetadata>)
: Metadata object containing information about the logging configuration of a workspace.
- On failure, responds with
SdkError<DescribeLoggingConfigurationError>
sourcepub fn describe_rule_groups_namespace(&self) -> DescribeRuleGroupsNamespace
pub fn describe_rule_groups_namespace(&self) -> DescribeRuleGroupsNamespace
Constructs a fluent builder for the DescribeRuleGroupsNamespace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to describe.name(impl Into<String>)
/set_name(Option<String>)
: The rule groups namespace.
- On success, responds with
DescribeRuleGroupsNamespaceOutput
with field(s):rule_groups_namespace(Option<RuleGroupsNamespaceDescription>)
: The selected rule groups namespace.
- On failure, responds with
SdkError<DescribeRuleGroupsNamespaceError>
sourcepub fn describe_workspace(&self) -> DescribeWorkspace
pub fn describe_workspace(&self) -> DescribeWorkspace
Constructs a fluent builder for the DescribeWorkspace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to describe.
- On success, responds with
DescribeWorkspaceOutput
with field(s):workspace(Option<WorkspaceDescription>)
: The properties of the selected workspace.
- On failure, responds with
SdkError<DescribeWorkspaceError>
sourcepub fn list_rule_groups_namespaces(&self) -> ListRuleGroupsNamespaces
pub fn list_rule_groups_namespaces(&self) -> ListRuleGroupsNamespaces
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>)
: The ID of the workspace.name(impl Into<String>)
/set_name(Option<String>)
: 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>)
: 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>)
: Maximum results to return in response (default=100, maximum=1000).
- On success, responds with
ListRuleGroupsNamespacesOutput
with field(s):rule_groups_namespaces(Option<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>
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
: The ARN of the resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap<String, String>>)
: The list of tags assigned to the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn list_workspaces(&self) -> ListWorkspaces
pub fn list_workspaces(&self) -> ListWorkspaces
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>)
: 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>)
: 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>)
: Maximum results to return in response (default=100, maximum=1000).
- On success, responds with
ListWorkspacesOutput
with field(s):workspaces(Option<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>
sourcepub fn put_alert_manager_definition(&self) -> PutAlertManagerDefinition
pub fn put_alert_manager_definition(&self) -> PutAlertManagerDefinition
Constructs a fluent builder for the PutAlertManagerDefinition
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace in which to update the alert manager definition.data(Blob)
/set_data(Option<Blob>)
: The alert manager definition data.client_token(impl Into<String>)
/set_client_token(Option<String>)
: Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
PutAlertManagerDefinitionOutput
with field(s):status(Option<AlertManagerDefinitionStatus>)
: The status of alert manager definition.
- On failure, responds with
SdkError<PutAlertManagerDefinitionError>
sourcepub fn put_rule_groups_namespace(&self) -> PutRuleGroupsNamespace
pub fn put_rule_groups_namespace(&self) -> PutRuleGroupsNamespace
Constructs a fluent builder for the PutRuleGroupsNamespace
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace in which to update the rule group namespace.name(impl Into<String>)
/set_name(Option<String>)
: The rule groups namespace name.data(Blob)
/set_data(Option<Blob>)
: The namespace data that define the rule groups.client_token(impl Into<String>)
/set_client_token(Option<String>)
: Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
PutRuleGroupsNamespaceOutput
with field(s):name(Option<String>)
: The rule groups namespace name.arn(Option<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>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
: The ARN of the resource.tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
: The list of tags assigned to the resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
: The ARN of the resource.tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
: One or more tag keys
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_logging_configuration(&self) -> UpdateLoggingConfiguration
pub fn update_logging_configuration(&self) -> UpdateLoggingConfiguration
Constructs a fluent builder for the UpdateLoggingConfiguration
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace to vend logs to.log_group_arn(impl Into<String>)
/set_log_group_arn(Option<String>)
: 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>)
: Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
- On success, responds with
UpdateLoggingConfigurationOutput
with field(s):status(Option<LoggingConfigurationStatus>)
: The status of the logging configuration.
- On failure, responds with
SdkError<UpdateLoggingConfigurationError>
sourcepub fn update_workspace_alias(&self) -> UpdateWorkspaceAlias
pub fn update_workspace_alias(&self) -> UpdateWorkspaceAlias
Constructs a fluent builder for the UpdateWorkspaceAlias
operation.
- The fluent builder is configurable:
workspace_id(impl Into<String>)
/set_workspace_id(Option<String>)
: The ID of the workspace being updated.alias(impl Into<String>)
/set_alias(Option<String>)
: The new alias of the workspace.client_token(impl Into<String>)
/set_client_token(Option<String>)
: 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 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.
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 if the
conf
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
conf
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it.