# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities

__all__ = ['VrackIpv6RoutedSubrangeArgs', 'VrackIpv6RoutedSubrange']

@pulumi.input_type
class VrackIpv6RoutedSubrangeArgs:
    def __init__(__self__, *,
                 block: pulumi.Input[builtins.str],
                 nexthop: pulumi.Input[builtins.str],
                 routed_subrange: pulumi.Input[builtins.str],
                 service_name: pulumi.Input[builtins.str]):
        """
        The set of arguments for constructing a VrackIpv6RoutedSubrange resource.
        :param pulumi.Input[builtins.str] block: Your IPv6 block.
        :param pulumi.Input[builtins.str] nexthop: Next-hop IPv6 address (e.g., 2001:41d0:1:1994::1)
        :param pulumi.Input[builtins.str] routed_subrange: The subrange to route into your vRack, IPv6 CIDR notation (e.g., 2001:41d0::/128)
        :param pulumi.Input[builtins.str] service_name: The internal name of your vrack
        """
        pulumi.set(__self__, "block", block)
        pulumi.set(__self__, "nexthop", nexthop)
        pulumi.set(__self__, "routed_subrange", routed_subrange)
        pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter
    def block(self) -> pulumi.Input[builtins.str]:
        """
        Your IPv6 block.
        """
        return pulumi.get(self, "block")

    @block.setter
    def block(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "block", value)

    @property
    @pulumi.getter
    def nexthop(self) -> pulumi.Input[builtins.str]:
        """
        Next-hop IPv6 address (e.g., 2001:41d0:1:1994::1)
        """
        return pulumi.get(self, "nexthop")

    @nexthop.setter
    def nexthop(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "nexthop", value)

    @property
    @pulumi.getter(name="routedSubrange")
    def routed_subrange(self) -> pulumi.Input[builtins.str]:
        """
        The subrange to route into your vRack, IPv6 CIDR notation (e.g., 2001:41d0::/128)
        """
        return pulumi.get(self, "routed_subrange")

    @routed_subrange.setter
    def routed_subrange(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "routed_subrange", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> pulumi.Input[builtins.str]:
        """
        The internal name of your vrack
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class _VrackIpv6RoutedSubrangeState:
    def __init__(__self__, *,
                 block: Optional[pulumi.Input[builtins.str]] = None,
                 nexthop: Optional[pulumi.Input[builtins.str]] = None,
                 routed_subrange: Optional[pulumi.Input[builtins.str]] = None,
                 service_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering VrackIpv6RoutedSubrange resources.
        :param pulumi.Input[builtins.str] block: Your IPv6 block.
        :param pulumi.Input[builtins.str] nexthop: Next-hop IPv6 address (e.g., 2001:41d0:1:1994::1)
        :param pulumi.Input[builtins.str] routed_subrange: The subrange to route into your vRack, IPv6 CIDR notation (e.g., 2001:41d0::/128)
        :param pulumi.Input[builtins.str] service_name: The internal name of your vrack
        """
        if block is not None:
            pulumi.set(__self__, "block", block)
        if nexthop is not None:
            pulumi.set(__self__, "nexthop", nexthop)
        if routed_subrange is not None:
            pulumi.set(__self__, "routed_subrange", routed_subrange)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter
    def block(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        Your IPv6 block.
        """
        return pulumi.get(self, "block")

    @block.setter
    def block(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "block", value)

    @property
    @pulumi.getter
    def nexthop(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        Next-hop IPv6 address (e.g., 2001:41d0:1:1994::1)
        """
        return pulumi.get(self, "nexthop")

    @nexthop.setter
    def nexthop(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "nexthop", value)

    @property
    @pulumi.getter(name="routedSubrange")
    def routed_subrange(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        The subrange to route into your vRack, IPv6 CIDR notation (e.g., 2001:41d0::/128)
        """
        return pulumi.get(self, "routed_subrange")

    @routed_subrange.setter
    def routed_subrange(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "routed_subrange", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        The internal name of your vrack
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "service_name", value)


@pulumi.type_token("ovh:index/vrackIpv6RoutedSubrange:VrackIpv6RoutedSubrange")
class VrackIpv6RoutedSubrange(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 block: Optional[pulumi.Input[builtins.str]] = None,
                 nexthop: Optional[pulumi.Input[builtins.str]] = None,
                 routed_subrange: Optional[pulumi.Input[builtins.str]] = None,
                 service_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        Route a subrange of your IP v6 block into your vrack.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_ovh as ovh

        vrack_routed_subrange = ovh.VrackIpv6RoutedSubrange("vrack_routed_subrange",
            service_name="<vRack service name>",
            block="<ipv6 block>",
            routed_subrange="<routed subrange>",
            nexthop="<nexthop>")
        ```

        ## Import

        Routing of an subrange into your vRack can be imported using the `service_name` (vRack identifier), the `block` (IPv6 block) and the `routed_subrange (IPv6 block)`, separated by "," E.g.,

        bash

        ```sh
        $ pulumi import ovh:index/vrackIpv6RoutedSubrange:VrackIpv6RoutedSubrange myroutedsubrange "<service_name>,<block>,<routed_subrange>"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] block: Your IPv6 block.
        :param pulumi.Input[builtins.str] nexthop: Next-hop IPv6 address (e.g., 2001:41d0:1:1994::1)
        :param pulumi.Input[builtins.str] routed_subrange: The subrange to route into your vRack, IPv6 CIDR notation (e.g., 2001:41d0::/128)
        :param pulumi.Input[builtins.str] service_name: The internal name of your vrack
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: VrackIpv6RoutedSubrangeArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Route a subrange of your IP v6 block into your vrack.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_ovh as ovh

        vrack_routed_subrange = ovh.VrackIpv6RoutedSubrange("vrack_routed_subrange",
            service_name="<vRack service name>",
            block="<ipv6 block>",
            routed_subrange="<routed subrange>",
            nexthop="<nexthop>")
        ```

        ## Import

        Routing of an subrange into your vRack can be imported using the `service_name` (vRack identifier), the `block` (IPv6 block) and the `routed_subrange (IPv6 block)`, separated by "," E.g.,

        bash

        ```sh
        $ pulumi import ovh:index/vrackIpv6RoutedSubrange:VrackIpv6RoutedSubrange myroutedsubrange "<service_name>,<block>,<routed_subrange>"
        ```

        :param str resource_name: The name of the resource.
        :param VrackIpv6RoutedSubrangeArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(VrackIpv6RoutedSubrangeArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 block: Optional[pulumi.Input[builtins.str]] = None,
                 nexthop: Optional[pulumi.Input[builtins.str]] = None,
                 routed_subrange: Optional[pulumi.Input[builtins.str]] = None,
                 service_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = VrackIpv6RoutedSubrangeArgs.__new__(VrackIpv6RoutedSubrangeArgs)

            if block is None and not opts.urn:
                raise TypeError("Missing required property 'block'")
            __props__.__dict__["block"] = block
            if nexthop is None and not opts.urn:
                raise TypeError("Missing required property 'nexthop'")
            __props__.__dict__["nexthop"] = nexthop
            if routed_subrange is None and not opts.urn:
                raise TypeError("Missing required property 'routed_subrange'")
            __props__.__dict__["routed_subrange"] = routed_subrange
            if service_name is None and not opts.urn:
                raise TypeError("Missing required property 'service_name'")
            __props__.__dict__["service_name"] = service_name
        super(VrackIpv6RoutedSubrange, __self__).__init__(
            'ovh:index/vrackIpv6RoutedSubrange:VrackIpv6RoutedSubrange',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            block: Optional[pulumi.Input[builtins.str]] = None,
            nexthop: Optional[pulumi.Input[builtins.str]] = None,
            routed_subrange: Optional[pulumi.Input[builtins.str]] = None,
            service_name: Optional[pulumi.Input[builtins.str]] = None) -> 'VrackIpv6RoutedSubrange':
        """
        Get an existing VrackIpv6RoutedSubrange resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] block: Your IPv6 block.
        :param pulumi.Input[builtins.str] nexthop: Next-hop IPv6 address (e.g., 2001:41d0:1:1994::1)
        :param pulumi.Input[builtins.str] routed_subrange: The subrange to route into your vRack, IPv6 CIDR notation (e.g., 2001:41d0::/128)
        :param pulumi.Input[builtins.str] service_name: The internal name of your vrack
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _VrackIpv6RoutedSubrangeState.__new__(_VrackIpv6RoutedSubrangeState)

        __props__.__dict__["block"] = block
        __props__.__dict__["nexthop"] = nexthop
        __props__.__dict__["routed_subrange"] = routed_subrange
        __props__.__dict__["service_name"] = service_name
        return VrackIpv6RoutedSubrange(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def block(self) -> pulumi.Output[builtins.str]:
        """
        Your IPv6 block.
        """
        return pulumi.get(self, "block")

    @property
    @pulumi.getter
    def nexthop(self) -> pulumi.Output[builtins.str]:
        """
        Next-hop IPv6 address (e.g., 2001:41d0:1:1994::1)
        """
        return pulumi.get(self, "nexthop")

    @property
    @pulumi.getter(name="routedSubrange")
    def routed_subrange(self) -> pulumi.Output[builtins.str]:
        """
        The subrange to route into your vRack, IPv6 CIDR notation (e.g., 2001:41d0::/128)
        """
        return pulumi.get(self, "routed_subrange")

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> pulumi.Output[builtins.str]:
        """
        The internal name of your vrack
        """
        return pulumi.get(self, "service_name")

