Struct aws_sdk_amp::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* 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
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more