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::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
sourceimpl 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.
sourceimpl 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
CreateAlertManagerDefinitionOutputwith field(s):status(Option<AlertManagerDefinitionStatus>): The status of alert manager definition.
- On failure, responds with
SdkError<CreateAlertManagerDefinitionError>
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
CreateRuleGroupsNamespaceOutputwith 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
CreateWorkspaceOutputwith 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_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
DescribeAlertManagerDefinitionOutputwith 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_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
DescribeRuleGroupsNamespaceOutputwith 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
DescribeWorkspaceOutputwith 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
ListRuleGroupsNamespacesOutputwith 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
ListTagsForResourceOutputwith 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
ListWorkspacesOutputwith 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
PutAlertManagerDefinitionOutputwith 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
PutRuleGroupsNamespaceOutputwith 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_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>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more