Skip to content

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)
    ...
  1. See CreateAlertManagerDefinitionResponseTypeDef
# create_alert_manager_definition method usage example with argument unpacking

kwargs: CreateAlertManagerDefinitionRequestRequestTypeDef = {  # (1)
    "data": ...,
    "workspaceId": ...,
}

parent.create_alert_manager_definition(**kwargs)
  1. See CreateAlertManagerDefinitionRequestRequestTypeDef

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)
    ...
  1. See CreateLoggingConfigurationResponseTypeDef
# create_logging_configuration method usage example with argument unpacking

kwargs: CreateLoggingConfigurationRequestRequestTypeDef = {  # (1)
    "logGroupArn": ...,
    "workspaceId": ...,
}

parent.create_logging_configuration(**kwargs)
  1. See CreateLoggingConfigurationRequestRequestTypeDef

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)
    ...
  1. See CreateRuleGroupsNamespaceResponseTypeDef
# create_rule_groups_namespace method usage example with argument unpacking

kwargs: CreateRuleGroupsNamespaceRequestRequestTypeDef = {  # (1)
    "data": ...,
    "name": ...,
    "workspaceId": ...,
}

parent.create_rule_groups_namespace(**kwargs)
  1. See CreateRuleGroupsNamespaceRequestRequestTypeDef

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)
    ...
  1. See DestinationTypeDef
  2. See ScrapeConfigurationTypeDef ScrapeConfigurationOutputTypeDef
  3. See SourceTypeDef SourceExtraOutputTypeDef
  4. See CreateScraperResponseTypeDef
# create_scraper method usage example with argument unpacking

kwargs: CreateScraperRequestRequestTypeDef = {  # (1)
    "destination": ...,
    "scrapeConfiguration": ...,
    "source": ...,
}

parent.create_scraper(**kwargs)
  1. See CreateScraperRequestRequestTypeDef

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)
    ...
  1. See CreateWorkspaceResponseTypeDef
# create_workspace method usage example with argument unpacking

kwargs: CreateWorkspaceRequestRequestTypeDef = {  # (1)
    "alias": ...,
}

parent.create_workspace(**kwargs)
  1. See CreateWorkspaceRequestRequestTypeDef

delete_alert_manager_definition#

Deletes the alert manager definition from a workspace.

Type annotations and code completion for boto3.client("amp").delete_alert_manager_definition method. boto3 documentation

# delete_alert_manager_definition method definition

def delete_alert_manager_definition(
    self,
    *,
    workspaceId: str,
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_alert_manager_definition method usage example with argument unpacking

kwargs: DeleteAlertManagerDefinitionRequestRequestTypeDef = {  # (1)
    "workspaceId": ...,
}

parent.delete_alert_manager_definition(**kwargs)
  1. See DeleteAlertManagerDefinitionRequestRequestTypeDef

delete_logging_configuration#

Deletes the logging configuration for a workspace.

Type annotations and code completion for boto3.client("amp").delete_logging_configuration method. boto3 documentation

# delete_logging_configuration method definition

def delete_logging_configuration(
    self,
    *,
    workspaceId: str,
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_logging_configuration method usage example with argument unpacking

kwargs: DeleteLoggingConfigurationRequestRequestTypeDef = {  # (1)
    "workspaceId": ...,
}

parent.delete_logging_configuration(**kwargs)
  1. See DeleteLoggingConfigurationRequestRequestTypeDef

delete_rule_groups_namespace#

Deletes one rule groups namespace and its associated rule groups definition.

Type annotations and code completion for boto3.client("amp").delete_rule_groups_namespace method. boto3 documentation

# delete_rule_groups_namespace method definition

def delete_rule_groups_namespace(
    self,
    *,
    name: str,
    workspaceId: str,
    clientToken: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_rule_groups_namespace method usage example with argument unpacking

kwargs: DeleteRuleGroupsNamespaceRequestRequestTypeDef = {  # (1)
    "name": ...,
    "workspaceId": ...,
}

parent.delete_rule_groups_namespace(**kwargs)
  1. See DeleteRuleGroupsNamespaceRequestRequestTypeDef

delete_scraper#

The DeleteScraper operation deletes one scraper, and stops any metrics collection that the scraper performs.

Type annotations and code completion for boto3.client("amp").delete_scraper method. boto3 documentation

# delete_scraper method definition

def delete_scraper(
    self,
    *,
    scraperId: str,
    clientToken: str = ...,
) -> DeleteScraperResponseTypeDef:  # (1)
    ...
  1. See DeleteScraperResponseTypeDef
# delete_scraper method usage example with argument unpacking

kwargs: DeleteScraperRequestRequestTypeDef = {  # (1)
    "scraperId": ...,
}

parent.delete_scraper(**kwargs)
  1. See DeleteScraperRequestRequestTypeDef

delete_workspace#

Deletes an existing workspace.

Type annotations and code completion for boto3.client("amp").delete_workspace method.