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: BlobTypeDef,
    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: BlobTypeDef,
    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: ScrapeConfigurationTypeDef,  # (2)
    source: SourceTypeDef,  # (3)
    alias: str = ...,
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateScraperResponseTypeDef:  # (4)
    ...
  1. See DestinationTypeDef
  2. See ScrapeConfigurationTypeDef
  3. See SourceTypeDef
  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. boto3 documentation

# delete_workspace method definition

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

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

parent.delete_workspace(**kwargs)
  1. See DeleteWorkspaceRequestRequestTypeDef

describe_alert_manager_definition#

Retrieves the full information about the alert manager definition for a workspace.

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

# describe_alert_manager_definition method definition

def describe_alert_manager_definition(
    self,
    *,
    workspaceId: str,
) -> DescribeAlertManagerDefinitionResponseTypeDef:  # (1)
    ...
  1. See DescribeAlertManagerDefinitionResponseTypeDef
# describe_alert_manager_definition method usage example with argument unpacking

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

parent.describe_alert_manager_definition(**kwargs)
  1. See DescribeAlertManagerDefinitionRequestRequestTypeDef

describe_logging_configuration#

Returns complete information about the current logging configuration of the workspace.

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

# describe_logging_configuration method definition

def describe_logging_configuration(
    self,
    *,
    workspaceId: str,
) -> DescribeLoggingConfigurationResponseTypeDef:  # (1)
    ...
  1. See DescribeLoggingConfigurationResponseTypeDef
# describe_logging_configuration method usage example with argument unpacking

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

parent.describe_logging_configuration(**kwargs)
  1. See DescribeLoggingConfigurationRequestRequestTypeDef

describe_rule_groups_namespace#

Returns complete information about one rule groups namespace.

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

# describe_rule_groups_namespace method definition

def describe_rule_groups_namespace(
    self,
    *,
    name: str,
    workspaceId: str,
) -> DescribeRuleGroupsNamespaceResponseTypeDef:  # (1)
    ...
  1. See DescribeRuleGroupsNamespaceResponseTypeDef
# describe_rule_groups_namespace method usage example with argument unpacking

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

parent.describe_rule_groups_namespace(**kwargs)
  1. See DescribeRuleGroupsNamespaceRequestRequestTypeDef

describe_scraper#

The DescribeScraper operation displays information about an existing scraper.

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

# describe_scraper method definition

def describe_scraper(
    self,
    *,
    scraperId: str,
) -> DescribeScraperResponseTypeDef:  # (1)
    ...
  1. See DescribeScraperResponseTypeDef
# describe_scraper method usage example with argument unpacking

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

parent.describe_scraper(**kwargs)
  1. See DescribeScraperRequestRequestTypeDef

describe_workspace#

Returns information about an existing workspace.

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

# describe_workspace method definition

def describe_workspace(
    self,
    *,
    workspaceId: str,
) -> DescribeWorkspaceResponseTypeDef:  # (1)
    ...
  1. See DescribeWorkspaceResponseTypeDef
# describe_workspace method usage example with argument unpacking

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

parent.describe_workspace(**kwargs)
  1. See DescribeWorkspaceRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

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

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_default_scraper_configuration#

The GetDefaultScraperConfiguration operation returns the default scraper configuration used when Amazon EKS creates a scraper for you.

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

# get_default_scraper_configuration method definition

def get_default_scraper_configuration(
    self,
) -> GetDefaultScraperConfigurationResponseTypeDef:  # (1)
    ...
  1. See GetDefaultScraperConfigurationResponseTypeDef

list_rule_groups_namespaces#

Returns a list of rule groups namespaces in a workspace.

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

# list_rule_groups_namespaces method definition

def list_rule_groups_namespaces(
    self,
    *,
    workspaceId: str,
    maxResults: int = ...,
    name: str = ...,
    nextToken: str = ...,
) -> ListRuleGroupsNamespacesResponseTypeDef:  # (1)
    ...
  1. See ListRuleGroupsNamespacesResponseTypeDef
# list_rule_groups_namespaces method usage example with argument unpacking

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

parent.list_rule_groups_namespaces(**kwargs)
  1. See ListRuleGroupsNamespacesRequestRequestTypeDef

list_scrapers#

The ListScrapers operation lists all of the scrapers in your account.

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

# list_scrapers method definition

def list_scrapers(
    self,
    *,
    filters: Mapping[str, Sequence[str]] = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListScrapersResponseTypeDef:  # (1)
    ...
  1. See ListScrapersResponseTypeDef
# list_scrapers method usage example with argument unpacking

kwargs: ListScrapersRequestRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.list_scrapers(**kwargs)
  1. See ListScrapersRequestRequestTypeDef

list_tags_for_resource#

The ListTagsForResource operation returns the tags that are associated with an Amazon Managed Service for Prometheus resource.

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

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

list_workspaces#

Lists all of the Amazon Managed Service for Prometheus workspaces in your account.

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

# list_workspaces method definition

def list_workspaces(
    self,
    *,
    alias: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListWorkspacesResponseTypeDef:  # (1)
    ...
  1. See ListWorkspacesResponseTypeDef
# list_workspaces method usage example with argument unpacking

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

parent.list_workspaces(**kwargs)
  1. See ListWorkspacesRequestRequestTypeDef

put_alert_manager_definition#

Updates an existing alert manager definition in a workspace.

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

# put_alert_manager_definition method definition

def put_alert_manager_definition(
    self,
    *,
    data: BlobTypeDef,
    workspaceId: str,
    clientToken: str = ...,
) -> PutAlertManagerDefinitionResponseTypeDef:  # (1)
    ...
  1. See PutAlertManagerDefinitionResponseTypeDef
# put_alert_manager_definition method usage example with argument unpacking

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

parent.put_alert_manager_definition(**kwargs)
  1. See PutAlertManagerDefinitionRequestRequestTypeDef

put_rule_groups_namespace#

Updates an existing rule groups namespace within a workspace.

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

# put_rule_groups_namespace method definition

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

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

parent.put_rule_groups_namespace(**kwargs)
  1. See PutRuleGroupsNamespaceRequestRequestTypeDef

tag_resource#

The TagResource operation associates tags with an Amazon Managed Service for Prometheus resource.

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

# tag_resource method definition

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)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes the specified tags from an Amazon Managed Service for Prometheus resource.

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

# untag_resource method definition

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)
  1. See UntagResourceRequestRequestTypeDef

update_logging_configuration#

Updates the log group ARN or the workspace ID of the current logging configuration.

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

# update_logging_configuration method definition

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

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

parent.update_logging_configuration(**kwargs)
  1. See UpdateLoggingConfigurationRequestRequestTypeDef

update_scraper#

Updates an existing scraper.

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

# update_scraper method definition

def update_scraper(
    self,
    *,
    scraperId: str,
    alias: str = ...,
    clientToken: str = ...,
    destination: DestinationTypeDef = ...,  # (1)
    scrapeConfiguration: ScrapeConfigurationTypeDef = ...,  # (2)
) -> UpdateScraperResponseTypeDef:  # (3)
    ...
  1. See DestinationTypeDef
  2. See ScrapeConfigurationTypeDef
  3. See UpdateScraperResponseTypeDef
# update_scraper method usage example with argument unpacking

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

parent.update_scraper(**kwargs)
  1. See UpdateScraperRequestRequestTypeDef

update_workspace_alias#

Updates the alias of an existing workspace.

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

# update_workspace_alias method definition

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

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

parent.update_workspace_alias(**kwargs)
  1. See UpdateWorkspaceAliasRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("amp").get_paginator method with overloads.

get_waiter#

Type annotations and code completion for boto3.client("amp").get_waiter method with overloads.