Skip to content

create_odb_network

create_odb_network(
    display_name: ResourceDisplayName,
    client_subnet_cidr: str,
    *,
    config_overrides: Optional[odbClientConfig] = None,
    availability_zone: Optional[str] = None,
    availability_zone_id: Optional[str] = None,
    backup_subnet_cidr: Optional[str] = None,
    custom_domain_name: Optional[str] = None,
    default_dns_prefix: Optional[str] = None,
    client_token: Optional[GeneralInputString] = None,
    s3_access: Optional[Access] = None,
    zero_etl_access: Optional[Access] = None,
    sts_access: Optional[Access] = None,
    kms_access: Optional[Access] = None,
    s3_policy_document: Optional[PolicyDocument] = None,
    sts_policy_document: Optional[PolicyDocument] = None,
    kms_policy_document: Optional[PolicyDocument] = None,
    cross_region_s3_restore_sources_to_enable: Optional[StringList] = None,
    tags: Optional[RequestTagMap] = None,
) -> CreateOdbNetworkOutput

Creates an ODB network.

Parameters:

  • display_name (ResourceDisplayName) –

    A user-friendly name for the ODB network.

  • availability_zone (Optional[str], default: None ) –

    The Amazon Web Services Availability Zone (AZ) where the ODB network is located.

    This operation requires that you specify a value for either availabilityZone or availabilityZoneId.

  • availability_zone_id (Optional[str], default: None ) –

    The AZ ID of the AZ where the ODB network is located.

    This operation requires that you specify a value for either availabilityZone or availabilityZoneId.

  • client_subnet_cidr (str) –

    The CIDR range of the client subnet for the ODB network.

    Constraints:

    • Must not overlap with the CIDR range of the backup subnet.

    • Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.

    • Must not use the following CIDR ranges that are reserved by OCI:

      • 100.106.0.0/16 and 100.107.0.0/16

      • 169.254.0.0/16

      • 224.0.0.0 - 239.255.255.255

      • 240.0.0.0 - 255.255.255.255

  • backup_subnet_cidr (Optional[str], default: None ) –

    The CIDR range of the backup subnet for the ODB network.

    Constraints:

    • Must not overlap with the CIDR range of the client subnet.

    • Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.

    • Must not use the following CIDR ranges that are reserved by OCI:

      • 100.106.0.0/16 and 100.107.0.0/16

      • 169.254.0.0/16

      • 224.0.0.0 - 239.255.255.255

      • 240.0.0.0 - 255.255.255.255

  • custom_domain_name (Optional[str], default: None ) –

    The domain name to use for the resources in the ODB network.

  • default_dns_prefix (Optional[str], default: None ) –

    The DNS prefix to the default DNS domain name. The default DNS domain name is oraclevcn.com.

  • client_token (Optional[GeneralInputString], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency. The client token is valid for up to 24 hours after it's first used.

  • s3_access (Optional[Access], default: None ) –

    Specifies the configuration for Amazon S3 access from the ODB network.

  • zero_etl_access (Optional[Access], default: None ) –

    Specifies the configuration for Zero-ETL access from the ODB network.

  • sts_access (Optional[Access], default: None ) –

    The Amazon Web Services Security Token Service (STS) access configuration for the ODB network.

  • kms_access (Optional[Access], default: None ) –

    The Amazon Web Services Key Management Service (KMS) access configuration for the ODB network.

  • s3_policy_document (Optional[PolicyDocument], default: None ) –

    Specifies the endpoint policy for Amazon S3 access from the ODB network.

  • sts_policy_document (Optional[PolicyDocument], default: None ) –

    The Amazon Web Services Security Token Service (STS) policy document that defines permissions for token service usage within the ODB network.

  • kms_policy_document (Optional[PolicyDocument], default: None ) –

    The Amazon Web Services Key Management Service (KMS) policy document that defines permissions for key usage within the ODB network.

  • cross_region_s3_restore_sources_to_enable (Optional[StringList], default: None ) –

    The cross-Region Amazon S3 restore sources to enable for the ODB network.

  • tags (Optional[RequestTagMap], default: None ) –

    The list of resource tags to apply to the ODB network.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.

  • ConflictException –

    Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.

  • InternalServerException –

    Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.

  • ServiceQuotaExceededException –

    You have exceeded the service quota.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request has failed validation because it is missing required fields or has invalid inputs.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_odb/_services/odb.py
def create_odb_network(
    self,
    display_name: "capo_odb.types.resource_display_name.ResourceDisplayName",
    client_subnet_cidr: str,
    *,
    config_overrides: Optional[odbClientConfig] = None,
    availability_zone: Optional[str] = None,
    availability_zone_id: Optional[str] = None,
    backup_subnet_cidr: Optional[str] = None,
    custom_domain_name: Optional[str] = None,
    default_dns_prefix: Optional[str] = None,
    client_token: Optional[
        "capo_odb.types.general_input_string.GeneralInputString"
    ] = None,
    s3_access: Optional["capo_odb.types.access.Access"] = None,
    zero_etl_access: Optional["capo_odb.types.access.Access"] = None,
    sts_access: Optional["capo_odb.types.access.Access"] = None,
    kms_access: Optional["capo_odb.types.access.Access"] = None,
    s3_policy_document: Optional[
        "capo_odb.types.policy_document.PolicyDocument"
    ] = None,
    sts_policy_document: Optional[
        "capo_odb.types.policy_document.PolicyDocument"
    ] = None,
    kms_policy_document: Optional[
        "capo_odb.types.policy_document.PolicyDocument"
    ] = None,
    cross_region_s3_restore_sources_to_enable: Optional[
        "capo_odb.types.string_list.StringList"
    ] = None,
    tags: Optional["capo_odb.types.request_tag_map.RequestTagMap"] = None,
) -> "capo_odb.types.create_odb_network_output.CreateOdbNetworkOutput":
    """<p>Creates an ODB network.</p>

    Args:
        display_name: <p>A user-friendly name for the ODB network.</p>
        availability_zone: <p>The Amazon Web Services Availability Zone (AZ) where the ODB network is located.</p> <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
        availability_zone_id: <p>The AZ ID of the AZ where the ODB network is located.</p> <p>This operation requires that you specify a value for either <code>availabilityZone</code> or <code>availabilityZoneId</code>.</p>
        client_subnet_cidr: <p>The CIDR range of the client subnet for the ODB network.</p> <p>Constraints:</p> <ul> <li> <p>Must not overlap with the CIDR range of the backup subnet.</p> </li> <li> <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p> </li> <li> <p>Must not use the following CIDR ranges that are reserved by OCI:</p> <ul> <li> <p> <code>100.106.0.0/16</code> and <code>100.107.0.0/16</code> </p> </li> <li> <p> <code>169.254.0.0/16</code> </p> </li> <li> <p> <code>224.0.0.0 - 239.255.255.255</code> </p> </li> <li> <p> <code>240.0.0.0 - 255.255.255.255</code> </p> </li> </ul> </li> </ul>
        backup_subnet_cidr: <p>The CIDR range of the backup subnet for the ODB network.</p> <p>Constraints:</p> <ul> <li> <p>Must not overlap with the CIDR range of the client subnet.</p> </li> <li> <p>Must not overlap with the CIDR ranges of the VPCs that are connected to the ODB network.</p> </li> <li> <p>Must not use the following CIDR ranges that are reserved by OCI:</p> <ul> <li> <p> <code>100.106.0.0/16</code> and <code>100.107.0.0/16</code> </p> </li> <li> <p> <code>169.254.0.0/16</code> </p> </li> <li> <p> <code>224.0.0.0 - 239.255.255.255</code> </p> </li> <li> <p> <code>240.0.0.0 - 255.255.255.255</code> </p> </li> </ul> </li> </ul>
        custom_domain_name: <p>The domain name to use for the resources in the ODB network.</p>
        default_dns_prefix: <p>The DNS prefix to the default DNS domain name. The default DNS domain name is oraclevcn.com.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to ensure idempotency. The client token is valid for up to 24 hours after it's first used.</p>
        s3_access: <p>Specifies the configuration for Amazon S3 access from the ODB network.</p>
        zero_etl_access: <p>Specifies the configuration for Zero-ETL access from the ODB network.</p>
        sts_access: <p>The Amazon Web Services Security Token Service (STS) access configuration for the ODB network.</p>
        kms_access: <p>The Amazon Web Services Key Management Service (KMS) access configuration for the ODB network.</p>
        s3_policy_document: <p>Specifies the endpoint policy for Amazon S3 access from the ODB network.</p>
        sts_policy_document: <p>The Amazon Web Services Security Token Service (STS) policy document that defines permissions for token service usage within the ODB network.</p>
        kms_policy_document: <p>The Amazon Web Services Key Management Service (KMS) policy document that defines permissions for key usage within the ODB network.</p>
        cross_region_s3_restore_sources_to_enable: <p>The cross-Region Amazon S3 restore sources to enable for the ODB network.</p>
        tags: <p>The list of resource tags to apply to the ODB network.</p>

    Raises:
        capo_odb.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.</p>
        capo_odb.errors.conflict_exception.ConflictException: <p>Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.</p>
        capo_odb.errors.internal_server_exception.InternalServerException: <p>Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.</p>
        capo_odb.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded the service quota.</p>
        capo_odb.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_odb.errors.validation_exception.ValidationException: <p>The request has failed validation because it is missing required fields or has invalid inputs.</p>
        capo_odb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_odb.types.create_odb_network_input.CreateOdbNetworkInput]",
    ) -> OperationResponse[
        "capo_odb.types.create_odb_network_output.CreateOdbNetworkOutput"
    ]:
        import capo_odb._operations.odb.create_odb_network

        output, http_response = (
            capo_odb._operations.odb.create_odb_network.create_odb_network(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateOdbNetwork")
    )
    input_: capo_odb.types.create_odb_network_input.CreateOdbNetworkInput = {
        "display_name": display_name,
        "client_subnet_cidr": client_subnet_cidr,
    }
    if availability_zone is not None:
        input_["availability_zone"] = availability_zone
    if availability_zone_id is not None:
        input_["availability_zone_id"] = availability_zone_id
    if backup_subnet_cidr is not None:
        input_["backup_subnet_cidr"] = backup_subnet_cidr
    if custom_domain_name is not None:
        input_["custom_domain_name"] = custom_domain_name
    if default_dns_prefix is not None:
        input_["default_dns_prefix"] = default_dns_prefix
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if s3_access is not None:
        input_["s3_access"] = s3_access
    if zero_etl_access is not None:
        input_["zero_etl_access"] = zero_etl_access
    if sts_access is not None:
        input_["sts_access"] = sts_access
    if kms_access is not None:
        input_["kms_access"] = kms_access
    if s3_policy_document is not None:
        input_["s3_policy_document"] = s3_policy_document
    if sts_policy_document is not None:
        input_["sts_policy_document"] = sts_policy_document
    if kms_policy_document is not None:
        input_["kms_policy_document"] = kms_policy_document
    if cross_region_s3_restore_sources_to_enable is not None:
        input_["cross_region_s3_restore_sources_to_enable"] = (
            cross_region_s3_restore_sources_to_enable
        )
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output