1. Packages
  2. Harness Provider
  3. API Docs
  4. autostopping
  5. RuleRds
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.autostopping.RuleRds

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    Resource for creating a Harness Variables.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const test = new harness.autostopping.RuleRds("test", {
        name: "name",
        cloudConnectorId: "cloud_connector_id",
        idleTimeMins: 10,
        database: {
            id: "database_id",
            region: "region",
        },
        tcps: [{
            proxyId: "proxy_id",
            forwardRules: [{
                port: 2233,
            }],
        }],
    });
    
    import pulumi
    import pulumi_harness as harness
    
    test = harness.autostopping.RuleRds("test",
        name="name",
        cloud_connector_id="cloud_connector_id",
        idle_time_mins=10,
        database={
            "id": "database_id",
            "region": "region",
        },
        tcps=[{
            "proxy_id": "proxy_id",
            "forward_rules": [{
                "port": 2233,
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/autostopping"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := autostopping.NewRuleRds(ctx, "test", &autostopping.RuleRdsArgs{
    			Name:             pulumi.String("name"),
    			CloudConnectorId: pulumi.String("cloud_connector_id"),
    			IdleTimeMins:     pulumi.Int(10),
    			Database: &autostopping.RuleRdsDatabaseArgs{
    				Id:     pulumi.String("database_id"),
    				Region: pulumi.String("region"),
    			},
    			Tcps: autostopping.RuleRdsTcpArray{
    				&autostopping.RuleRdsTcpArgs{
    					ProxyId: pulumi.String("proxy_id"),
    					ForwardRules: autostopping.RuleRdsTcpForwardRuleArray{
    						&autostopping.RuleRdsTcpForwardRuleArgs{
    							Port: pulumi.Int(2233),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Harness.Autostopping.RuleRds("test", new()
        {
            Name = "name",
            CloudConnectorId = "cloud_connector_id",
            IdleTimeMins = 10,
            Database = new Harness.Autostopping.Inputs.RuleRdsDatabaseArgs
            {
                Id = "database_id",
                Region = "region",
            },
            Tcps = new[]
            {
                new Harness.Autostopping.Inputs.RuleRdsTcpArgs
                {
                    ProxyId = "proxy_id",
                    ForwardRules = new[]
                    {
                        new Harness.Autostopping.Inputs.RuleRdsTcpForwardRuleArgs
                        {
                            Port = 2233,
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.autostopping.RuleRds;
    import com.pulumi.harness.autostopping.RuleRdsArgs;
    import com.pulumi.harness.autostopping.inputs.RuleRdsDatabaseArgs;
    import com.pulumi.harness.autostopping.inputs.RuleRdsTcpArgs;
    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 test = new RuleRds("test", RuleRdsArgs.builder()
                .name("name")
                .cloudConnectorId("cloud_connector_id")
                .idleTimeMins(10)
                .database(RuleRdsDatabaseArgs.builder()
                    .id("database_id")
                    .region("region")
                    .build())
                .tcps(RuleRdsTcpArgs.builder()
                    .proxyId("proxy_id")
                    .forwardRules(RuleRdsTcpForwardRuleArgs.builder()
                        .port(2233)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: harness:autostopping:RuleRds
        properties:
          name: name
          cloudConnectorId: cloud_connector_id
          idleTimeMins: 10
          database:
            id: database_id
            region: region
          tcps:
            - proxyId: proxy_id
              forwardRules:
                - port: 2233
    

    Create RuleRds Resource

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

    Constructor syntax

    new RuleRds(name: string, args: RuleRdsArgs, opts?: CustomResourceOptions);
    @overload
    def RuleRds(resource_name: str,
                args: RuleRdsArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def RuleRds(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                cloud_connector_id: Optional[str] = None,
                database: Optional[RuleRdsDatabaseArgs] = None,
                depends: Optional[Sequence[RuleRdsDependArgs]] = None,
                idle_time_mins: Optional[int] = None,
                name: Optional[str] = None,
                tcps: Optional[Sequence[RuleRdsTcpArgs]] = None)
    func NewRuleRds(ctx *Context, name string, args RuleRdsArgs, opts ...ResourceOption) (*RuleRds, error)
    public RuleRds(string name, RuleRdsArgs args, CustomResourceOptions? opts = null)
    public RuleRds(String name, RuleRdsArgs args)
    public RuleRds(String name, RuleRdsArgs args, CustomResourceOptions options)
    
    type: harness:autostopping:RuleRds
    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 RuleRdsArgs
    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 RuleRdsArgs
    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 RuleRdsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleRdsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleRdsArgs
    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 ruleRdsResource = new Harness.Autostopping.RuleRds("ruleRdsResource", new()
    {
        CloudConnectorId = "string",
        Database = new Harness.Autostopping.Inputs.RuleRdsDatabaseArgs
        {
            Id = "string",
            Region = "string",
        },
        Depends = new[]
        {
            new Harness.Autostopping.Inputs.RuleRdsDependArgs
            {
                RuleId = 0,
                DelayInSec = 0,
            },
        },
        IdleTimeMins = 0,
        Name = "string",
        Tcps = new[]
        {
            new Harness.Autostopping.Inputs.RuleRdsTcpArgs
            {
                ProxyId = "string",
                ForwardRules = new[]
                {
                    new Harness.Autostopping.Inputs.RuleRdsTcpForwardRuleArgs
                    {
                        Port = 0,
                        ConnectOn = 0,
                    },
                },
            },
        },
    });
    
    example, err := autostopping.NewRuleRds(ctx, "ruleRdsResource", &autostopping.RuleRdsArgs{
    	CloudConnectorId: pulumi.String("string"),
    	Database: &autostopping.RuleRdsDatabaseArgs{
    		Id:     pulumi.String("string"),
    		Region: pulumi.String("string"),
    	},
    	Depends: autostopping.RuleRdsDependArray{
    		&autostopping.RuleRdsDependArgs{
    			RuleId:     pulumi.Int(0),
    			DelayInSec: pulumi.Int(0),
    		},
    	},
    	IdleTimeMins: pulumi.Int(0),
    	Name:         pulumi.String("string"),
    	Tcps: autostopping.RuleRdsTcpArray{
    		&autostopping.RuleRdsTcpArgs{
    			ProxyId: pulumi.String("string"),
    			ForwardRules: autostopping.RuleRdsTcpForwardRuleArray{
    				&autostopping.RuleRdsTcpForwardRuleArgs{
    					Port:      pulumi.Int(0),
    					ConnectOn: pulumi.Int(0),
    				},
    			},
    		},
    	},
    })
    
    var ruleRdsResource = new RuleRds("ruleRdsResource", RuleRdsArgs.builder()
        .cloudConnectorId("string")
        .database(RuleRdsDatabaseArgs.builder()
            .id("string")
            .region("string")
            .build())
        .depends(RuleRdsDependArgs.builder()
            .ruleId(0)
            .delayInSec(0)
            .build())
        .idleTimeMins(0)
        .name("string")
        .tcps(RuleRdsTcpArgs.builder()
            .proxyId("string")
            .forwardRules(RuleRdsTcpForwardRuleArgs.builder()
                .port(0)
                .connectOn(0)
                .build())
            .build())
        .build());
    
    rule_rds_resource = harness.autostopping.RuleRds("ruleRdsResource",
        cloud_connector_id="string",
        database={
            "id": "string",
            "region": "string",
        },
        depends=[{
            "rule_id": 0,
            "delay_in_sec": 0,
        }],
        idle_time_mins=0,
        name="string",
        tcps=[{
            "proxy_id": "string",
            "forward_rules": [{
                "port": 0,
                "connect_on": 0,
            }],
        }])
    
    const ruleRdsResource = new harness.autostopping.RuleRds("ruleRdsResource", {
        cloudConnectorId: "string",
        database: {
            id: "string",
            region: "string",
        },
        depends: [{
            ruleId: 0,
            delayInSec: 0,
        }],
        idleTimeMins: 0,
        name: "string",
        tcps: [{
            proxyId: "string",
            forwardRules: [{
                port: 0,
                connectOn: 0,
            }],
        }],
    });
    
    type: harness:autostopping:RuleRds
    properties:
        cloudConnectorId: string
        database:
            id: string
            region: string
        depends:
            - delayInSec: 0
              ruleId: 0
        idleTimeMins: 0
        name: string
        tcps:
            - forwardRules:
                - connectOn: 0
                  port: 0
              proxyId: string
    

    RuleRds 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 RuleRds resource accepts the following input properties:

    CloudConnectorId string
    Id of the cloud connector
    Database RuleRdsDatabase
    Depends List<RuleRdsDepend>
    Dependent rules
    IdleTimeMins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    Name string
    Name of the rule
    Tcps List<RuleRdsTcp>
    TCP routing configuration
    CloudConnectorId string
    Id of the cloud connector
    Database RuleRdsDatabaseArgs
    Depends []RuleRdsDependArgs
    Dependent rules
    IdleTimeMins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    Name string
    Name of the rule
    Tcps []RuleRdsTcpArgs
    TCP routing configuration
    cloudConnectorId String
    Id of the cloud connector
    database RuleRdsDatabase
    depends List<RuleRdsDepend>
    Dependent rules
    idleTimeMins Integer
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name String
    Name of the rule
    tcps List<RuleRdsTcp>
    TCP routing configuration
    cloudConnectorId string
    Id of the cloud connector
    database RuleRdsDatabase
    depends RuleRdsDepend[]
    Dependent rules
    idleTimeMins number
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name string
    Name of the rule
    tcps RuleRdsTcp[]
    TCP routing configuration
    cloud_connector_id str
    Id of the cloud connector
    database RuleRdsDatabaseArgs
    depends Sequence[RuleRdsDependArgs]
    Dependent rules
    idle_time_mins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name str
    Name of the rule
    tcps Sequence[RuleRdsTcpArgs]
    TCP routing configuration
    cloudConnectorId String
    Id of the cloud connector
    database Property Map
    depends List<Property Map>
    Dependent rules
    idleTimeMins Number
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name String
    Name of the rule
    tcps List<Property Map>
    TCP routing configuration

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier double
    Unique identifier of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    Identifier float64
    Unique identifier of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    identifier Double
    Unique identifier of the resource
    id string
    The provider-assigned unique ID for this managed resource.
    identifier number
    Unique identifier of the resource
    id str
    The provider-assigned unique ID for this managed resource.
    identifier float
    Unique identifier of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    identifier Number
    Unique identifier of the resource

    Look up Existing RuleRds Resource

    Get an existing RuleRds 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?: RuleRdsState, opts?: CustomResourceOptions): RuleRds
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloud_connector_id: Optional[str] = None,
            database: Optional[RuleRdsDatabaseArgs] = None,
            depends: Optional[Sequence[RuleRdsDependArgs]] = None,
            identifier: Optional[float] = None,
            idle_time_mins: Optional[int] = None,
            name: Optional[str] = None,
            tcps: Optional[Sequence[RuleRdsTcpArgs]] = None) -> RuleRds
    func GetRuleRds(ctx *Context, name string, id IDInput, state *RuleRdsState, opts ...ResourceOption) (*RuleRds, error)
    public static RuleRds Get(string name, Input<string> id, RuleRdsState? state, CustomResourceOptions? opts = null)
    public static RuleRds get(String name, Output<String> id, RuleRdsState 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:
    CloudConnectorId string
    Id of the cloud connector
    Database RuleRdsDatabase
    Depends List<RuleRdsDepend>
    Dependent rules
    Identifier double
    Unique identifier of the resource
    IdleTimeMins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    Name string
    Name of the rule
    Tcps List<RuleRdsTcp>
    TCP routing configuration
    CloudConnectorId string
    Id of the cloud connector
    Database RuleRdsDatabaseArgs
    Depends []RuleRdsDependArgs
    Dependent rules
    Identifier float64
    Unique identifier of the resource
    IdleTimeMins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    Name string
    Name of the rule
    Tcps []RuleRdsTcpArgs
    TCP routing configuration
    cloudConnectorId String
    Id of the cloud connector
    database RuleRdsDatabase
    depends List<RuleRdsDepend>
    Dependent rules
    identifier Double
    Unique identifier of the resource
    idleTimeMins Integer
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name String
    Name of the rule
    tcps List<RuleRdsTcp>
    TCP routing configuration
    cloudConnectorId string
    Id of the cloud connector
    database RuleRdsDatabase
    depends RuleRdsDepend[]
    Dependent rules
    identifier number
    Unique identifier of the resource
    idleTimeMins number
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name string
    Name of the rule
    tcps RuleRdsTcp[]
    TCP routing configuration
    cloud_connector_id str
    Id of the cloud connector
    database RuleRdsDatabaseArgs
    depends Sequence[RuleRdsDependArgs]
    Dependent rules
    identifier float
    Unique identifier of the resource
    idle_time_mins int
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name str
    Name of the rule
    tcps Sequence[RuleRdsTcpArgs]
    TCP routing configuration
    cloudConnectorId String
    Id of the cloud connector
    database Property Map
    depends List<Property Map>
    Dependent rules
    identifier Number
    Unique identifier of the resource
    idleTimeMins Number
    Idle time in minutes. This is the time that the AutoStopping rule waits before stopping the idle instances.
    name String
    Name of the rule
    tcps List<Property Map>
    TCP routing configuration

    Supporting Types

    RuleRdsDatabase, RuleRdsDatabaseArgs

    Id string
    ID of the database
    Region string
    Region to which database belong to
    Id string
    ID of the database
    Region string
    Region to which database belong to
    id String
    ID of the database
    region String
    Region to which database belong to
    id string
    ID of the database
    region string
    Region to which database belong to
    id str
    ID of the database
    region str
    Region to which database belong to
    id String
    ID of the database
    region String
    Region to which database belong to

    RuleRdsDepend, RuleRdsDependArgs

    RuleId int
    Rule id of the dependent rule
    DelayInSec int
    Number of seconds the rule should wait after warming up the dependent rule
    RuleId int
    Rule id of the dependent rule
    DelayInSec int
    Number of seconds the rule should wait after warming up the dependent rule
    ruleId Integer
    Rule id of the dependent rule
    delayInSec Integer
    Number of seconds the rule should wait after warming up the dependent rule
    ruleId number
    Rule id of the dependent rule
    delayInSec number
    Number of seconds the rule should wait after warming up the dependent rule
    rule_id int
    Rule id of the dependent rule
    delay_in_sec int
    Number of seconds the rule should wait after warming up the dependent rule
    ruleId Number
    Rule id of the dependent rule
    delayInSec Number
    Number of seconds the rule should wait after warming up the dependent rule

    RuleRdsTcp, RuleRdsTcpArgs

    ProxyId string
    Id of the Proxy
    ForwardRules List<RuleRdsTcpForwardRule>
    Additional tcp forwarding rules
    ProxyId string
    Id of the Proxy
    ForwardRules []RuleRdsTcpForwardRule
    Additional tcp forwarding rules
    proxyId String
    Id of the Proxy
    forwardRules List<RuleRdsTcpForwardRule>
    Additional tcp forwarding rules
    proxyId string
    Id of the Proxy
    forwardRules RuleRdsTcpForwardRule[]
    Additional tcp forwarding rules
    proxy_id str
    Id of the Proxy
    forward_rules Sequence[RuleRdsTcpForwardRule]
    Additional tcp forwarding rules
    proxyId String
    Id of the Proxy
    forwardRules List<Property Map>
    Additional tcp forwarding rules

    RuleRdsTcpForwardRule, RuleRdsTcpForwardRuleArgs

    Port int
    Port to listen on the vm
    ConnectOn int
    Port to listen on the proxy
    Port int
    Port to listen on the vm
    ConnectOn int
    Port to listen on the proxy
    port Integer
    Port to listen on the vm
    connectOn Integer
    Port to listen on the proxy
    port number
    Port to listen on the vm
    connectOn number
    Port to listen on the proxy
    port int
    Port to listen on the vm
    connect_on int
    Port to listen on the proxy
    port Number
    Port to listen on the vm
    connectOn Number
    Port to listen on the proxy

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi