---
title: "PATCH /monitors/{monitorName}"
method: PATCH
path: "/monitors/{monitorName}"
---

# PATCH /monitors/{monitorName}

`PATCH /monitors/{monitorName}`

Update a monitor to add or remove local or remote resources.

## Path parameters

- `monitorName` string, required

## Request body

- object
  - `localResourcesToAdd` MonitorLocalResource[] — Additional local resources to specify network flows for a monitor, as an array of resources with identifiers and types. A local resource in a workload is the location of hosts where the Network Flow Monitor agent is installed.
    - `type` 'AWS::EC2::VPC' | 'AWS::AvailabilityZone' | 'AWS::EC2::Subnet' | 'AWS::Region' | 'AWS::EKS::Cluster', required — The type of the local resource. Valid values are <code>AWS::EC2::VPC</code> <code>AWS::AvailabilityZone</code>, <code>AWS::EC2::Subnet</code>, <code>AWS::EKS::Cluster</code>, or <code>AWS::Region</code>.
    - `identifier` string, required — <p>The identifier of the local resource. The values you can specify are the following:</p> <ul> <li> <p>For a VPC, subnet or EKS cluster, this identifier is the VPC Amazon Resource Name (ARN), subnet ARN or cluster ARN.</p> </li> <li> <p>For an Availability Zone, this identifier is the AZ name, for example, us-west-2b.</p> </li> <li> <p>For a Region, this identifier is the Region name, for example, us-west-2.</p> </li> </ul>
  - `localResourcesToRemove` MonitorLocalResource[] — The local resources to remove, as an array of resources with identifiers and types.
    - `type` 'AWS::EC2::VPC' | 'AWS::AvailabilityZone' | 'AWS::EC2::Subnet' | 'AWS::Region' | 'AWS::EKS::Cluster', required — The type of the local resource. Valid values are <code>AWS::EC2::VPC</code> <code>AWS::AvailabilityZone</code>, <code>AWS::EC2::Subnet</code>, <code>AWS::EKS::Cluster</code>, or <code>AWS::Region</code>.
    - `identifier` string, required — <p>The identifier of the local resource. The values you can specify are the following:</p> <ul> <li> <p>For a VPC, subnet or EKS cluster, this identifier is the VPC Amazon Resource Name (ARN), subnet ARN or cluster ARN.</p> </li> <li> <p>For an Availability Zone, this identifier is the AZ name, for example, us-west-2b.</p> </li> <li> <p>For a Region, this identifier is the Region name, for example, us-west-2.</p> </li> </ul>
  - `remoteResourcesToAdd` MonitorRemoteResource[] — <p>The remote resources to add, as an array of resources with identifiers and types.</p> <p>A remote resource is the other endpoint in the flow of a workload, with a local resource. For example, Amazon Dynamo DB can be a remote resource. </p>
    - `type` 'AWS::EC2::VPC' | 'AWS::AvailabilityZone' | 'AWS::EC2::Subnet' | 'AWS::AWSService' | 'AWS::Region', required — The type of the remote resource. Valid values are <code>AWS::EC2::VPC</code> <code>AWS::AvailabilityZone</code>, <code>AWS::EC2::Subnet</code>, <code>AWS::AWSService</code>, or <code>AWS::Region</code>.
    - `identifier` string, required — The identifier of the remote resource. For a VPC or subnet, this identifier is the VPC Amazon Resource Name (ARN) or subnet ARN. For an Availability Zone, this identifier is the AZ name, for example, us-west-2b. For an Amazon Web Services Region , this identifier is the Region name, for example, us-west-2.
  - `remoteResourcesToRemove` MonitorRemoteResource[] — <p>The remote resources to remove, as an array of resources with identifiers and types.</p> <p>A remote resource is the other endpoint specified for the network flow of a workload, with a local resource. For example, Amazon Dynamo DB can be a remote resource. </p>
    - `type` 'AWS::EC2::VPC' | 'AWS::AvailabilityZone' | 'AWS::EC2::Subnet' | 'AWS::AWSService' | 'AWS::Region', required — The type of the remote resource. Valid values are <code>AWS::EC2::VPC</code> <code>AWS::AvailabilityZone</code>, <code>AWS::EC2::Subnet</code>, <code>AWS::AWSService</code>, or <code>AWS::Region</code>.
    - `identifier` string, required — The identifier of the remote resource. For a VPC or subnet, this identifier is the VPC Amazon Resource Name (ARN) or subnet ARN. For an Availability Zone, this identifier is the AZ name, for example, us-west-2b. For an Amazon Web Services Region , this identifier is the Region name, for example, us-west-2.
  - `clientToken` string — 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.

## Response `200`

Success

- UpdateMonitorOutput
  - `monitorArn` string, required — The Amazon Resource Name (ARN) of the monitor.
  - `monitorName` string, required — The name of the monitor.
  - `monitorStatus` 'PENDING' | 'ACTIVE' | 'INACTIVE' | 'ERROR' | 'DELETING', required — <p>The status of a monitor. The status can be one of the following</p> <ul> <li> <p> <code>PENDING</code>: The monitor is in the process of being created.</p> </li> <li> <p> <code>ACTIVE</code>: The monitor is active.</p> </li> <li> <p> <code>INACTIVE</code>: The monitor is inactive.</p> </li> <li> <p> <code>ERROR</code>: Monitor creation failed due to an error.</p> </li> <li> <p> <code>DELETING</code>: The monitor is in the process of being deleted.</p> </li> </ul>
  - `localResources` MonitorLocalResource[], required — The local resources to monitor. A local resource in a workload is the location of hosts where the Network Flow Monitor agent is installed.
    - `type` 'AWS::EC2::VPC' | 'AWS::AvailabilityZone' | 'AWS::EC2::Subnet' | 'AWS::Region' | 'AWS::EKS::Cluster', required — The type of the local resource. Valid values are <code>AWS::EC2::VPC</code> <code>AWS::AvailabilityZone</code>, <code>AWS::EC2::Subnet</code>, <code>AWS::EKS::Cluster</code>, or <code>AWS::Region</code>.
    - `identifier` string, required — <p>The identifier of the local resource. The values you can specify are the following:</p> <ul> <li> <p>For a VPC, subnet or EKS cluster, this identifier is the VPC Amazon Resource Name (ARN), subnet ARN or cluster ARN.</p> </li> <li> <p>For an Availability Zone, this identifier is the AZ name, for example, us-west-2b.</p> </li> <li> <p>For a Region, this identifier is the Region name, for example, us-west-2.</p> </li> </ul>
  - `remoteResources` MonitorRemoteResource[], required — <p>The remote resources updated for a monitor, as an array of resources with identifiers and types.</p> <p>A remote resource is the other endpoint specified for the network flow of a workload, with a local resource. For example, Amazon Dynamo DB can be a remote resource.</p>
    - `type` 'AWS::EC2::VPC' | 'AWS::AvailabilityZone' | 'AWS::EC2::Subnet' | 'AWS::AWSService' | 'AWS::Region', required — The type of the remote resource. Valid values are <code>AWS::EC2::VPC</code> <code>AWS::AvailabilityZone</code>, <code>AWS::EC2::Subnet</code>, <code>AWS::AWSService</code>, or <code>AWS::Region</code>.
    - `identifier` string, required — The identifier of the remote resource. For a VPC or subnet, this identifier is the VPC Amazon Resource Name (ARN) or subnet ARN. For an Availability Zone, this identifier is the AZ name, for example, us-west-2b. For an Amazon Web Services Region , this identifier is the Region name, for example, us-west-2.
  - `createdAt` string, date-time, required — The date and time when the monitor was created.
  - `modifiedAt` string, date-time, required — The last date and time that the monitor was modified.
  - `tags` object — The tags for a monitor.

## Other responses

- `480` — ResourceNotFoundException
- `481` — ValidationException
- `482` — ThrottlingException
- `483` — AccessDeniedException
- `484` — InternalServerException

---

[API](https://skmtc.net/aws/apis/networkflowmonitor.md) · [All operations](https://skmtc.net/aws/apis/networkflowmonitor/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/networkflowmonitor/revisions/06cd469f8f64/schema)
