Adding Locks to API Gateways and Resources

Find out how to add resource locks to API gateways and related resources with API Gateway.

You can add locks to the following API Gateway resources:

  • API gateways
  • APIs
  • API deployments
  • API Gateway certificates
  • SDKs
  • subscribers
  • usage plans

Required IAM Policy

To add locks to API gateways and related resources, you must belong to a group to which an IAM policy has granted the RESOURCE_LOCK_ADD permission in addition to permissions to manage the resources, or be a tenancy administrator.

For example, the policy might contain a policy statement similar to the following:

Allow group acme-apigw-developers to RESOURCE_LOCK_ADD in compartment acme-apigw-compartment
  • You can't use the Console to add a lock to an API gateway or related resource. Use the CLI or API.

  • To add a lock to a new API gateway or related resource that you are creating, use the --locks option with the appropriate oci api-gateway <resource> create command. For example:

    oci api-gateway sdk create [OPTIONS] --locks [complex type]

    To add a lock to an existing API gateway or related resource, use the appropriate oci api-gateway <resource> add-lock command. For example:

    oci api-gateway sdk add-lock [OPTIONS]

    For more information about using the CLI, see Command Line Interface (CLI). For a complete list of flags and options available for CLI commands, see CLI Help.

  • Use these API operations to add locks to existing API gateways and related resources:

    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.