# Update

`PATCH /api/2.0/accounts/{account_id}/network-connectivity-configs/{network_connectivity_config_id}/private-endpoint-rules/{private_endpoint_rule_id}`

Updates a private endpoint rule. Currently only a private endpoint rule to customer-managed resources is allowed to be updated.

API scopes: networking

**AWS**

Updates a private endpoint rule.

## Path parameters

- `network_connectivity_config_id` (string, optional)
  The ID of a network connectivity configuration, which is the parent resource of this private endpoint rule object.
- `account_id` (string, optional)
  Your <Databricks> account ID. You can find your account ID in your <Databricks> accounts console.
- `private_endpoint_rule_id` (string, optional)
  Your private endpoint rule ID.

## Query parameters

- `update_mask` (string, optional)
  Example: `domain_names`

## Request body

- `private_endpoint_rule` (object, optional)
  - `rule_id` (string, optional)
    The ID of a private endpoint rule.
    Example: `728c1541-d6d1-4290-9a53-cdf01dd32d60`
  - `network_connectivity_config_id` (string, optional)
    The ID of a network connectivity configuration, which is the parent resource of this private endpoint rule object.
    Example: `d6df3889-eefc-4ddb-bbb4-613efcb30035`
  - `connection_state` (string, optional)
    The current status of this private endpoint. The private endpoint rules are effective only if the connection state
     is ESTABLISHED. Remember that you must approve new endpoints on your resources in the Cloud console
     before they take effect.
     The possible values are:
     - PENDING: The endpoint has been created and pending approval.
     - ESTABLISHED: The endpoint has been approved and is ready to use in your serverless compute resources.
     - REJECTED: Connection was rejected by the private link resource owner.
     - DISCONNECTED: Connection was removed by the private link resource owner, the private endpoint becomes informative and should be deleted for clean-up.
     - EXPIRED: If the endpoint was created but not approved in 14 days, it will be EXPIRED.
     - CREATING: The endpoint creation is in progress. Once successfully created, the state will transition to PENDING.
     - CREATE_FAILED: The endpoint creation failed. You can check the error_message field for more details.
    Possible values: `PRIVATE_LINK_CONNECTION_STATE_UNSPECIFIED`, `ESTABLISHED`, `REJECTED`, `DISCONNECTED`, `EXPIRED`, `PENDING`, `CREATING`, `CREATE_FAILED`
    Example: `ESTABLISHED`
  - `domain_names` (array of string, optional)
    Only used by private endpoints to customer-managed private endpoint services.
    
     Domain names of target private link service.
     When updating this field, the full list of target domain_names must be specified.
    **AWS:** Only used by private endpoints towards a VPC endpoint service behind a customer-managed VPC endpoint service.
    
    The target AWS resource FQDNs accessible via the VPC endpoint service.
    When updating this field, we perform full update on this field. Please ensure a full list of desired domain_names is provided.
    Example: `my-example.exampledomain.com`
  - `creation_time` (int64, optional)
    Time in epoch milliseconds when this object was created.
    Example: `1691436121706`
  - `updated_time` (int64, optional)
    Time in epoch milliseconds when this object was updated.
    Example: `1691436121777`
  - `deactivated` (boolean, optional)
    Whether this private endpoint is deactivated.
    Example: `false`
  - `deactivated_at` (int64, optional)
    Time in epoch milliseconds when this object was deactivated.
    Example: `1691436121706`
  - `error_message` (string, optional)
    Example: `NOT_FOUND: The provided resource <input-resource> could not be found.`
  - `resource_id` (string, optional)
    The Azure resource ID of the target resource.
  - `group_id` (string, optional)
    Not used by customer-managed private endpoint services.
    
     The sub-resource type (group ID) of the target resource.
     Note that to connect to workspace root storage (root DBFS), you need two endpoints, one for blob and one for dfs.
    Example: `blob`
  - `endpoint_name` (string, optional)
    The name of the Azure private endpoint resource.
    Example: `databricks-088781b3-77fa-4132-b429-1af0d91bc593-pe-3cb31234`
  - `account_id` (string, optional)
    <Databricks> account ID. You can find your account ID from the Accounts Console.
    Example: `449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65`
  - `endpoint_service` (string, optional)
    The full target AWS endpoint service name that connects to the destination resources of the private endpoint.
    Example: `com.amazonaws.vpce.us-east-1.vpce-svc-123abcc1298abc123`
  - `resource_names` (array of string, optional)
    Only used by private endpoints towards AWS S3 service.
    
     The globally unique S3 bucket names that will be accessed via the VPC endpoint.
     The bucket names must be in the same region as the NCC/endpoint service.
     When updating this field, we perform full update on this field. Please ensure a full list of desired
     resource_names is provided.
    Example: `mybucket1`
  - `vpc_endpoint_id` (string, optional)
    The AWS VPC endpoint ID. You can use this ID to identify the VPC endpoint created by <Databricks>.
    Example: `vpce-02c2bd4e6dcd6c76d`
  - `enabled` (boolean, optional)
    Update this field to activate/deactivate this private endpoint to allow egress access from
     serverless compute resources. Only honored for first-party services on each cloud (e.g. AWS S3).
    Example: `true`
  - `gcp_endpoint` (object, required)
    - `psc_endpoint_uri` (string, optional)
      Output only. The URI of the created PSC endpoint.
      Example: `projects/databricks-egress/regions/us-east4/forwardingRules/1234567890`
    - `service_attachment` (string, required)
      The full url of the target service attachment.
       Example:
       projects/my-gcp-project/regions/us-east4/serviceAttachments/my-service-attachment
      Example: `projects/my-gcp-project/regions/us-east4/serviceAttachments/my-service-attachment`

## Returns

Returns the NccPrivateEndpointRule object.

## Response

```json
{
  "rule_id": "728c1541-d6d1-4290-9a53-cdf01dd32d60",
  "network_connectivity_config_id": "d6df3889-eefc-4ddb-bbb4-613efcb30035",
  "connection_state": "ESTABLISHED",
  "domain_names": "my-example.exampledomain.com",
  "creation_time": 1691436121706,
  "updated_time": 1691436121777,
  "deactivated": false,
  "deactivated_at": 1691436121706,
  "error_message": "NOT_FOUND: The provided resource \u003cinput-resource\u003e could not be found.",
  "resource_id": "/subscriptions/653bb673-1234-abcd-a90b-d064d5d53ca4/resourcegroups/example-resource-group/providers/Microsoft.Storage/storageAccounts/examplesa",
  "group_id": "blob",
  "endpoint_name": "databricks-088781b3-77fa-4132-b429-1af0d91bc593-pe-3cb31234",
  "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",
  "endpoint_service": "com.amazonaws.vpce.us-east-1.vpce-svc-123abcc1298abc123",
  "resource_names": "mybucket1",
  "vpc_endpoint_id": "vpce-02c2bd4e6dcd6c76d",
  "enabled": true,
  "gcp_endpoint": {
    "psc_endpoint_uri": "projects/databricks-egress/regions/us-east4/forwardingRules/1234567890",
    "service_attachment": "projects/my-gcp-project/regions/us-east4/serviceAttachments/my-service-attachment"
  }
}
```

