---
title: "PATCH /scopes/{scopeId}"
method: PATCH
path: "/scopes/{scopeId}"
---

# PATCH /scopes/{scopeId}

`PATCH /scopes/{scopeId}`

Update a scope to add or remove resources that you want to be available for Network Flow Monitor to generate metrics for, when you have active agents on those resources sending metrics reports to the Network Flow Monitor backend.

## Path parameters

- `scopeId` string, required

## Request body

- object
  - `resourcesToAdd` TargetResource[] — A list of resources to add to a scope.
    - `targetIdentifier` object, required — A target identifier is a pair of identifying information for a scope. A target identifier is made up of a targetID (currently always an account ID) and a targetType (currently always an account).
      - `targetId` object, required — The identifier for a target, which is currently always an account ID .
        - `accountId` string — The identifier for the account for a target.
      - `targetType` 'ACCOUNT', required — The type of a target. A target type is currently always <code>ACCOUNT</code>.
    - `region` string, required — The Amazon Web Services Region for the scope.
  - `resourcesToDelete` TargetResource[] — A list of resources to delete from a scope.
    - `targetIdentifier` object, required — A target identifier is a pair of identifying information for a scope. A target identifier is made up of a targetID (currently always an account ID) and a targetType (currently always an account).
      - `targetId` object, required — The identifier for a target, which is currently always an account ID .
        - `accountId` string — The identifier for the account for a target.
      - `targetType` 'ACCOUNT', required — The type of a target. A target type is currently always <code>ACCOUNT</code>.
    - `region` string, required — The Amazon Web Services Region for the scope.

## Response `200`

Success

- UpdateScopeOutput
  - `scopeId` string, required — The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.
  - `status` 'SUCCEEDED' | 'IN_PROGRESS' | 'FAILED' | 'DEACTIVATING' | 'DEACTIVATED', required — <p>The status for a scope. The status can be one of the following: <code>SUCCEEDED</code>, <code>IN_PROGRESS</code>, <code>FAILED</code>, <code>DEACTIVATING</code>, or <code>DEACTIVATED</code>.</p> <p>A status of <code>DEACTIVATING</code> means that you've requested a scope to be deactivated and Network Flow Monitor is in the process of deactivating the scope. A status of <code>DEACTIVATED</code> means that the deactivating process is complete.</p>
  - `scopeArn` string, required — The Amazon Resource Name (ARN) of the scope.
  - `tags` object — The tags for a scope.

## Other responses

- `480` — ServiceQuotaExceededException
- `481` — ResourceNotFoundException
- `482` — ConflictException
- `483` — ValidationException
- `484` — ThrottlingException
- `485` — AccessDeniedException
- `486` — 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/versions/06cd469f8f64/schema)
