PrometheusServiceClient#
Index > PrometheusService > PrometheusServiceClient
Auto-generated documentation for PrometheusService type annotations stubs module mypy-boto3-amp.
PrometheusServiceClient#
Type annotations and code completion for boto3.client("amp")
.
boto3 documentation
# PrometheusServiceClient usage example
from boto3.session import Session
from mypy_boto3_amp.client import PrometheusServiceClient
def get_amp_client() -> PrometheusServiceClient:
return Session().client("amp")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("amp").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("amp")
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)
# Exceptions.exceptions type checking example
from mypy_boto3_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 boto3.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 boto3.client("amp").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_alert_manager_definition#
The CreateAlertManagerDefinition
operation creates the alert manager
definition in a
workspace.
Type annotations and code completion for boto3.client("amp").create_alert_manager_definition
method.
boto3 documentation
# create_alert_manager_definition method definition
def create_alert_manager_definition(
self,
*,
data: Union[str, bytes, IO[Any], StreamingBody],
workspaceId: str,
clientToken: str = ...,
) -> CreateAlertManagerDefinitionResponseTypeDef: # (1)
...
# create_alert_manager_definition method usage example with argument unpacking
kwargs: CreateAlertManagerDefinitionRequestRequestTypeDef = { # (1)
"data": ...,
"workspaceId": ...,
}
parent.create_alert_manager_definition(**kwargs)
create_logging_configuration#
The CreateLoggingConfiguration
operation creates a logging configuration for
the
workspace.
Type annotations and code completion for boto3.client("amp").create_logging_configuration
method.
boto3 documentation
# create_logging_configuration method definition
def create_logging_configuration(
self,
*,
logGroupArn: str,
workspaceId: str,
clientToken: str = ...,
) -> CreateLoggingConfigurationResponseTypeDef: # (1)
...
# create_logging_configuration method usage example with argument unpacking
kwargs: CreateLoggingConfigurationRequestRequestTypeDef = { # (1)
"logGroupArn": ...,
"workspaceId": ...,
}
parent.create_logging_configuration(**kwargs)
create_rule_groups_namespace#
The CreateRuleGroupsNamespace
operation creates a rule groups namespace
within a
workspace.
Type annotations and code completion for boto3.client("amp").create_rule_groups_namespace
method.
boto3 documentation
# create_rule_groups_namespace method definition
def create_rule_groups_namespace(
self,
*,
data: Union[str, bytes, IO[Any], StreamingBody],
name: str,
workspaceId: str,
clientToken: str = ...,
tags: Mapping[str, str] = ...,
) -> CreateRuleGroupsNamespaceResponseTypeDef: # (1)
...
# create_rule_groups_namespace method usage example with argument unpacking
kwargs: CreateRuleGroupsNamespaceRequestRequestTypeDef = { # (1)
"data": ...,
"name": ...,
"workspaceId": ...,
}
parent.create_rule_groups_namespace(**kwargs)
create_scraper#
The CreateScraper
operation creates a scraper to collect metrics.
Type annotations and code completion for boto3.client("amp").create_scraper
method.
boto3 documentation
# create_scraper method definition
def create_scraper(
self,
*,
destination: DestinationTypeDef, # (1)
scrapeConfiguration: Union[ScrapeConfigurationTypeDef, ScrapeConfigurationOutputTypeDef], # (2)
source: Union[SourceTypeDef, SourceExtraOutputTypeDef], # (3)
alias: str = ...,
clientToken: str = ...,
tags: Mapping[str, str] = ...,
) -> CreateScraperResponseTypeDef: # (4)
...
- See DestinationTypeDef
- See ScrapeConfigurationTypeDef ScrapeConfigurationOutputTypeDef
- See SourceTypeDef SourceExtraOutputTypeDef
- See CreateScraperResponseTypeDef
# create_scraper method usage example with argument unpacking
kwargs: CreateScraperRequestRequestTypeDef = { # (1)
"destination": ...,
"scrapeConfiguration": ...,
"source": ...,
}
parent.create_scraper(**kwargs)
create_workspace#
Creates a Prometheus workspace.
Type annotations and code completion for boto3.client("amp").create_workspace
method.
boto3 documentation
# create_workspace method definition
def create_workspace(
self,
*,
alias: str = ...,
clientToken: str = ...,
kmsKeyArn: str = ...,
tags: Mapping[str, str] = ...,
) -> CreateWorkspaceResponseTypeDef: # (1)
...
# create_workspace method usage example with argument unpacking
kwargs: CreateWorkspaceRequestRequestTypeDef = { # (1)
"alias": ...,
}
parent.create_workspace(**kwargs)