OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud
ovh.Dedicated.ServerUpdate
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
import * as ovh from "@pulumi/ovh";
const rescue = ovh.Dedicated.getServerBoots({
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
bootType: "rescue",
kernel: "rescue64-pro",
});
const server = new ovh.dedicated.ServerUpdate("server", {
serviceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
bootId: rescue.then(rescue => rescue.results?.[0]),
monitoring: true,
state: "ok",
displayName: "Some human-readable name",
});
import pulumi
import pulumi_ovh as ovh
rescue = ovh.Dedicated.get_server_boots(service_name="nsxxxxxxx.ip-xx-xx-xx.eu",
boot_type="rescue",
kernel="rescue64-pro")
server = ovh.dedicated.ServerUpdate("server",
service_name="nsxxxxxxx.ip-xx-xx-xx.eu",
boot_id=rescue.results[0],
monitoring=True,
state="ok",
display_name="Some human-readable name")
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh/Dedicated"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
rescue, err := Dedicated.GetServerBoots(ctx, &dedicated.GetServerBootsArgs{
ServiceName: "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType: pulumi.StringRef("rescue"),
Kernel: pulumi.StringRef("rescue64-pro"),
}, nil)
if err != nil {
return err
}
_, err = Dedicated.NewServerUpdate(ctx, "server", &Dedicated.ServerUpdateArgs{
ServiceName: pulumi.String("nsxxxxxxx.ip-xx-xx-xx.eu"),
BootId: pulumi.Int(rescue.Results[0]),
Monitoring: pulumi.Bool(true),
State: pulumi.String("ok"),
DisplayName: pulumi.String("Some human-readable name"),
})
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 rescue = Ovh.Dedicated.GetServerBoots.Invoke(new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
BootType = "rescue",
Kernel = "rescue64-pro",
});
var server = new Ovh.Dedicated.ServerUpdate("server", new()
{
ServiceName = "nsxxxxxxx.ip-xx-xx-xx.eu",
BootId = rescue.Apply(getServerBootsResult => getServerBootsResult.Results[0]),
Monitoring = true,
State = "ok",
DisplayName = "Some human-readable name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Dedicated.DedicatedFunctions;
import com.pulumi.ovh.Dedicated.inputs.GetServerBootsArgs;
import com.pulumi.ovh.Dedicated.ServerUpdate;
import com.pulumi.ovh.Dedicated.ServerUpdateArgs;
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) {
final var rescue = DedicatedFunctions.getServerBoots(GetServerBootsArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.bootType("rescue")
.kernel("rescue64-pro")
.build());
var server = new ServerUpdate("server", ServerUpdateArgs.builder()
.serviceName("nsxxxxxxx.ip-xx-xx-xx.eu")
.bootId(rescue.applyValue(getServerBootsResult -> getServerBootsResult.results()[0]))
.monitoring(true)
.state("ok")
.displayName("Some human-readable name")
.build());
}
}
resources:
server:
type: ovh:Dedicated:ServerUpdate
properties:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
bootId: ${rescue.results[0]}
monitoring: true
state: ok
displayName: Some human-readable name
variables:
rescue:
fn::invoke:
Function: ovh:Dedicated:getServerBoots
Arguments:
serviceName: nsxxxxxxx.ip-xx-xx-xx.eu
bootType: rescue
kernel: rescue64-pro
Create ServerUpdate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerUpdate(name: string, args: ServerUpdateArgs, opts?: CustomResourceOptions);
@overload
def ServerUpdate(resource_name: str,
args: ServerUpdateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerUpdate(resource_name: str,
opts: Optional[ResourceOptions] = None,
service_name: Optional[str] = None,
boot_id: Optional[int] = None,
boot_script: Optional[str] = None,
display_name: Optional[str] = None,
monitoring: Optional[bool] = None,
state: Optional[str] = None)
func NewServerUpdate(ctx *Context, name string, args ServerUpdateArgs, opts ...ResourceOption) (*ServerUpdate, error)
public ServerUpdate(string name, ServerUpdateArgs args, CustomResourceOptions? opts = null)
public ServerUpdate(String name, ServerUpdateArgs args)
public ServerUpdate(String name, ServerUpdateArgs args, CustomResourceOptions options)
type: ovh:Dedicated:ServerUpdate
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 ServerUpdateArgs
- 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 ServerUpdateArgs
- 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 ServerUpdateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerUpdateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerUpdateArgs
- 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 serverUpdateResource = new Ovh.Dedicated.ServerUpdate("serverUpdateResource", new()
{
ServiceName = "string",
BootId = 0,
BootScript = "string",
DisplayName = "string",
Monitoring = false,
State = "string",
});
example, err := Dedicated.NewServerUpdate(ctx, "serverUpdateResource", &Dedicated.ServerUpdateArgs{
ServiceName: pulumi.String("string"),
BootId: pulumi.Int(0),
BootScript: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Monitoring: pulumi.Bool(false),
State: pulumi.String("string"),
})
var serverUpdateResource = new ServerUpdate("serverUpdateResource", ServerUpdateArgs.builder()
.serviceName("string")
.bootId(0)
.bootScript("string")
.displayName("string")
.monitoring(false)
.state("string")
.build());
server_update_resource = ovh.dedicated.ServerUpdate("serverUpdateResource",
service_name="string",
boot_id=0,
boot_script="string",
display_name="string",
monitoring=False,
state="string")
const serverUpdateResource = new ovh.dedicated.ServerUpdate("serverUpdateResource", {
serviceName: "string",
bootId: 0,
bootScript: "string",
displayName: "string",
monitoring: false,
state: "string",
});
type: ovh:Dedicated:ServerUpdate
properties:
bootId: 0
bootScript: string
displayName: string
monitoring: false
serviceName: string
state: string
ServerUpdate 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 ServerUpdate resource accepts the following input properties:
- Service
Name string - The service_name of your dedicated server.
- Boot
Id int - boot id of the server
- Boot
Script string - boot script of the server
- Display
Name string - display name of the dedicated server
- Monitoring bool
- Icmp monitoring state
- State string
- error, hacked, hackedBlocked, ok
- Service
Name string - The service_name of your dedicated server.
- Boot
Id int - boot id of the server
- Boot
Script string - boot script of the server
- Display
Name string - display name of the dedicated server
- Monitoring bool
- Icmp monitoring state
- State string
- error, hacked, hackedBlocked, ok
- service
Name String - The service_name of your dedicated server.
- boot
Id Integer - boot id of the server
- boot
Script String - boot script of the server
- display
Name String - display name of the dedicated server
- monitoring Boolean
- Icmp monitoring state
- state String
- error, hacked, hackedBlocked, ok
- service
Name string - The service_name of your dedicated server.
- boot
Id number - boot id of the server
- boot
Script string - boot script of the server
- display
Name string - display name of the dedicated server
- monitoring boolean
- Icmp monitoring state
- state string
- error, hacked, hackedBlocked, ok
- service_
name str - The service_name of your dedicated server.
- boot_
id int - boot id of the server
- boot_
script str - boot script of the server
- display_
name str - display name of the dedicated server
- monitoring bool
- Icmp monitoring state
- state str
- error, hacked, hackedBlocked, ok
- service
Name String - The service_name of your dedicated server.
- boot
Id Number - boot id of the server
- boot
Script String - boot script of the server
- display
Name String - display name of the dedicated server
- monitoring Boolean
- Icmp monitoring state
- state String
- error, hacked, hackedBlocked, ok
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerUpdate 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 ServerUpdate Resource
Get an existing ServerUpdate 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?: ServerUpdateState, opts?: CustomResourceOptions): ServerUpdate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
boot_id: Optional[int] = None,
boot_script: Optional[str] = None,
display_name: Optional[str] = None,
monitoring: Optional[bool] = None,
service_name: Optional[str] = None,
state: Optional[str] = None) -> ServerUpdate
func GetServerUpdate(ctx *Context, name string, id IDInput, state *ServerUpdateState, opts ...ResourceOption) (*ServerUpdate, error)
public static ServerUpdate Get(string name, Input<string> id, ServerUpdateState? state, CustomResourceOptions? opts = null)
public static ServerUpdate get(String name, Output<String> id, ServerUpdateState 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.
- Boot
Id int - boot id of the server
- Boot
Script string - boot script of the server
- Display
Name string - display name of the dedicated server
- Monitoring bool
- Icmp monitoring state
- Service
Name string - The service_name of your dedicated server.
- State string
- error, hacked, hackedBlocked, ok
- Boot
Id int - boot id of the server
- Boot
Script string - boot script of the server
- Display
Name string - display name of the dedicated server
- Monitoring bool
- Icmp monitoring state
- Service
Name string - The service_name of your dedicated server.
- State string
- error, hacked, hackedBlocked, ok
- boot
Id Integer - boot id of the server
- boot
Script String - boot script of the server
- display
Name String - display name of the dedicated server
- monitoring Boolean
- Icmp monitoring state
- service
Name String - The service_name of your dedicated server.
- state String
- error, hacked, hackedBlocked, ok
- boot
Id number - boot id of the server
- boot
Script string - boot script of the server
- display
Name string - display name of the dedicated server
- monitoring boolean
- Icmp monitoring state
- service
Name string - The service_name of your dedicated server.
- state string
- error, hacked, hackedBlocked, ok
- boot_
id int - boot id of the server
- boot_
script str - boot script of the server
- display_
name str - display name of the dedicated server
- monitoring bool
- Icmp monitoring state
- service_
name str - The service_name of your dedicated server.
- state str
- error, hacked, hackedBlocked, ok
- boot
Id Number - boot id of the server
- boot
Script String - boot script of the server
- display
Name String - display name of the dedicated server
- monitoring Boolean
- Icmp monitoring state
- service
Name String - The service_name of your dedicated server.
- state String
- error, hacked, hackedBlocked, ok
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.