Harness v0.3.2 published on Monday, Sep 16, 2024 by Pulumi
harness.autostopping.RuleRds
Explore with Pulumi AI
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=harness.autostopping.RuleRdsDatabaseArgs(
id="string",
region="string",
),
depends=[harness.autostopping.RuleRdsDependArgs(
rule_id=0,
delay_in_sec=0,
)],
idle_time_mins=0,
name="string",
tcps=[harness.autostopping.RuleRdsTcpArgs(
proxy_id="string",
forward_rules=[harness.autostopping.RuleRdsTcpForwardRuleArgs(
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
The RuleRds resource accepts the following input properties:
- Cloud
Connector stringId - Id of the cloud connector
- Database
Rule
Rds Database - Depends
List<Rule
Rds Depend> - Dependent rules
- Idle
Time intMins - 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<Rule
Rds Tcp> - TCP routing configuration
- Cloud
Connector stringId - Id of the cloud connector
- Database
Rule
Rds Database Args - Depends
[]Rule
Rds Depend Args - Dependent rules
- Idle
Time intMins - 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
[]Rule
Rds Tcp Args - TCP routing configuration
- cloud
Connector StringId - Id of the cloud connector
- database
Rule
Rds Database - depends
List<Rule
Rds Depend> - Dependent rules
- idle
Time IntegerMins - 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<Rule
Rds Tcp> - TCP routing configuration
- cloud
Connector stringId - Id of the cloud connector
- database
Rule
Rds Database - depends
Rule
Rds Depend[] - Dependent rules
- idle
Time numberMins - 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
Rule
Rds Tcp[] - TCP routing configuration
- cloud_
connector_ strid - Id of the cloud connector
- database
Rule
Rds Database Args - depends
Sequence[Rule
Rds Depend Args] - Dependent rules
- idle_
time_ intmins - 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[Rule
Rds Tcp Args] - TCP routing configuration
- cloud
Connector StringId - Id of the cloud connector
- database Property Map
- depends List<Property Map>
- Dependent rules
- idle
Time NumberMins - 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.
- Cloud
Connector stringId - Id of the cloud connector
- Database
Rule
Rds Database - Depends
List<Rule
Rds Depend> - Dependent rules
- Identifier double
- Unique identifier of the resource
- Idle
Time intMins - 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<Rule
Rds Tcp> - TCP routing configuration
- Cloud
Connector stringId - Id of the cloud connector
- Database
Rule
Rds Database Args - Depends
[]Rule
Rds Depend Args - Dependent rules
- Identifier float64
- Unique identifier of the resource
- Idle
Time intMins - 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
[]Rule
Rds Tcp Args - TCP routing configuration
- cloud
Connector StringId - Id of the cloud connector
- database
Rule
Rds Database - depends
List<Rule
Rds Depend> - Dependent rules
- identifier Double
- Unique identifier of the resource
- idle
Time IntegerMins - 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<Rule
Rds Tcp> - TCP routing configuration
- cloud
Connector stringId - Id of the cloud connector
- database
Rule
Rds Database - depends
Rule
Rds Depend[] - Dependent rules
- identifier number
- Unique identifier of the resource
- idle
Time numberMins - 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
Rule
Rds Tcp[] - TCP routing configuration
- cloud_
connector_ strid - Id of the cloud connector
- database
Rule
Rds Database Args - depends
Sequence[Rule
Rds Depend Args] - Dependent rules
- identifier float
- Unique identifier of the resource
- idle_
time_ intmins - 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[Rule
Rds Tcp Args] - TCP routing configuration
- cloud
Connector StringId - Id of the cloud connector
- database Property Map
- depends List<Property Map>
- Dependent rules
- identifier Number
- Unique identifier of the resource
- idle
Time NumberMins - 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
RuleRdsDepend, RuleRdsDependArgs
- Rule
Id int - Rule id of the dependent rule
- Delay
In intSec - Number of seconds the rule should wait after warming up the dependent rule
- Rule
Id int - Rule id of the dependent rule
- Delay
In intSec - Number of seconds the rule should wait after warming up the dependent rule
- rule
Id Integer - Rule id of the dependent rule
- delay
In IntegerSec - Number of seconds the rule should wait after warming up the dependent rule
- rule
Id number - Rule id of the dependent rule
- delay
In numberSec - Number of seconds the rule should wait after warming up the dependent rule
- rule_
id int - Rule id of the dependent rule
- delay_
in_ intsec - Number of seconds the rule should wait after warming up the dependent rule
- rule
Id Number - Rule id of the dependent rule
- delay
In NumberSec - Number of seconds the rule should wait after warming up the dependent rule
RuleRdsTcp, RuleRdsTcpArgs
- Proxy
Id string - Id of the Proxy
- Forward
Rules List<RuleRds Tcp Forward Rule> - Additional tcp forwarding rules
- Proxy
Id string - Id of the Proxy
- Forward
Rules []RuleRds Tcp Forward Rule - Additional tcp forwarding rules
- proxy
Id String - Id of the Proxy
- forward
Rules List<RuleRds Tcp Forward Rule> - Additional tcp forwarding rules
- proxy
Id string - Id of the Proxy
- forward
Rules RuleRds Tcp Forward Rule[] - Additional tcp forwarding rules
- proxy_
id str - Id of the Proxy
- forward_
rules Sequence[RuleRds Tcp Forward Rule] - Additional tcp forwarding rules
- proxy
Id String - Id of the Proxy
- forward
Rules List<Property Map> - Additional tcp forwarding rules
RuleRdsTcpForwardRule, RuleRdsTcpForwardRuleArgs
- port int
- Port to listen on the vm
- connect_
on int - 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.