Skip to content

CloudWatchNetworkMonitorClient#

Index > CloudWatchNetworkMonitor > CloudWatchNetworkMonitorClient

Auto-generated documentation for CloudWatchNetworkMonitor type annotations stubs module mypy-boto3-networkmonitor.

CloudWatchNetworkMonitorClient#

Type annotations and code completion for boto3.client("networkmonitor"). boto3 documentation

# CloudWatchNetworkMonitorClient usage example

from boto3.session import Session
from mypy_boto3_networkmonitor.client import CloudWatchNetworkMonitorClient

def get_networkmonitor_client() -> CloudWatchNetworkMonitorClient:
    return Session().client("networkmonitor")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("networkmonitor").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("networkmonitor")

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_networkmonitor.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("networkmonitor").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("networkmonitor").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_monitor#

Creates a monitor between a source subnet and destination IP address.

Type annotations and code completion for boto3.client("networkmonitor").create_monitor method. boto3 documentation

# create_monitor method definition

def create_monitor(
    self,
    *,
    monitorName: str,
    probes: Sequence[CreateMonitorProbeInputTypeDef] = ...,  # (1)
    aggregationPeriod: int = ...,
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateMonitorOutputTypeDef:  # (2)
    ...
  1. See CreateMonitorProbeInputTypeDef
  2. See CreateMonitorOutputTypeDef
# create_monitor method usage example with argument unpacking

kwargs: CreateMonitorInputRequestTypeDef = {  # (1)
    "monitorName": ...,
}

parent.create_monitor(**kwargs)
  1. See CreateMonitorInputRequestTypeDef

create_probe#

Create a probe within a monitor.

Type annotations and code completion for boto3.client("networkmonitor").create_probe method. boto3 documentation

# create_probe method definition

def create_probe(
    self,
    *,
    monitorName: str,
    probe: ProbeInputTypeDef,  # (1)
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateProbeOutputTypeDef:  # (2)
    ...
  1. See ProbeInputTypeDef
  2. See CreateProbeOutputTypeDef
# create_probe method usage example with argument unpacking

kwargs: CreateProbeInputRequestTypeDef = {  # (1)
    "monitorName": ...,
    "probe": ...,
}

parent.create_probe(**kwargs)
  1. See CreateProbeInputRequestTypeDef

delete_monitor#

Deletes a specified monitor.

Type annotations and code completion for boto3.client("networkmonitor").delete_monitor method. boto3 documentation

# delete_monitor method definition

def delete_monitor(
    self,
    *,
    monitorName: str,
) -> Dict[str, Any]:
    ...
# delete_monitor method usage example with argument unpacking

kwargs: DeleteMonitorInputRequestTypeDef = {  # (1)
    "monitorName": ...,
}

parent.delete_monitor(**kwargs)
  1. See DeleteMonitorInputRequestTypeDef

delete_probe#

Deletes the specified probe.

Type annotations and code completion for boto3.client("networkmonitor").delete_probe method. boto3 documentation

# delete_probe method definition

def delete_probe(
    self,
    *,
    monitorName: str,
    probeId: str,
) -> Dict[str, Any]:
    ...
# delete_probe method usage example with argument unpacking

kwargs: DeleteProbeInputRequestTypeDef = {  # (1)
    "monitorName": ...,
    "probeId": ...,
}

parent.delete_probe(**kwargs)
  1. See DeleteProbeInputRequestTypeDef

generate_presigned_url#

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

Type annotations and code completion for boto3.client("networkmonitor").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_monitor#

Returns details about a specific monitor.

Type annotations and code completion for boto3.client("networkmonitor").get_monitor method. boto3 documentation

# get_monitor method definition

def get_monitor(
    self,
    *,
    monitorName: str,
) -> GetMonitorOutputTypeDef:  # (1)
    ...
  1. See GetMonitorOutputTypeDef
# get_monitor method usage example with argument unpacking

kwargs: GetMonitorInputRequestTypeDef = {  # (1)
    "monitorName": ...,
}

parent.get_monitor(**kwargs)
  1. See GetMonitorInputRequestTypeDef

get_probe#

Returns the details about a probe.

Type annotations and code completion for boto3.client("networkmonitor").get_probe method. boto3 documentation

# get_probe method definition

def get_probe(
    self,
    *,
    monitorName: str,
    probeId: str,
) -> GetProbeOutputTypeDef:  # (1)
    ...
  1. See GetProbeOutputTypeDef
# get_probe method usage example with argument unpacking

kwargs: GetProbeInputRequestTypeDef = {  # (1)
    "monitorName": ...,
    "probeId": ...,
}

parent.get_probe(**kwargs)
  1. See GetProbeInputRequestTypeDef

list_monitors#

Returns a list of all of your monitors.

Type annotations and code completion for boto3.client("networkmonitor").list_monitors method. boto3 documentation

# list_monitors method definition

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

kwargs: ListMonitorsInputRequestTypeDef = {  # (1)
    "nextToken": ...,
}

parent.list_monitors(**kwargs)
  1. See ListMonitorsInputRequestTypeDef

list_tags_for_resource#

Lists the tags assigned to this resource.

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

# list_tags_for_resource method definition

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

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

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

tag_resource#

Adds key-value pairs to a monitor or probe.

Type annotations and code completion for boto3.client("networkmonitor").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: TagResourceInputRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceInputRequestTypeDef

untag_resource#

Removes a key-value pair from a monitor or probe.

Type annotations and code completion for boto3.client("networkmonitor").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: UntagResourceInputRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceInputRequestTypeDef

update_monitor#

Updates the aggregationPeriod for a monitor.

Type annotations and code completion for boto3.client("networkmonitor").update_monitor method. boto3 documentation

# update_monitor method definition

def update_monitor(
    self,
    *,
    monitorName: str,
    aggregationPeriod: int,
) -> UpdateMonitorOutputTypeDef:  # (1)
    ...
  1. See UpdateMonitorOutputTypeDef
# update_monitor method usage example with argument unpacking

kwargs: UpdateMonitorInputRequestTypeDef = {  # (1)
    "monitorName": ...,
    "aggregationPeriod": ...,
}

parent.update_monitor(**kwargs)
  1. See UpdateMonitorInputRequestTypeDef

update_probe#

Updates a monitor probe.

Type annotations and code completion for boto3.client("networkmonitor").update_probe method. boto3 documentation

# update_probe method definition

def update_probe(
    self,
    *,
    monitorName: str,
    probeId: str,
    state: ProbeStateType = ...,  # (1)
    destination: str = ...,
    destinationPort: int = ...,
    protocol: ProtocolType = ...,  # (2)
    packetSize: int = ...,
) -> UpdateProbeOutputTypeDef:  # (3)
    ...
  1. See ProbeStateType
  2. See ProtocolType
  3. See UpdateProbeOutputTypeDef
# update_probe method usage example with argument unpacking

kwargs: UpdateProbeInputRequestTypeDef = {  # (1)
    "monitorName": ...,
    "probeId": ...,
}

parent.update_probe(**kwargs)
  1. See UpdateProbeInputRequestTypeDef

get_paginator#

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