PrometheusServiceClient#
Index > PrometheusService > PrometheusServiceClient
Auto-generated documentation for PrometheusService type annotations stubs module types-aiobotocore-amp.
PrometheusServiceClient#
Type annotations and code completion for session.client("amp")
boto3 documentation
# PrometheusServiceClient usage example
from aioboto3.session import Session
from types_aiobotocore_amp.client import PrometheusServiceClient
session = Session()
async with session.client("amp") as client:
client: PrometheusServiceClient
Exceptions#
aioboto3
client exceptions are generated in runtime.
This class provides code completion for session.client("amp").exceptions
structure.
# PrometheusServiceClient.exceptions usage example
async with session.client("amp") as client:
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.ClientError,
client.exceptions.ConflictException,
client.exceptions.InternalServerException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.ThrottlingException,
client.exceptions.ValidationException,
) as e:
print(e)
# PrometheusServiceClient.exceptions type checking example
from types_aiobotocore_amp.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for session.client("amp").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for session.client("amp").close
method.
boto3 documentation
# close method definition
await def close(
self,
) -> None:
...
create_alert_manager_definition#
Create an alert manager definition.
Type annotations and code completion for session.client("amp").create_alert_manager_definition
method.
boto3 documentation
# create_alert_manager_definition method definition
await def create_alert_manager_definition(
self,
*,
workspaceId: str,
data: Union[str, bytes, IO[Any], StreamingBody],
clientToken: str = ...,
) -> CreateAlertManagerDefinitionResponseTypeDef: # (1)
...
# create_alert_manager_definition method usage example with argument unpacking
kwargs: CreateAlertManagerDefinitionRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"data": ...,
}
parent.create_alert_manager_definition(**kwargs)
create_logging_configuration#
Create logging configuration.
Type annotations and code completion for session.client("amp").create_logging_configuration
method.
boto3 documentation
# create_logging_configuration method definition
await def create_logging_configuration(
self,
*,
workspaceId: str,
logGroupArn: str,
clientToken: str = ...,
) -> CreateLoggingConfigurationResponseTypeDef: # (1)
...
# create_logging_configuration method usage example with argument unpacking
kwargs: CreateLoggingConfigurationRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"logGroupArn": ...,
}
parent.create_logging_configuration(**kwargs)
create_rule_groups_namespace#
Create a rule group namespace.
Type annotations and code completion for session.client("amp").create_rule_groups_namespace
method.
boto3 documentation
# create_rule_groups_namespace method definition
await def create_rule_groups_namespace(
self,
*,
workspaceId: str,
name: str,
data: Union[str, bytes, IO[Any], StreamingBody],
clientToken: str = ...,
tags: Mapping[str, str] = ...,
) -> CreateRuleGroupsNamespaceResponseTypeDef: # (1)
...
# create_rule_groups_namespace method usage example with argument unpacking
kwargs: CreateRuleGroupsNamespaceRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"name": ...,
"data": ...,
}
parent.create_rule_groups_namespace(**kwargs)
create_scraper#
Create a scraper.
Type annotations and code completion for session.client("amp").create_scraper
method.
boto3 documentation
# create_scraper method definition
await def create_scraper(
self,
*,
scrapeConfiguration: ScrapeConfigurationTypeDef, # (1)
source: SourceTypeDef, # (2)
destination: DestinationTypeDef, # (3)
alias: str = ...,
clientToken: str = ...,
tags: Mapping[str, str] = ...,
) -> CreateScraperResponseTypeDef: # (4)
...
- See ScrapeConfigurationTypeDef
- See SourceTypeDef
- See DestinationTypeDef
- See CreateScraperResponseTypeDef
# create_scraper method usage example with argument unpacking
kwargs: CreateScraperRequestRequestTypeDef = { # (1)
"scrapeConfiguration": ...,
"source": ...,
"destination": ...,
}
parent.create_scraper(**kwargs)
create_workspace#
Creates a new AMP workspace.
Type annotations and code completion for session.client("amp").create_workspace
method.
boto3 documentation
# create_workspace method definition
await def create_workspace(
self,
*,
alias: str = ...,
clientToken: str = ...,
tags: Mapping[str, str] = ...,
kmsKeyArn: str = ...,
) -> CreateWorkspaceResponseTypeDef: # (1)
...
# create_workspace method usage example with argument unpacking
kwargs: CreateWorkspaceRequestRequestTypeDef = { # (1)
"alias": ...,
}
parent.create_workspace(**kwargs)
delete_alert_manager_definition#
Deletes an alert manager definition.
Type annotations and code completion for session.client("amp").delete_alert_manager_definition
method.
boto3 documentation
# delete_alert_manager_definition method definition
await def delete_alert_manager_definition(
self,
*,
workspaceId: str,
clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_alert_manager_definition method usage example with argument unpacking
kwargs: DeleteAlertManagerDefinitionRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.delete_alert_manager_definition(**kwargs)
delete_logging_configuration#
Delete logging configuration.
Type annotations and code completion for session.client("amp").delete_logging_configuration
method.
boto3 documentation
# delete_logging_configuration method definition
await def delete_logging_configuration(
self,
*,
workspaceId: str,
clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_logging_configuration method usage example with argument unpacking
kwargs: DeleteLoggingConfigurationRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.delete_logging_configuration(**kwargs)
delete_rule_groups_namespace#
Delete a rule groups namespace.
Type annotations and code completion for session.client("amp").delete_rule_groups_namespace
method.
boto3 documentation
# delete_rule_groups_namespace method definition
await def delete_rule_groups_namespace(
self,
*,
workspaceId: str,
name: str,
clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_rule_groups_namespace method usage example with argument unpacking
kwargs: DeleteRuleGroupsNamespaceRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"name": ...,
}
parent.delete_rule_groups_namespace(**kwargs)
delete_scraper#
Deletes a scraper.
Type annotations and code completion for session.client("amp").delete_scraper
method.
boto3 documentation
# delete_scraper method definition
await def delete_scraper(
self,
*,
scraperId: str,
clientToken: str = ...,
) -> DeleteScraperResponseTypeDef: # (1)
...
# delete_scraper method usage example with argument unpacking
kwargs: DeleteScraperRequestRequestTypeDef = { # (1)
"scraperId": ...,
}
parent.delete_scraper(**kwargs)
delete_workspace#
Deletes an AMP workspace.
Type annotations and code completion for session.client("amp").delete_workspace
method.
boto3 documentation
# delete_workspace method definition
await def delete_workspace(
self,
*,
workspaceId: str,
clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_workspace method usage example with argument unpacking
kwargs: DeleteWorkspaceRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.delete_workspace(**kwargs)
describe_alert_manager_definition#
Describes an alert manager definition.
Type annotations and code completion for session.client("amp").describe_alert_manager_definition
method.
boto3 documentation
# describe_alert_manager_definition method definition
await def describe_alert_manager_definition(
self,
*,
workspaceId: str,
) -> DescribeAlertManagerDefinitionResponseTypeDef: # (1)
...
# describe_alert_manager_definition method usage example with argument unpacking
kwargs: DescribeAlertManagerDefinitionRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.describe_alert_manager_definition(**kwargs)
describe_logging_configuration#
Describes logging configuration.
Type annotations and code completion for session.client("amp").describe_logging_configuration
method.
boto3 documentation
# describe_logging_configuration method definition
await def describe_logging_configuration(
self,
*,
workspaceId: str,
) -> DescribeLoggingConfigurationResponseTypeDef: # (1)
...
# describe_logging_configuration method usage example with argument unpacking
kwargs: DescribeLoggingConfigurationRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.describe_logging_configuration(**kwargs)
describe_rule_groups_namespace#
Describe a rule groups namespace.
Type annotations and code completion for session.client("amp").describe_rule_groups_namespace
method.
boto3 documentation
# describe_rule_groups_namespace method definition
await def describe_rule_groups_namespace(
self,
*,
workspaceId: str,
name: str,
) -> DescribeRuleGroupsNamespaceResponseTypeDef: # (1)
...
# describe_rule_groups_namespace method usage example with argument unpacking
kwargs: DescribeRuleGroupsNamespaceRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"name": ...,
}
parent.describe_rule_groups_namespace(**kwargs)
describe_scraper#
Describe an existing scraper.
Type annotations and code completion for session.client("amp").describe_scraper
method.
boto3 documentation
# describe_scraper method definition
await def describe_scraper(
self,
*,
scraperId: str,
) -> DescribeScraperResponseTypeDef: # (1)
...
# describe_scraper method usage example with argument unpacking
kwargs: DescribeScraperRequestRequestTypeDef = { # (1)
"scraperId": ...,
}
parent.describe_scraper(**kwargs)
describe_workspace#
Describes an existing AMP workspace.
Type annotations and code completion for session.client("amp").describe_workspace
method.
boto3 documentation
# describe_workspace method definition
await def describe_workspace(
self,
*,
workspaceId: str,
) -> DescribeWorkspaceResponseTypeDef: # (1)
...
# describe_workspace method usage example with argument unpacking
kwargs: DescribeWorkspaceRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.describe_workspace(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for session.client("amp").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
await def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_default_scraper_configuration#
Gets a default configuration.
Type annotations and code completion for session.client("amp").get_default_scraper_configuration
method.
boto3 documentation
# get_default_scraper_configuration method definition
await def get_default_scraper_configuration(
self,
) -> GetDefaultScraperConfigurationResponseTypeDef: # (1)
...
list_rule_groups_namespaces#
Lists rule groups namespaces.
Type annotations and code completion for session.client("amp").list_rule_groups_namespaces
method.
boto3 documentation
# list_rule_groups_namespaces method definition
await def list_rule_groups_namespaces(
self,
*,
workspaceId: str,
name: str = ...,
nextToken: str = ...,
maxResults: int = ...,
) -> ListRuleGroupsNamespacesResponseTypeDef: # (1)
...
# list_rule_groups_namespaces method usage example with argument unpacking
kwargs: ListRuleGroupsNamespacesRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.list_rule_groups_namespaces(**kwargs)
list_scrapers#
Lists all scrapers in a customer account, including scrapers being created or deleted.
Type annotations and code completion for session.client("amp").list_scrapers
method.
boto3 documentation
# list_scrapers method definition
await def list_scrapers(
self,
*,
filters: Mapping[str, Sequence[str]] = ...,
nextToken: str = ...,
maxResults: int = ...,
) -> ListScrapersResponseTypeDef: # (1)
...
# list_scrapers method usage example with argument unpacking
kwargs: ListScrapersRequestRequestTypeDef = { # (1)
"filters": ...,
}
parent.list_scrapers(**kwargs)
list_tags_for_resource#
Lists the tags you have assigned to the resource.
Type annotations and code completion for session.client("amp").list_tags_for_resource
method.
boto3 documentation
# list_tags_for_resource method definition
await def list_tags_for_resource(
self,
*,
resourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
list_workspaces#
Lists all AMP workspaces, including workspaces being created or deleted.
Type annotations and code completion for session.client("amp").list_workspaces
method.
boto3 documentation
# list_workspaces method definition
await def list_workspaces(
self,
*,
nextToken: str = ...,
alias: str = ...,
maxResults: int = ...,
) -> ListWorkspacesResponseTypeDef: # (1)
...
# list_workspaces method usage example with argument unpacking
kwargs: ListWorkspacesRequestRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.list_workspaces(**kwargs)
put_alert_manager_definition#
Update an alert manager definition.
Type annotations and code completion for session.client("amp").put_alert_manager_definition
method.
boto3 documentation
# put_alert_manager_definition method definition
await def put_alert_manager_definition(
self,
*,
workspaceId: str,
data: Union[str, bytes, IO[Any], StreamingBody],
clientToken: str = ...,
) -> PutAlertManagerDefinitionResponseTypeDef: # (1)
...
# put_alert_manager_definition method usage example with argument unpacking
kwargs: PutAlertManagerDefinitionRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"data": ...,
}
parent.put_alert_manager_definition(**kwargs)
put_rule_groups_namespace#
Update a rule groups namespace.
Type annotations and code completion for session.client("amp").put_rule_groups_namespace
method.
boto3 documentation
# put_rule_groups_namespace method definition
await def put_rule_groups_namespace(
self,
*,
workspaceId: str,
name: str,
data: Union[str, bytes, IO[Any], StreamingBody],
clientToken: str = ...,
) -> PutRuleGroupsNamespaceResponseTypeDef: # (1)
...
# put_rule_groups_namespace method usage example with argument unpacking
kwargs: PutRuleGroupsNamespaceRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"name": ...,
"data": ...,
}
parent.put_rule_groups_namespace(**kwargs)
tag_resource#
Creates tags for the specified resource.
Type annotations and code completion for session.client("amp").tag_resource
method.
boto3 documentation
# tag_resource method definition
await def tag_resource(
self,
*,
resourceArn: str,
tags: Mapping[str, str],
) -> Dict[str, Any]:
...
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Deletes tags from the specified resource.
Type annotations and code completion for session.client("amp").untag_resource
method.
boto3 documentation
# untag_resource method definition
await def untag_resource(
self,
*,
resourceArn: str,
tagKeys: Sequence[str],
) -> Dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"resourceArn": ...,
"tagKeys": ...,
}
parent.untag_resource(**kwargs)
update_logging_configuration#
Update logging configuration.
Type annotations and code completion for session.client("amp").update_logging_configuration
method.
boto3 documentation
# update_logging_configuration method definition
await def update_logging_configuration(
self,
*,
workspaceId: str,
logGroupArn: str,
clientToken: str = ...,
) -> UpdateLoggingConfigurationResponseTypeDef: # (1)
...
# update_logging_configuration method usage example with argument unpacking
kwargs: UpdateLoggingConfigurationRequestRequestTypeDef = { # (1)
"workspaceId": ...,
"logGroupArn": ...,
}
parent.update_logging_configuration(**kwargs)
update_workspace_alias#
Updates an AMP workspace alias.
Type annotations and code completion for session.client("amp").update_workspace_alias
method.
boto3 documentation
# update_workspace_alias method definition
await def update_workspace_alias(
self,
*,
workspaceId: str,
alias: str = ...,
clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# update_workspace_alias method usage example with argument unpacking
kwargs: UpdateWorkspaceAliasRequestRequestTypeDef = { # (1)
"workspaceId": ...,
}
parent.update_workspace_alias(**kwargs)
__aenter__#
Type annotations and code completion for session.client("amp").__aenter__
method.
boto3 documentation
# __aenter__ method definition
await def __aenter__(
self,
) -> PrometheusServiceClient:
...
__aexit__#
Type annotations and code completion for session.client("amp").__aexit__
method.
boto3 documentation
# __aexit__ method definition
await def __aexit__(
self,
exc_type: Any,
exc_val: Any,
exc_tb: Any,
) -> Any:
...
get_paginator#
Type annotations and code completion for session.client("amp").get_paginator
method with overloads.
client.get_paginator("list_rule_groups_namespaces")
-> ListRuleGroupsNamespacesPaginatorclient.get_paginator("list_scrapers")
-> ListScrapersPaginatorclient.get_paginator("list_workspaces")
-> ListWorkspacesPaginator
get_waiter#
Type annotations and code completion for session.client("amp").get_waiter
method with overloads.
client.get_waiter("scraper_active")
-> ScraperActiveWaiterclient.get_waiter("scraper_deleted")
-> ScraperDeletedWaiterclient.get_waiter("workspace_active")
-> WorkspaceActiveWaiterclient.get_waiter("workspace_deleted")
-> WorkspaceDeletedWaiter