{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-dns/json-schema/google-cloud-dns-operation-schema.json",
  "title": "Operation",
  "description": "An operation represents a successful mutation performed on a Cloud DNS resource. Operations provide: - An audit log of server resource mutations. - A way to recover/retry API calls in the case where the response is never received by the caller. Use the caller specified client_operation_id.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-dns-managed-zone-operations-api-openapi.yml#/components/schemas/Operation",
  "properties": {
    "user": {
      "description": "User who requested the operation, for example: user@example.com. cloud-dns-system for operations automatically done by the system. (output only)",
      "type": "string"
    },
    "kind": {
      "type": "string",
      "readOnly": true,
      "default": "dns#operation"
    },
    "dnsKeyContext": {
      "$ref": "#/$defs/OperationDnsKeyContext",
      "description": "Only populated if the operation targeted a DnsKey (output only)."
    },
    "id": {
      "description": "Unique identifier for the resource. This is the client_operation_id if the client specified it when the mutation was initiated, otherwise, it is generated by the server. The name must be 1-63 characters long and match the regular expression [-a-z0-9]? (output only)",
      "type": "string"
    },
    "zoneContext": {
      "$ref": "#/$defs/OperationManagedZoneContext",
      "description": "Only populated if the operation targeted a ManagedZone (output only)."
    },
    "type": {
      "type": "string",
      "description": "Type of the operation. Operations include insert, update, and delete (output only)."
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "done"
      ],
      "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only). A status of \"DONE\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet."
    },
    "startTime": {
      "description": "The time that this operation was started by the server. This is in RFC3339 text format (output only).",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "DnsKey": {
      "properties": {
        "id": {
          "description": "Unique identifier for the resource; defined by the server (output only).",
          "type": "string"
        },
        "keyLength": {
          "format": "uint32",
          "description": "Length of the key in bits. Specified at creation time, and then immutable.",
          "type": "integer"
        },
        "description": {
          "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the resource's function.",
          "type": "string"
        },
        "digests": {
          "description": "Cryptographic hashes of the DNSKEY resource record associated with this DnsKey. These digests are needed to construct a DS record that points at this DNS key. Output only.",
          "items": {
            "$ref": "#/$defs/DnsKeyDigest"
          },
          "type": "array"
        },
        "publicKey": {
          "type": "string",
          "description": "Base64 encoded public half of this key. Output only."
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "rsasha1",
            "rsasha256",
            "rsasha512",
            "ecdsap256sha256",
            "ecdsap384sha384"
          ],
          "description": "String mnemonic specifying the DNSSEC algorithm of this key. Immutable after creation time."
        },
        "type": {
          "type": "string",
          "enum": [
            "keySigning",
            "zoneSigning"
          ],
          "description": "One of \"KEY_SIGNING\" or \"ZONE_SIGNING\". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, are used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag is cleared, and this key is used to sign only resource record sets of other types. Immutable after creation time."
        },
        "isActive": {
          "type": "boolean",
          "description": "Active keys are used to sign subsequent changes to the ManagedZone. Inactive keys are still present as DNSKEY Resource Records for the use of resolvers validating existing signatures."
        },
        "kind": {
          "default": "dns#dnsKey",
          "type": "string",
          "readOnly": true
        },
        "creationTime": {
          "type": "string",
          "description": "The time that this resource was created in the control plane. This is in RFC3339 text format. Output only."
        },
        "keyTag": {
          "description": "The key tag is a non-cryptographic hash of the a DNSKEY resource record associated with this DnsKey. The key tag can be used to identify a DNSKEY more quickly (but it is not a unique identifier). In particular, the key tag is used in a parent zone's DS record to point at the DNSKEY in this child ManagedZone. The key tag is a number in the range [0, 65535] and the algorithm to calculate it is specified in RFC4034 Appendix B. Output only.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object",
      "description": "A DNSSEC key pair."
    },
    "DnsKeyDigest": {
      "type": "object",
      "properties": {
        "digest": {
          "description": "The base-16 encoded bytes of this digest. Suitable for use in a DS resource record.",
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "sha1",
            "sha256",
            "sha384"
          ],
          "description": "Specifies the algorithm used to calculate this digest."
        }
      }
    },
    "DnsKeySpec": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "default": "dns#dnsKeySpec",
          "readOnly": true
        },
        "keyLength": {
          "type": "integer",
          "description": "Length of the keys in bits.",
          "format": "uint32"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "rsasha1",
            "rsasha256",
            "rsasha512",
            "ecdsap256sha256",
            "ecdsap384sha384"
          ],
          "description": "String mnemonic specifying the DNSSEC algorithm of this key."
        },
        "keyType": {
          "type": "string",
          "enum": [
            "keySigning",
            "zoneSigning"
          ],
          "description": "Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, are only used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and are used to sign all other types of resource record sets."
        }
      },
      "description": "Parameters for DnsKey key generation. Used for generating initial keys for a new ManagedZone and as default when adding a new DnsKey."
    },
    "ManagedZone": {
      "description": "A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.",
      "properties": {
        "nameServers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Delegate your managed_zone to these virtual name servers; defined by the server (output only)"
        },
        "cloudLoggingConfig": {
          "$ref": "#/$defs/ManagedZoneCloudLoggingConfig"
        },
        "forwardingConfig": {
          "$ref": "#/$defs/ManagedZoneForwardingConfig",
          "description": "The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to."
        },
        "serviceDirectoryConfig": {
          "$ref": "#/$defs/ManagedZoneServiceDirectoryConfig",
          "description": "This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones."
        },
        "name": {
          "description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.",
          "type": "string"
        },
        "peeringConfig": {
          "$ref": "#/$defs/ManagedZonePeeringConfig",
          "description": "The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with."
        },
        "nameServerSet": {
          "description": "Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users leave this field unset. If you need to use this field, contact your account team.",
          "type": "string"
        },
        "reverseLookupConfig": {
          "$ref": "#/$defs/ManagedZoneReverseLookupConfig",
          "description": "The presence of this field indicates that this is a managed reverse lookup zone and Cloud DNS resolves reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config."
        },
        "kind": {
          "readOnly": true,
          "default": "dns#managedZone",
          "type": "string"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "User labels.",
          "type": "object"
        },
        "id": {
          "format": "uint64",
          "description": "Unique identifier for the resource; defined by the server (output only)",
          "type": "string"
        },
        "creationTime": {
          "description": "The time that this resource was created on the server. This is in RFC3339 text format. Output only.",
          "type": "string"
        },
        "dnsName": {
          "description": "The DNS name of this managed zone, for instance \"example.com.\".",
          "type": "string"
        },
        "visibility": {
          "description": "The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.",
          "type": "string",
          "enum": [
            "public",
            "private"
          ]
        },
        "description": {
          "type": "string",
          "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function."
        },
        "privateVisibilityConfig": {
          "$ref": "#/$defs/ManagedZonePrivateVisibilityConfig",
          "description": "For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from."
        },
        "dnssecConfig": {
          "$ref": "#/$defs/ManagedZoneDnsSecConfig",
          "description": "DNSSEC configuration."
        }
      },
      "type": "object"
    },
    "ManagedZoneCloudLoggingConfig": {
      "type": "object",
      "properties": {
        "kind": {
          "default": "dns#managedZoneCloudLoggingConfig",
          "readOnly": true,
          "type": "string"
        },
        "enableLogging": {
          "description": "If set, enable query logging for this ManagedZone. False by default, making logging opt-in.",
          "type": "boolean"
        }
      },
      "description": "Cloud Logging configurations for publicly visible zones."
    },
    "ManagedZoneDnsSecConfig": {
      "type": "object",
      "properties": {
        "defaultKeySpecs": {
          "items": {
            "$ref": "#/$defs/DnsKeySpec"
          },
          "type": "array",
          "description": "Specifies parameters for generating initial DnsKeys for this ManagedZone. Can only be changed while the state is OFF."
        },
        "nonExistence": {
          "description": "Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.",
          "type": "string",
          "enum": [
            "nsec",
            "nsec3"
          ]
        },
        "kind": {
          "readOnly": true,
          "type": "string",
          "default": "dns#managedZoneDnsSecConfig"
        },
        "state": {
          "description": "Specifies whether DNSSEC is enabled, and what mode it is in.",
          "type": "string",
          "enum": [
            "off",
            "on",
            "transfer"
          ]
        }
      }
    },
    "ManagedZoneForwardingConfig": {
      "type": "object",
      "properties": {
        "targetNameServers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ManagedZoneForwardingConfigNameServerTarget"
          },
          "description": "List of target name servers to forward to. Cloud DNS selects the best available name server if more than one target is given."
        },
        "outboundEndpoints": {
          "description": "The list of outbound endpoints to use for queries.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ManagedZoneForwardingConfigOutboundEndpoint"
          }
        },
        "kind": {
          "readOnly": true,
          "default": "dns#managedZoneForwardingConfig",
          "type": "string"
        }
      }
    },
    "ManagedZoneForwardingConfigNameServerTarget": {
      "type": "object",
      "properties": {
        "forwardingPath": {
          "type": "string",
          "enum": [
            "default",
            "private"
          ],
          "description": "Forwarding path for this NameServerTarget. If unset or set to DEFAULT, Cloud DNS makes forwarding decisions based on IP address ranges; that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud DNS always sends queries through the VPC network for this target."
        },
        "ipv4Address": {
          "description": "IPv4 address of a target name server.",
          "type": "string"
        },
        "ipv6Address": {
          "type": "string",
          "description": "IPv6 address of a target name server. Does not accept both fields (ipv4 & ipv6) being populated. Public preview as of November 2022."
        },
        "kind": {
          "default": "dns#managedZoneForwardingConfigNameServerTarget",
          "type": "string",
          "readOnly": true
        },
        "domainName": {
          "description": "Fully qualified domain name for the forwarding target.",
          "type": "string"
        }
      }
    },
    "ManagedZoneForwardingConfigOutboundEndpoint": {
      "properties": {
        "name": {
          "type": "string",
          "description": "Specified as a resource path including project and region. This should be formatted like projects/{project}/locations/{location}/outboundEndpoints/{endpoint}"
        },
        "kind": {
          "type": "string",
          "readOnly": true,
          "default": "dns#managedZoneForwardingConfigOutboundEndpoint"
        }
      },
      "type": "object"
    },
    "ManagedZonePeeringConfig": {
      "properties": {
        "kind": {
          "readOnly": true,
          "type": "string",
          "default": "dns#managedZonePeeringConfig"
        },
        "targetNetwork": {
          "$ref": "#/$defs/ManagedZonePeeringConfigTargetNetwork",
          "description": "The network with which to peer."
        }
      },
      "type": "object"
    },
    "ManagedZonePeeringConfigTargetNetwork": {
      "type": "object",
      "properties": {
        "networkUrl": {
          "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`",
          "type": "string"
        },
        "kind": {
          "type": "string",
          "readOnly": true,
          "default": "dns#managedZonePeeringConfigTargetNetwork"
        },
        "deactivateTime": {
          "type": "string",
          "description": "The time at which the zone was deactivated, in RFC 3339 date-time format. An empty string indicates that the peering connection is active. The producer network can deactivate a zone. The zone is automatically deactivated if the producer network that the zone targeted is deleted. Output only."
        }
      }
    },
    "ManagedZonePrivateVisibilityConfig": {
      "type": "object",
      "properties": {
        "networks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ManagedZonePrivateVisibilityConfigNetwork"
          },
          "description": "The list of VPC networks that can see this zone."
        },
        "gkeClusters": {
          "items": {
            "$ref": "#/$defs/ManagedZonePrivateVisibilityConfigGKECluster"
          },
          "type": "array",
          "description": "The list of Google Kubernetes Engine clusters that can see this zone."
        },
        "kind": {
          "type": "string",
          "default": "dns#managedZonePrivateVisibilityConfig",
          "readOnly": true
        }
      }
    },
    "ManagedZonePrivateVisibilityConfigGKECluster": {
      "type": "object",
      "properties": {
        "gkeClusterName": {
          "type": "string",
          "description": "The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get"
        },
        "kind": {
          "default": "dns#managedZonePrivateVisibilityConfigGKECluster",
          "type": "string",
          "readOnly": true
        }
      }
    },
    "ManagedZonePrivateVisibilityConfigNetwork": {
      "type": "object",
      "properties": {
        "kind": {
          "default": "dns#managedZonePrivateVisibilityConfigNetwork",
          "readOnly": true,
          "type": "string"
        },
        "networkUrl": {
          "type": "string",
          "description": "The fully qualified URL of the VPC network to bind to. Format this URL like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`"
        }
      }
    },
    "ManagedZoneReverseLookupConfig": {
      "type": "object",
      "properties": {
        "kind": {
          "default": "dns#managedZoneReverseLookupConfig",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "ManagedZoneServiceDirectoryConfig": {
      "description": "Contains information about Service Directory-backed zones.",
      "type": "object",
      "properties": {
        "namespace": {
          "$ref": "#/$defs/ManagedZoneServiceDirectoryConfigNamespace",
          "description": "Contains information about the namespace associated with the zone."
        },
        "kind": {
          "type": "string",
          "readOnly": true,
          "default": "dns#managedZoneServiceDirectoryConfig"
        }
      }
    },
    "ManagedZoneServiceDirectoryConfigNamespace": {
      "type": "object",
      "properties": {
        "deletionTime": {
          "description": "The time that the namespace backing this zone was deleted; an empty string if it still exists. This is in RFC3339 text format. Output only.",
          "type": "string"
        },
        "namespaceUrl": {
          "type": "string",
          "description": "The fully qualified URL of the namespace associated with the zone. Format must be `https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}`"
        },
        "kind": {
          "type": "string",
          "default": "dns#managedZoneServiceDirectoryConfigNamespace",
          "readOnly": true
        }
      }
    },
    "OperationDnsKeyContext": {
      "type": "object",
      "properties": {
        "newValue": {
          "$ref": "#/$defs/DnsKey",
          "description": "The post-operation DnsKey resource."
        },
        "oldValue": {
          "$ref": "#/$defs/DnsKey",
          "description": "The pre-operation DnsKey resource."
        }
      }
    },
    "OperationManagedZoneContext": {
      "type": "object",
      "properties": {
        "newValue": {
          "$ref": "#/$defs/ManagedZone",
          "description": "The post-operation ManagedZone resource."
        },
        "oldValue": {
          "$ref": "#/$defs/ManagedZone",
          "description": "The pre-operation ManagedZone resource."
        }
      }
    }
  }
}