1. Packages
  2. OVH
  3. API Docs
  4. Ip
  5. Move
OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud

ovh.Ip.Move

Explore with Pulumi AI

ovh logo
OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud

    Moves a given IP to a different service, or inversely, parks it if empty service is given

    Move IP 1.2.3.4 to service loadbalancer-XXXXX

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const moveIpToLoadBalancerXxxxx = new ovh.ip.Move("moveIpToLoadBalancerXxxxx", {
        ip: "1.2.3.4",
        routedTo: {
            serviceName: "loadbalancer-XXXXX",
        },
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    move_ip_to_load_balancer_xxxxx = ovh.ip.Move("moveIpToLoadBalancerXxxxx",
        ip="1.2.3.4",
        routed_to=ovh.ip.MoveRoutedToArgs(
            service_name="loadbalancer-XXXXX",
        ))
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Ip"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Ip.NewMove(ctx, "moveIpToLoadBalancerXxxxx", &Ip.MoveArgs{
    			Ip: pulumi.String("1.2.3.4"),
    			RoutedTo: &ip.MoveRoutedToArgs{
    				ServiceName: pulumi.String("loadbalancer-XXXXX"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var moveIpToLoadBalancerXxxxx = new Ovh.Ip.Move("moveIpToLoadBalancerXxxxx", new()
        {
            Ip = "1.2.3.4",
            RoutedTo = new Ovh.Ip.Inputs.MoveRoutedToArgs
            {
                ServiceName = "loadbalancer-XXXXX",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Ip.Move;
    import com.pulumi.ovh.Ip.MoveArgs;
    import com.pulumi.ovh.Ip.inputs.MoveRoutedToArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var moveIpToLoadBalancerXxxxx = new Move("moveIpToLoadBalancerXxxxx", MoveArgs.builder()        
                .ip("1.2.3.4")
                .routedTo(MoveRoutedToArgs.builder()
                    .serviceName("loadbalancer-XXXXX")
                    .build())
                .build());
    
        }
    }
    
    resources:
      moveIpToLoadBalancerXxxxx:
        type: ovh:Ip:Move
        properties:
          ip: 1.2.3.4
          routedTo:
            serviceName: loadbalancer-XXXXX
    

    Park IP/Detach IP 1.2.3.4 from any service

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const parkIp = new ovh.ip.Move("parkIp", {
        ip: "1.2.3.4",
        routedTo: {
            serviceName: "",
        },
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    park_ip = ovh.ip.Move("parkIp",
        ip="1.2.3.4",
        routed_to=ovh.ip.MoveRoutedToArgs(
            service_name="",
        ))
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Ip"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Ip.NewMove(ctx, "parkIp", &Ip.MoveArgs{
    			Ip: pulumi.String("1.2.3.4"),
    			RoutedTo: &ip.MoveRoutedToArgs{
    				ServiceName: pulumi.String(""),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var parkIp = new Ovh.Ip.Move("parkIp", new()
        {
            Ip = "1.2.3.4",
            RoutedTo = new Ovh.Ip.Inputs.MoveRoutedToArgs
            {
                ServiceName = "",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Ip.Move;
    import com.pulumi.ovh.Ip.MoveArgs;
    import com.pulumi.ovh.Ip.inputs.MoveRoutedToArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var parkIp = new Move("parkIp", MoveArgs.builder()        
                .ip("1.2.3.4")
                .routedTo(MoveRoutedToArgs.builder()
                    .serviceName("")
                    .build())
                .build());
    
        }
    }
    
    resources:
      parkIp:
        type: ovh:Ip:Move
        properties:
          ip: 1.2.3.4
          routedTo:
            serviceName:
    

    Create Move Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Move(name: string, args: MoveArgs, opts?: CustomResourceOptions);
    @overload
    def Move(resource_name: str,
             args: MoveArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Move(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             ip: Optional[str] = None,
             routed_to: Optional[_ip.MoveRoutedToArgs] = None,
             description: Optional[str] = None)
    func NewMove(ctx *Context, name string, args MoveArgs, opts ...ResourceOption) (*Move, error)
    public Move(string name, MoveArgs args, CustomResourceOptions? opts = null)
    public Move(String name, MoveArgs args)
    public Move(String name, MoveArgs args, CustomResourceOptions options)
    
    type: ovh:Ip:Move
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MoveArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MoveArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MoveArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MoveArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MoveArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var moveResource = new Ovh.Ip.Move("moveResource", new()
    {
        Ip = "string",
        RoutedTo = new Ovh.Ip.Inputs.MoveRoutedToArgs
        {
            ServiceName = "string",
        },
        Description = "string",
    });
    
    example, err := Ip.NewMove(ctx, "moveResource", &Ip.MoveArgs{
    	Ip: pulumi.String("string"),
    	RoutedTo: &ip.MoveRoutedToArgs{
    		ServiceName: pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    })
    
    var moveResource = new Move("moveResource", MoveArgs.builder()        
        .ip("string")
        .routedTo(MoveRoutedToArgs.builder()
            .serviceName("string")
            .build())
        .description("string")
        .build());
    
    move_resource = ovh.ip.Move("moveResource",
        ip="string",
        routed_to=ovh.ip.MoveRoutedToArgs(
            service_name="string",
        ),
        description="string")
    
    const moveResource = new ovh.ip.Move("moveResource", {
        ip: "string",
        routedTo: {
            serviceName: "string",
        },
        description: "string",
    });
    
    type: ovh:Ip:Move
    properties:
        description: string
        ip: string
        routedTo:
            serviceName: string
    

    Move Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Move resource accepts the following input properties:

    Ip string
    IP block that we want to attach to a different service
    RoutedTo MoveRoutedTo
    Service to route the IP to. If null, the IP will be parked instead of moved
    Description string
    Description attached to the IP
    Ip string
    IP block that we want to attach to a different service
    RoutedTo MoveRoutedToArgs
    Service to route the IP to. If null, the IP will be parked instead of moved
    Description string
    Description attached to the IP
    ip String
    IP block that we want to attach to a different service
    routedTo MoveRoutedTo
    Service to route the IP to. If null, the IP will be parked instead of moved
    description String
    Description attached to the IP
    ip string
    IP block that we want to attach to a different service
    routedTo MoveRoutedTo
    Service to route the IP to. If null, the IP will be parked instead of moved
    description string
    Description attached to the IP
    ip str
    IP block that we want to attach to a different service
    routed_to ip.MoveRoutedToArgs
    Service to route the IP to. If null, the IP will be parked instead of moved
    description str
    Description attached to the IP
    ip String
    IP block that we want to attach to a different service
    routedTo Property Map
    Service to route the IP to. If null, the IP will be parked instead of moved
    description String
    Description attached to the IP

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Move resource produces the following output properties:

    CanBeTerminated bool
    Whether IP service can be terminated
    Country string
    Country
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganisationId string
    IP block organisation Id
    ServiceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    TaskStartDate string
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    TaskStatus string
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    Type string
    Possible values for ip type
    CanBeTerminated bool
    Whether IP service can be terminated
    Country string
    Country
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganisationId string
    IP block organisation Id
    ServiceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    TaskStartDate string
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    TaskStatus string
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    Type string
    Possible values for ip type
    canBeTerminated Boolean
    Whether IP service can be terminated
    country String
    Country
    id String
    The provider-assigned unique ID for this managed resource.
    organisationId String
    IP block organisation Id
    serviceName String
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    taskStartDate String
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    taskStatus String
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type String
    Possible values for ip type
    canBeTerminated boolean
    Whether IP service can be terminated
    country string
    Country
    id string
    The provider-assigned unique ID for this managed resource.
    organisationId string
    IP block organisation Id
    serviceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    taskStartDate string
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    taskStatus string
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type string
    Possible values for ip type
    can_be_terminated bool
    Whether IP service can be terminated
    country str
    Country
    id str
    The provider-assigned unique ID for this managed resource.
    organisation_id str
    IP block organisation Id
    service_name str
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    task_start_date str
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    task_status str
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type str
    Possible values for ip type
    canBeTerminated Boolean
    Whether IP service can be terminated
    country String
    Country
    id String
    The provider-assigned unique ID for this managed resource.
    organisationId String
    IP block organisation Id
    serviceName String
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    taskStartDate String
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    taskStatus String
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type String
    Possible values for ip type

    Look up Existing Move Resource

    Get an existing Move resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MoveState, opts?: CustomResourceOptions): Move
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            can_be_terminated: Optional[bool] = None,
            country: Optional[str] = None,
            description: Optional[str] = None,
            ip: Optional[str] = None,
            organisation_id: Optional[str] = None,
            routed_to: Optional[_ip.MoveRoutedToArgs] = None,
            service_name: Optional[str] = None,
            task_start_date: Optional[str] = None,
            task_status: Optional[str] = None,
            type: Optional[str] = None) -> Move
    func GetMove(ctx *Context, name string, id IDInput, state *MoveState, opts ...ResourceOption) (*Move, error)
    public static Move Get(string name, Input<string> id, MoveState? state, CustomResourceOptions? opts = null)
    public static Move get(String name, Output<String> id, MoveState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CanBeTerminated bool
    Whether IP service can be terminated
    Country string
    Country
    Description string
    Description attached to the IP
    Ip string
    IP block that we want to attach to a different service
    OrganisationId string
    IP block organisation Id
    RoutedTo MoveRoutedTo
    Service to route the IP to. If null, the IP will be parked instead of moved
    ServiceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    TaskStartDate string
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    TaskStatus string
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    Type string
    Possible values for ip type
    CanBeTerminated bool
    Whether IP service can be terminated
    Country string
    Country
    Description string
    Description attached to the IP
    Ip string
    IP block that we want to attach to a different service
    OrganisationId string
    IP block organisation Id
    RoutedTo MoveRoutedToArgs
    Service to route the IP to. If null, the IP will be parked instead of moved
    ServiceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    TaskStartDate string
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    TaskStatus string
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    Type string
    Possible values for ip type
    canBeTerminated Boolean
    Whether IP service can be terminated
    country String
    Country
    description String
    Description attached to the IP
    ip String
    IP block that we want to attach to a different service
    organisationId String
    IP block organisation Id
    routedTo MoveRoutedTo
    Service to route the IP to. If null, the IP will be parked instead of moved
    serviceName String
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    taskStartDate String
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    taskStatus String
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type String
    Possible values for ip type
    canBeTerminated boolean
    Whether IP service can be terminated
    country string
    Country
    description string
    Description attached to the IP
    ip string
    IP block that we want to attach to a different service
    organisationId string
    IP block organisation Id
    routedTo MoveRoutedTo
    Service to route the IP to. If null, the IP will be parked instead of moved
    serviceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    taskStartDate string
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    taskStatus string
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type string
    Possible values for ip type
    can_be_terminated bool
    Whether IP service can be terminated
    country str
    Country
    description str
    Description attached to the IP
    ip str
    IP block that we want to attach to a different service
    organisation_id str
    IP block organisation Id
    routed_to ip.MoveRoutedToArgs
    Service to route the IP to. If null, the IP will be parked instead of moved
    service_name str
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    task_start_date str
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    task_status str
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type str
    Possible values for ip type
    canBeTerminated Boolean
    Whether IP service can be terminated
    country String
    Country
    description String
    Description attached to the IP
    ip String
    IP block that we want to attach to a different service
    organisationId String
    IP block organisation Id
    routedTo Property Map
    Service to route the IP to. If null, the IP will be parked instead of moved
    serviceName String
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    taskStartDate String
    Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
    taskStatus String
    Status field of the current IP task that is in charge of changing the service the IP is attached to
    type String
    Possible values for ip type

    Supporting Types

    MoveRoutedTo, MoveRoutedToArgs

    ServiceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    ServiceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    serviceName String
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    serviceName string
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    service_name str
    Name of the service to route the IP to. IP will be parked if this value is an empty string
    serviceName String
    Name of the service to route the IP to. IP will be parked if this value is an empty string

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud