Skip to content

Delete Policy

bedrockagentcorecontrol_delete_policy R Documentation

Deletes an existing policy from the AgentCore Policy system

Description

Deletes an existing policy from the AgentCore Policy system. Once deleted, the policy can no longer be used for agent behavior control and all references to it become invalid. This is an asynchronous operation. Use the get_policy operation to poll the status field to track completion.

Usage

bedrockagentcorecontrol_delete_policy(policyEngineId, policyId)

Arguments

policyEngineId

[required] The identifier of the policy engine that manages the policy to be deleted. This ensures the policy is deleted from the correct policy engine context.

policyId

[required] The unique identifier of the policy to be deleted. This must be a valid policy ID that exists within the specified policy engine.

Value

A list with the following syntax:

list(
  policyId = "string",
  name = "string",
  policyEngineId = "string",
  createdAt = as.POSIXct(
    "2015-01-01"
  ),
  updatedAt = as.POSIXct(
    "2015-01-01"
  ),
  policyArn = "string",
  status = "CREATING"|"ACTIVE"|"UPDATING"|"DELETING"|"CREATE_FAILED"|"UPDATE_FAILED"|"DELETE_FAILED",
  definition = list(
    cedar = list(
      statement = "string"
    ),
    policyGeneration = list(
      policyGenerationId = "string",
      policyGenerationAssetId = "string"
    )
  ),
  description = "string",
  statusReasons = list(
    "string"
  )
)

Request syntax

svc$delete_policy(
  policyEngineId = "string",
  policyId = "string"
)