1. Packages
  2. OVH
  3. API Docs
  4. Domain
  5. ZoneRedirection
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.Domain.ZoneRedirection

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Provides a OVHcloud domain zone redirection.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    // Add a redirection to a sub-domain
    const test = new ovh.domain.ZoneRedirection("test", {
        subdomain: "test",
        target: "http://www.ovh",
        type: "visiblePermanent",
        zone: "testdemo.ovh",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    # Add a redirection to a sub-domain
    test = ovh.domain.ZoneRedirection("test",
        subdomain="test",
        target="http://www.ovh",
        type="visiblePermanent",
        zone="testdemo.ovh")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Domain"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Add a redirection to a sub-domain
    		_, err := Domain.NewZoneRedirection(ctx, "test", &Domain.ZoneRedirectionArgs{
    			Subdomain: pulumi.String("test"),
    			Target:    pulumi.String("http://www.ovh"),
    			Type:      pulumi.String("visiblePermanent"),
    			Zone:      pulumi.String("testdemo.ovh"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        // Add a redirection to a sub-domain
        var test = new Ovh.Domain.ZoneRedirection("test", new()
        {
            Subdomain = "test",
            Target = "http://www.ovh",
            Type = "visiblePermanent",
            Zone = "testdemo.ovh",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Domain.ZoneRedirection;
    import com.pulumi.ovh.Domain.ZoneRedirectionArgs;
    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) {
            // Add a redirection to a sub-domain
            var test = new ZoneRedirection("test", ZoneRedirectionArgs.builder()
                .subdomain("test")
                .target("http://www.ovh")
                .type("visiblePermanent")
                .zone("testdemo.ovh")
                .build());
    
        }
    }
    
    resources:
      # Add a redirection to a sub-domain
      test:
        type: ovh:Domain:ZoneRedirection
        properties:
          subdomain: test
          target: http://www.ovh
          type: visiblePermanent
          zone: testdemo.ovh
    

    Create ZoneRedirection Resource

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

    Constructor syntax

    new ZoneRedirection(name: string, args: ZoneRedirectionArgs, opts?: CustomResourceOptions);
    @overload
    def ZoneRedirection(resource_name: str,
                        args: ZoneRedirectionArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ZoneRedirection(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        target: Optional[str] = None,
                        type: Optional[str] = None,
                        zone: Optional[str] = None,
                        description: Optional[str] = None,
                        keywords: Optional[str] = None,
                        subdomain: Optional[str] = None,
                        title: Optional[str] = None)
    func NewZoneRedirection(ctx *Context, name string, args ZoneRedirectionArgs, opts ...ResourceOption) (*ZoneRedirection, error)
    public ZoneRedirection(string name, ZoneRedirectionArgs args, CustomResourceOptions? opts = null)
    public ZoneRedirection(String name, ZoneRedirectionArgs args)
    public ZoneRedirection(String name, ZoneRedirectionArgs args, CustomResourceOptions options)
    
    type: ovh:Domain:ZoneRedirection
    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 ZoneRedirectionArgs
    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 ZoneRedirectionArgs
    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 ZoneRedirectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ZoneRedirectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ZoneRedirectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var zoneRedirectionResource = new Ovh.Domain.ZoneRedirection("zoneRedirectionResource", new()
    {
        Target = "string",
        Type = "string",
        Zone = "string",
        Description = "string",
        Keywords = "string",
        Subdomain = "string",
        Title = "string",
    });
    
    example, err := Domain.NewZoneRedirection(ctx, "zoneRedirectionResource", &Domain.ZoneRedirectionArgs{
    	Target:      pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	Zone:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Keywords:    pulumi.String("string"),
    	Subdomain:   pulumi.String("string"),
    	Title:       pulumi.String("string"),
    })
    
    var zoneRedirectionResource = new ZoneRedirection("zoneRedirectionResource", ZoneRedirectionArgs.builder()
        .target("string")
        .type("string")
        .zone("string")
        .description("string")
        .keywords("string")
        .subdomain("string")
        .title("string")
        .build());
    
    zone_redirection_resource = ovh.domain.ZoneRedirection("zoneRedirectionResource",
        target="string",
        type="string",
        zone="string",
        description="string",
        keywords="string",
        subdomain="string",
        title="string")
    
    const zoneRedirectionResource = new ovh.domain.ZoneRedirection("zoneRedirectionResource", {
        target: "string",
        type: "string",
        zone: "string",
        description: "string",
        keywords: "string",
        subdomain: "string",
        title: "string",
    });
    
    type: ovh:Domain:ZoneRedirection
    properties:
        description: string
        keywords: string
        subdomain: string
        target: string
        title: string
        type: string
        zone: string
    

    ZoneRedirection Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ZoneRedirection resource accepts the following input properties:

    Target string
    The value of the redirection
    Type string
    The type of the redirection, with values:
    Zone string
    The domain to add the redirection to
    Description string
    A description of this redirection
    Keywords string
    Keywords to describe this redirection
    Subdomain string
    The name of the redirection
    Title string
    Title of this redirection
    Target string
    The value of the redirection
    Type string
    The type of the redirection, with values:
    Zone string
    The domain to add the redirection to
    Description string
    A description of this redirection
    Keywords string
    Keywords to describe this redirection
    Subdomain string
    The name of the redirection
    Title string
    Title of this redirection
    target String
    The value of the redirection
    type String
    The type of the redirection, with values:
    zone String
    The domain to add the redirection to
    description String
    A description of this redirection
    keywords String
    Keywords to describe this redirection
    subdomain String
    The name of the redirection
    title String
    Title of this redirection
    target string
    The value of the redirection
    type string
    The type of the redirection, with values:
    zone string
    The domain to add the redirection to
    description string
    A description of this redirection
    keywords string
    Keywords to describe this redirection
    subdomain string
    The name of the redirection
    title string
    Title of this redirection
    target str
    The value of the redirection
    type str
    The type of the redirection, with values:
    zone str
    The domain to add the redirection to
    description str
    A description of this redirection
    keywords str
    Keywords to describe this redirection
    subdomain str
    The name of the redirection
    title str
    Title of this redirection
    target String
    The value of the redirection
    type String
    The type of the redirection, with values:
    zone String
    The domain to add the redirection to
    description String
    A description of this redirection
    keywords String
    Keywords to describe this redirection
    subdomain String
    The name of the redirection
    title String
    Title of this redirection

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ZoneRedirection Resource

    Get an existing ZoneRedirection 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?: ZoneRedirectionState, opts?: CustomResourceOptions): ZoneRedirection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            keywords: Optional[str] = None,
            subdomain: Optional[str] = None,
            target: Optional[str] = None,
            title: Optional[str] = None,
            type: Optional[str] = None,
            zone: Optional[str] = None) -> ZoneRedirection
    func GetZoneRedirection(ctx *Context, name string, id IDInput, state *ZoneRedirectionState, opts ...ResourceOption) (*ZoneRedirection, error)
    public static ZoneRedirection Get(string name, Input<string> id, ZoneRedirectionState? state, CustomResourceOptions? opts = null)
    public static ZoneRedirection get(String name, Output<String> id, ZoneRedirectionState 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:
    Description string
    A description of this redirection
    Keywords string
    Keywords to describe this redirection
    Subdomain string
    The name of the redirection
    Target string
    The value of the redirection
    Title string
    Title of this redirection
    Type string
    The type of the redirection, with values:
    Zone string
    The domain to add the redirection to
    Description string
    A description of this redirection
    Keywords string
    Keywords to describe this redirection
    Subdomain string
    The name of the redirection
    Target string
    The value of the redirection
    Title string
    Title of this redirection
    Type string
    The type of the redirection, with values:
    Zone string
    The domain to add the redirection to
    description String
    A description of this redirection
    keywords String
    Keywords to describe this redirection
    subdomain String
    The name of the redirection
    target String
    The value of the redirection
    title String
    Title of this redirection
    type String
    The type of the redirection, with values:
    zone String
    The domain to add the redirection to
    description string
    A description of this redirection
    keywords string
    Keywords to describe this redirection
    subdomain string
    The name of the redirection
    target string
    The value of the redirection
    title string
    Title of this redirection
    type string
    The type of the redirection, with values:
    zone string
    The domain to add the redirection to
    description str
    A description of this redirection
    keywords str
    Keywords to describe this redirection
    subdomain str
    The name of the redirection
    target str
    The value of the redirection
    title str
    Title of this redirection
    type str
    The type of the redirection, with values:
    zone str
    The domain to add the redirection to
    description String
    A description of this redirection
    keywords String
    Keywords to describe this redirection
    subdomain String
    The name of the redirection
    target String
    The value of the redirection
    title String
    Title of this redirection
    type String
    The type of the redirection, with values:
    zone String
    The domain to add the redirection to

    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 v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud