CreateMonitor - Network Flow Monitor

CreateMonitor

Create a monitor for specific network flows between local and remote resources, so that you can monitor network performance for one or several of your workloads. For each monitor, Network Flow Monitor publishes detailed end-to-end performance metrics and a network health indicators (NHI) that informs you whether there were AWS network issues for one or more of the network flows tracked by a monitor, during a time period that you choose.

Request Syntax

POST /monitors HTTP/1.1 Content-type: application/json { "clientToken": "string", "localResources": [ { "identifier": "string", "type": "string" } ], "monitorName": "string", "remoteResources": [ { "identifier": "string", "type": "string" } ], "scopeArn": "string", "tags": { "string" : "string" } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

clientToken

A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don't reuse the same client token for other API requests.

Type: String

Length Constraints: Fixed length of 36.

Pattern: [a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}

Required: No

localResources

The local resources to monitor. A local resource, in a bi-directional flow of a workload, is the host where the agent is installed. For example, if a workload consists of an interaction between a web service and a backend database (for example, Amazon Relational Database Service (RDS)), the EC2 instance hosting the web service, which also runs the agent, is the local resource.

Type: Array of MonitorLocalResource objects

Array Members: Minimum number of 1 item.

Required: Yes

monitorName

The name of the monitor.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_.-]+

Required: Yes

remoteResources

The remote resources to monitor. A remote resource is the other endpoint in the bi-directional flow of a workload, with a local resource. For example, Amazon Relational Database Service (RDS) can be a remote resource.

Type: Array of MonitorRemoteResource objects

Required: No

scopeArn

The Amazon Resource Name (ARN) of the scope for the monitor.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:.*

Required: Yes

tags

The tags for a monitor. You can add a maximum of 200 tags.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "createdAt": number, "localResources": [ { "identifier": "string", "type": "string" } ], "modifiedAt": number, "monitorArn": "string", "monitorName": "string", "monitorStatus": "string", "remoteResources": [ { "identifier": "string", "type": "string" } ], "tags": { "string" : "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

createdAt

The date and time when the monitor was created.

Type: Timestamp

localResources

The local resources to monitor. A local resource, in a bi-directional flow of a workload, is the host where the agent is installed.

Type: Array of MonitorLocalResource objects

modifiedAt

The last date and time that the monitor was modified.

Type: Timestamp

monitorArn

The Amazon Resource Name (ARN) of the monitor.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 512.

Pattern: arn:.*

monitorName

The name of the monitor.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [a-zA-Z0-9_.-]+

monitorStatus

The status of a monitor. The status can be one of the following

  • PENDING: The monitor is in the process of being created.

  • ACTIVE: The monitor is active.

  • INACTIVE: The monitor is inactive.

  • ERROR: Monitor creation failed due to an error.

  • DELETING: The monitor is in the process of being deleted.

Type: String

Valid Values: PENDING | ACTIVE | INACTIVE | ERROR | DELETING

remoteResources

The remote resources to monitor. A remote resource is the other endpoint in the bi-directional flow of a workload, with a local resource. For example, Amazon Relational Database Service (RDS) can be a remote resource. The remote resource is identified by its ARN or an identifier.

Type: Array of MonitorRemoteResource objects

tags

The tags for a monitor.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have sufficient permission to perform this action.

HTTP Status Code: 403

ConflictException

The requested resource is in use.

HTTP Status Code: 409

InternalServerException

An internal error occurred.

HTTP Status Code: 500

ServiceQuotaExceededException

The request exceeded a service quota.

HTTP Status Code: 402

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

Invalid request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: