> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update

> Update the specified Dynamic Secrets Validation Rule.



## OpenAPI

````yaml PATCH /api/v1/secret-validation-rules/dynamic-secrets/{ruleId}
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/secret-validation-rules/dynamic-secrets/{ruleId}:
    patch:
      tags:
        - Secret Validation Rules
      description: Update the specified Dynamic Secrets Validation Rule.
      operationId: updateDynamicSecretsValidationRule
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: ruleId
          required: true
          description: The ID of the Dynamic Secrets Validation Rule to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: The updated name of the Dynamic Secrets Validation Rule.
                description:
                  type: string
                  maxLength: 500
                  nullable: true
                  description: >-
                    The updated description of the Dynamic Secrets Validation
                    Rule.
                environment:
                  type: string
                  minLength: 1
                  maxLength: 64
                  nullable: true
                  description: >-
                    The slug of the environment to scope this rule to. Pass null
                    to enforce the rule in every environment of the project.
                secretPath:
                  type: string
                  minLength: 1
                  maxLength: 1024
                  description: >-
                    The secret path to scope this rule to. Supports glob
                    patterns such as `/apps/**`.
                isActive:
                  type: boolean
                  description: >-
                    Whether the rule is enforced. An inactive rule is kept but
                    ignored.
                providers:
                  type: array
                  items:
                    type: string
                    enum:
                      - sql-database
                      - milvus
                  minItems: 1
                  description: >-
                    The dynamic secret providers this rule applies to. A lease
                    is only constrained when its provider is listed here.
                passwordConstraints:
                  type: object
                  properties:
                    minLength:
                      type: integer
                      minimum: 1
                      maximum: 2048
                      description: >-
                        The minimum number of characters the generated password
                        must contain.
                    maxLength:
                      type: integer
                      minimum: 1
                      maximum: 2048
                      description: >-
                        The maximum number of characters the generated password
                        may contain.
                    regexPattern:
                      type: string
                      minLength: 1
                      maxLength: 4096
                      description: A regular expression the generated password must match.
                    requiredPrefix:
                      type: string
                      minLength: 1
                      maxLength: 1024
                      description: A string the generated password must start with.
                    requiredSuffix:
                      type: string
                      minLength: 1
                      maxLength: 1024
                      description: A string the generated password must end with.
                  additionalProperties: false
                  description: >-
                    Constraints the generated password must satisfy. These
                    replace any password requirements configured on the resource
                    itself.
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  secretValidationRule:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      projectId:
                        type: string
                      secretPath:
                        type: string
                      isActive:
                        type: boolean
                        default: true
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      environment:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                          slug:
                            type: string
                        required:
                          - id
                          - name
                          - slug
                        additionalProperties: false
                        nullable: true
                      type:
                        type: string
                        enum:
                          - dynamic-secrets
                      providers:
                        type: array
                        items:
                          type: string
                          enum:
                            - sql-database
                            - milvus
                        minItems: 1
                        description: >-
                          The dynamic secret providers this rule applies to. A
                          lease is only constrained when its provider is listed
                          here.
                      passwordConstraints:
                        type: object
                        properties:
                          minLength:
                            type: integer
                            minimum: 1
                            maximum: 2048
                            description: >-
                              The minimum number of characters the generated
                              password must contain.
                          maxLength:
                            type: integer
                            minimum: 1
                            maximum: 2048
                            description: >-
                              The maximum number of characters the generated
                              password may contain.
                          regexPattern:
                            type: string
                            minLength: 1
                            maxLength: 4096
                            description: >-
                              A regular expression the generated password must
                              match.
                          requiredPrefix:
                            type: string
                            minLength: 1
                            maxLength: 1024
                            description: A string the generated password must start with.
                          requiredSuffix:
                            type: string
                            minLength: 1
                            maxLength: 1024
                            description: A string the generated password must end with.
                        additionalProperties: false
                        description: >-
                          Constraints the generated password must satisfy. These
                          replace any password requirements configured on the
                          resource itself.
                    required:
                      - id
                      - name
                      - projectId
                      - secretPath
                      - createdAt
                      - updatedAt
                      - environment
                      - type
                      - providers
                      - passwordConstraints
                    additionalProperties: false
                    title: Dynamic Secrets
                required:
                  - secretValidationRule
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````