{
  "typeName" : "AWS::ODB::OdbNetwork",
  "description" : "The AWS::ODB::OdbNetwork resource creates an ODB Network",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that's 1 to 128 Unicode characters in length and can't be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., :, /, =, +, @, -, and \".",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that's 1 to 256 characters in length. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key" ]
    },
    "ManagedResourceStatus" : {
      "type" : "string",
      "description" : "The status of the managed resource access.",
      "enum" : [ "ENABLED", "ENABLING", "DISABLED", "DISABLING" ]
    },
    "CrossRegionS3RestoreSourcesAccess" : {
      "type" : "object",
      "description" : "The configuration access for the cross-Region Amazon S3 database restore source for the ODB network.",
      "additionalProperties" : false,
      "properties" : {
        "Status" : {
          "$ref" : "#/definitions/ManagedResourceStatus",
          "description" : "The current status of the cross-Region Amazon S3 restore access configuration."
        },
        "Ipv4Addresses" : {
          "type" : "array",
          "description" : "The IPv4 addresses allowed for cross-Region Amazon S3 restore access.",
          "uniqueItems" : false,
          "insertionOrder" : false,
          "items" : {
            "type" : "string"
          }
        },
        "Region" : {
          "type" : "string",
          "description" : "The AWS-Region for cross-Region Amazon S3 restore access."
        }
      }
    },
    "ManagedServices" : {
      "description" : "The managed services configuration for the ODB network.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ServiceNetworkArn" : {
          "type" : "string",
          "description" : "The Amazon Resource Name (ARN) of the service network."
        },
        "ResourceGatewayArn" : {
          "type" : "string",
          "description" : "The Amazon Resource Name (ARN) of the resource gateway."
        },
        "ManagedServicesIpv4Cidrs" : {
          "type" : "array",
          "description" : "The IPv4 CIDR blocks for the managed services.",
          "uniqueItems" : false,
          "insertionOrder" : false,
          "items" : {
            "type" : "string"
          }
        },
        "ServiceNetworkEndpoint" : {
          "type" : "object",
          "description" : "The service network endpoint configuration.",
          "additionalProperties" : false,
          "properties" : {
            "VpcEndpointId" : {
              "type" : "string",
              "description" : "The identifier of the VPC endpoint."
            },
            "VpcEndpointType" : {
              "type" : "string",
              "description" : "The type of the VPC endpoint.",
              "enum" : [ "SERVICENETWORK" ]
            }
          }
        },
        "ManagedS3BackupAccess" : {
          "type" : "object",
          "description" : "The managed Amazon S3 backup access configuration.",
          "additionalProperties" : false,
          "properties" : {
            "Status" : {
              "$ref" : "#/definitions/ManagedResourceStatus",
              "description" : "The status of the managed Amazon S3 backup access."
            },
            "Ipv4Addresses" : {
              "type" : "array",
              "description" : "The IPv4 addresses for the managed Amazon S3 backup access.",
              "uniqueItems" : false,
              "insertionOrder" : false,
              "items" : {
                "type" : "string"
              }
            }
          }
        },
        "ZeroEtlAccess" : {
          "type" : "object",
          "description" : "The Zero-ETL access configuration.",
          "additionalProperties" : false,
          "properties" : {
            "Status" : {
              "$ref" : "#/definitions/ManagedResourceStatus",
              "description" : "The status of the Zero-ETL access."
            },
            "Cidr" : {
              "type" : "string",
              "description" : "The CIDR block for the Zero-ETL access."
            }
          }
        },
        "S3Access" : {
          "type" : "object",
          "description" : "The Amazon S3 access configuration.",
          "additionalProperties" : false,
          "properties" : {
            "Status" : {
              "$ref" : "#/definitions/ManagedResourceStatus",
              "description" : "The status of the Amazon S3 access."
            },
            "Ipv4Addresses" : {
              "type" : "array",
              "description" : "The IPv4 addresses for the Amazon S3 access.",
              "uniqueItems" : false,
              "insertionOrder" : false,
              "items" : {
                "type" : "string"
              }
            },
            "DomainName" : {
              "type" : "string",
              "description" : "The domain name for the Amazon S3 access."
            },
            "S3PolicyDocument" : {
              "type" : "string",
              "description" : "The endpoint policy for the Amazon S3 access."
            }
          }
        },
        "KmsAccess" : {
          "type" : "object",
          "description" : "The AWS Key Management Service (KMS) access configuration.",
          "additionalProperties" : false,
          "properties" : {
            "Status" : {
              "$ref" : "#/definitions/ManagedResourceStatus",
              "description" : "The status of the AWS KMS access."
            },
            "Ipv4Addresses" : {
              "type" : "array",
              "description" : "The IPv4 addresses for the AWS KMS access.",
              "uniqueItems" : false,
              "insertionOrder" : false,
              "items" : {
                "type" : "string"
              }
            },
            "DomainName" : {
              "type" : "string",
              "description" : "The domain name for the AWS KMS access."
            },
            "KmsPolicyDocument" : {
              "type" : "string",
              "description" : "The endpoint policy for the AWS KMS access."
            }
          }
        },
        "StsAccess" : {
          "type" : "object",
          "description" : "The AWS Security Token Service (STS) access configuration.",
          "additionalProperties" : false,
          "properties" : {
            "Status" : {
              "$ref" : "#/definitions/ManagedResourceStatus",
              "description" : "The status of the AWS STS access."
            },
            "Ipv4Addresses" : {
              "type" : "array",
              "description" : "The IPv4 addresses for the AWS STS access.",
              "uniqueItems" : false,
              "insertionOrder" : false,
              "items" : {
                "type" : "string"
              }
            },
            "DomainName" : {
              "type" : "string",
              "description" : "The domain name for the AWS STS access."
            },
            "StsPolicyDocument" : {
              "type" : "string",
              "description" : "The endpoint policy for the AWS STS access."
            }
          }
        },
        "CrossRegionS3RestoreSourcesAccess" : {
          "type" : "array",
          "description" : "The access configuration for the cross-Region Amazon S3 database restore source.",
          "insertionOrder" : false,
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/CrossRegionS3RestoreSourcesAccess"
          }
        }
      }
    }
  },
  "properties" : {
    "AvailabilityZone" : {
      "type" : "string",
      "description" : "The AWS Availability Zone (AZ) where the ODB network is located.",
      "minLength" : 1,
      "maxLength" : 255
    },
    "AvailabilityZoneId" : {
      "type" : "string",
      "description" : "The AZ ID of the AZ where the ODB network is located.",
      "minLength" : 1,
      "maxLength" : 255
    },
    "BackupSubnetCidr" : {
      "type" : "string",
      "description" : "The CIDR range of the backup subnet in the ODB network.",
      "minLength" : 1,
      "maxLength" : 255
    },
    "ClientSubnetCidr" : {
      "type" : "string",
      "description" : "The CIDR range of the client subnet in the ODB network.",
      "minLength" : 1,
      "maxLength" : 255
    },
    "CustomDomainName" : {
      "type" : "string",
      "description" : "The domain name to use for the resources in the ODB network.",
      "minLength" : 1,
      "maxLength" : 255
    },
    "DefaultDnsPrefix" : {
      "type" : "string",
      "description" : "The DNS prefix to the default DNS domain name. The default DNS domain name is oraclevcn.com.",
      "minLength" : 1,
      "maxLength" : 255
    },
    "DeleteAssociatedResources" : {
      "type" : "boolean",
      "description" : "Specifies whether to delete associated OCI networking resources along with the ODB network."
    },
    "DisplayName" : {
      "type" : "string",
      "description" : "The user-friendly name of the ODB network.",
      "pattern" : "^[a-zA-Z_](?!.*--)[a-zA-Z0-9_-]*$",
      "minLength" : 1,
      "maxLength" : 255
    },
    "OciNetworkAnchorId" : {
      "type" : "string",
      "description" : "The unique identifier of the OCI network anchor for the ODB network.",
      "minLength" : 1,
      "maxLength" : 255
    },
    "OciResourceAnchorName" : {
      "type" : "string",
      "description" : "The name of the OCI resource anchor that's associated with the ODB network."
    },
    "OciVcnUrl" : {
      "type" : "string",
      "description" : "The URL for the VCN that's associated with the ODB network."
    },
    "OdbNetworkArn" : {
      "type" : "string",
      "description" : "The Amazon Resource Name (ARN) of the ODB network."
    },
    "OdbNetworkId" : {
      "type" : "string",
      "description" : "The unique identifier of the ODB network."
    },
    "S3Access" : {
      "type" : "string",
      "description" : "Specifies the configuration for Amazon S3 access from the ODB network.",
      "enum" : [ "ENABLED", "DISABLED" ]
    },
    "S3PolicyDocument" : {
      "type" : "string",
      "description" : "Specifies the endpoint policy for Amazon S3 access from the ODB network."
    },
    "KmsAccess" : {
      "type" : "string",
      "description" : "The AWS Key Management Service (KMS) access configuration for the ODB network.",
      "enum" : [ "ENABLED", "DISABLED" ]
    },
    "KmsPolicyDocument" : {
      "type" : "string",
      "description" : "The AWS Key Management Service (KMS) policy document that defines permissions for key usage within the ODB network."
    },
    "StsAccess" : {
      "type" : "string",
      "description" : "The AWS Security Token Service (STS) access configuration for the ODB network.",
      "enum" : [ "ENABLED", "DISABLED" ]
    },
    "StsPolicyDocument" : {
      "type" : "string",
      "description" : "The AWS Security Token Service (STS) policy document that defines permissions for token service usage within the ODB network."
    },
    "CrossRegionS3RestoreSources" : {
      "type" : "array",
      "description" : "The cross-Region Amazon S3 restore sources for the ODB network.",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "type" : "string"
      }
    },
    "Tags" : {
      "type" : "array",
      "description" : "Tags to assign to the Odb Network.",
      "insertionOrder" : false,
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "ManagedServices" : {
      "$ref" : "#/definitions/ManagedServices"
    },
    "ZeroEtlAccess" : {
      "type" : "string",
      "description" : "Specifies the configuration for Zero-ETL access from the ODB network.",
      "enum" : [ "ENABLED", "DISABLED" ]
    }
  },
  "additionalProperties" : false,
  "createOnlyProperties" : [ "/properties/AvailabilityZone", "/properties/AvailabilityZoneId", "/properties/BackupSubnetCidr", "/properties/ClientSubnetCidr", "/properties/CustomDomainName", "/properties/DefaultDnsPrefix" ],
  "readOnlyProperties" : [ "/properties/ManagedServices", "/properties/OciNetworkAnchorId", "/properties/OciResourceAnchorName", "/properties/OciVcnUrl", "/properties/OdbNetworkArn", "/properties/OdbNetworkId" ],
  "writeOnlyProperties" : [ "/properties/DeleteAssociatedResources", "/properties/DefaultDnsPrefix", "/properties/S3Access", "/properties/S3PolicyDocument", "/properties/KmsAccess", "/properties/KmsPolicyDocument", "/properties/StsAccess", "/properties/StsPolicyDocument", "/properties/CrossRegionS3RestoreSources", "/properties/ZeroEtlAccess" ],
  "primaryIdentifier" : [ "/properties/OdbNetworkArn" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "odb:CreateOdbNetwork", "odb:TagResource", "ec2:DescribeAvailabilityZones", "iam:CreateServiceLinkedRole", "ec2:DescribeVpcs", "ec2:CreateOdbNetworkPeering", "odb:ListTagsForResource", "sts:GetCallerIdentity", "odb:GetOdbNetwork", "odb:ListOdbNetworks", "odb:UpdateOdbNetwork", "vpc-lattice:CreateServiceNetwork", "vpc-lattice:GetServiceNetwork", "vpc-lattice:CreateServiceNetworkResourceAssociation", "vpc-lattice:GetServiceNetworkResourceAssociation", "vpc-lattice:CreateResourceGateway", "vpc-lattice:GetResourceGateway", "vpc-lattice:CreateServiceNetworkVpcEndpointAssociation", "redshiftchannelmanagement:CreateChannel", "ec2:ModifyOdbNetworkPeering", "ec2:DescribeVpcEndpointAssociations", "ec2:CreateVpcEndpoint", "ec2:DescribeVpcEndpoints", "ec2:CreateTags" ],
      "timeoutInMinutes" : 2160
    },
    "read" : {
      "permissions" : [ "odb:GetOdbNetwork", "odb:ListOdbNetworks", "odb:ListTagsForResource", "sts:GetCallerIdentity", "vpc-lattice:GetServiceNetwork", "vpc-lattice:GetServiceNetworkResourceAssociation", "vpc-lattice:GetResourceGateway", "ec2:DescribeVpcEndpointAssociations", "ec2:DescribeVpcEndpoints" ]
    },
    "update" : {
      "permissions" : [ "odb:UpdateOdbNetwork", "odb:TagResource", "odb:UntagResource", "ec2:DescribeVpcs", "ec2:CreateOdbNetworkPeering", "ec2:DeleteOdbNetworkPeering", "odb:ListTagsForResource", "sts:GetCallerIdentity", "odb:GetOdbNetwork", "odb:ListOdbNetworks", "vpc-lattice:CreateServiceNetworkResourceAssociation", "vpc-lattice:DeleteServiceNetworkResourceAssociation", "vpc-lattice:GetServiceNetwork", "vpc-lattice:GetServiceNetworkResourceAssociation", "vpc-lattice:GetResourceGateway", "ec2:DescribeVpcEndpointAssociations", "ec2:DescribeVpcEndpoints" ]
    },
    "delete" : {
      "permissions" : [ "odb:DeleteOdbNetwork", "ec2:DeleteOdbNetworkPeering", "ec2:DescribeVpcs", "odb:ListTagsForResource", "sts:GetCallerIdentity", "odb:GetOdbNetwork", "odb:ListOdbNetworks", "vpc-lattice:DeleteServiceNetwork", "vpc-lattice:GetServiceNetwork", "vpc-lattice:DeleteServiceNetworkResourceAssociation", "vpc-lattice:GetServiceNetworkResourceAssociation", "vpc-lattice:DeleteResourceGateway", "vpc-lattice:GetResourceGateway", "ec2:ModifyOdbNetworkPeering", "ec2:DescribeVpcEndpointAssociations", "ec2:DeleteVpcEndpoints", "ec2:DescribeVpcEndpoints" ],
      "timeoutInMinutes" : 2160
    },
    "list" : {
      "permissions" : [ "odb:ListOdbNetworks", "odb:ListTagsForResource", "sts:GetCallerIdentity", "vpc-lattice:GetServiceNetwork", "vpc-lattice:GetServiceNetworkResourceAssociation", "vpc-lattice:GetResourceGateway", "ec2:DescribeVpcEndpointAssociations", "ec2:DescribeVpcEndpoints" ]
    }
  },
  "replacementStrategy" : "delete_then_create",
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "odb:TagResource", "odb:UntagResource", "odb:ListTagsForResource" ]
  }
}