Locking a Snapshot Policy
Lock a File Storage snapshot policy to prevent updates including pausing and unpausing the policy, moves, and deletions. Locks help protect resources against tampering.
OCI resource locks include the following types:
- Delete lock: Prevents deletion of the locked resource.
- Full lock: Prevents update, move, and deletion of the locked resource.
You can only add or remove one lock type at a time, but both locks can be applied to a resource. For example, you might initially apply a delete lock, but choose to apply a full lock at a later time.
The user who places a lock is the lock owner. Any authorized user with lock privilege or users with global manage permission of the tenancy has the authorization to create and remove any lock in the tenancy. You can override or remove locks.
Required IAM Policy
To create locks, in addition to permission to manage the snapshot policy, you need permissions to manage locks.
To lock a snapshot policy, you must have RESOURCE_LOCK_ADD
permissions.
- Open the navigation menu and select Storage. Under File Storage, select File Systems.
- (Optional) In the List scope section, under Compartment, select a compartment.
- Under Additional resources, click Snapshot Policies.
- Click the name of the snapshot policy that you want to lock.
- On the snapshot policy's details page, next to Resource Locking, select Add.
- In the Add Lock window, select the lock type and click Save changes.
Use the <TBD> command and required parameters to lock a snapshot policy:
oci fs filesystem-snapshot-policy
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the AddFilesystemSnapshotPolicyLock operation to lock a snapshot policy.
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.