1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. FleetServerHost
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

elasticstack.FleetServerHost

Explore with Pulumi AI

elasticstack logo
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

    Creates or updates a Fleet Server Host.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const testHost = new elasticstack.FleetServerHost("testHost", {
        "default": false,
        hosts: ["https://fleet-server:8220"],
    });
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    test_host = elasticstack.FleetServerHost("testHost",
        default=False,
        hosts=["https://fleet-server:8220"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := elasticstack.NewFleetServerHost(ctx, "testHost", &elasticstack.FleetServerHostArgs{
    			Default: pulumi.Bool(false),
    			Hosts: pulumi.StringArray{
    				pulumi.String("https://fleet-server:8220"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Elasticstack = Pulumi.Elasticstack;
    
    return await Deployment.RunAsync(() => 
    {
        var testHost = new Elasticstack.FleetServerHost("testHost", new()
        {
            Default = false,
            Hosts = new[]
            {
                "https://fleet-server:8220",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.FleetServerHost;
    import com.pulumi.elasticstack.FleetServerHostArgs;
    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 testHost = new FleetServerHost("testHost", FleetServerHostArgs.builder()
                .default_(false)
                .hosts("https://fleet-server:8220")
                .build());
    
        }
    }
    
    resources:
      testHost:
        type: elasticstack:FleetServerHost
        properties:
          default: false
          hosts:
            - https://fleet-server:8220
    

    Create FleetServerHost Resource

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

    Constructor syntax

    new FleetServerHost(name: string, args: FleetServerHostArgs, opts?: CustomResourceOptions);
    @overload
    def FleetServerHost(resource_name: str,
                        args: FleetServerHostArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def FleetServerHost(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        hosts: Optional[Sequence[str]] = None,
                        default: Optional[bool] = None,
                        host_id: Optional[str] = None,
                        name: Optional[str] = None)
    func NewFleetServerHost(ctx *Context, name string, args FleetServerHostArgs, opts ...ResourceOption) (*FleetServerHost, error)
    public FleetServerHost(string name, FleetServerHostArgs args, CustomResourceOptions? opts = null)
    public FleetServerHost(String name, FleetServerHostArgs args)
    public FleetServerHost(String name, FleetServerHostArgs args, CustomResourceOptions options)
    
    type: elasticstack:FleetServerHost
    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 FleetServerHostArgs
    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 FleetServerHostArgs
    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 FleetServerHostArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FleetServerHostArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FleetServerHostArgs
    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 fleetServerHostResource = new Elasticstack.FleetServerHost("fleetServerHostResource", new()
    {
        Hosts = new[]
        {
            "string",
        },
        Default = false,
        HostId = "string",
        Name = "string",
    });
    
    example, err := elasticstack.NewFleetServerHost(ctx, "fleetServerHostResource", &elasticstack.FleetServerHostArgs{
    	Hosts: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Default: pulumi.Bool(false),
    	HostId:  pulumi.String("string"),
    	Name:    pulumi.String("string"),
    })
    
    var fleetServerHostResource = new FleetServerHost("fleetServerHostResource", FleetServerHostArgs.builder()
        .hosts("string")
        .default_(false)
        .hostId("string")
        .name("string")
        .build());
    
    fleet_server_host_resource = elasticstack.FleetServerHost("fleetServerHostResource",
        hosts=["string"],
        default=False,
        host_id="string",
        name="string")
    
    const fleetServerHostResource = new elasticstack.FleetServerHost("fleetServerHostResource", {
        hosts: ["string"],
        "default": false,
        hostId: "string",
        name: "string",
    });
    
    type: elasticstack:FleetServerHost
    properties:
        default: false
        hostId: string
        hosts:
            - string
        name: string
    

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

    Hosts List<string>
    A list of hosts.
    Default bool
    Set as default.
    HostId string
    Unique identifier of the Fleet server host.
    Name string
    The name of the Fleet server host.
    Hosts []string
    A list of hosts.
    Default bool
    Set as default.
    HostId string
    Unique identifier of the Fleet server host.
    Name string
    The name of the Fleet server host.
    hosts List<String>
    A list of hosts.
    default_ Boolean
    Set as default.
    hostId String
    Unique identifier of the Fleet server host.
    name String
    The name of the Fleet server host.
    hosts string[]
    A list of hosts.
    default boolean
    Set as default.
    hostId string
    Unique identifier of the Fleet server host.
    name string
    The name of the Fleet server host.
    hosts Sequence[str]
    A list of hosts.
    default bool
    Set as default.
    host_id str
    Unique identifier of the Fleet server host.
    name str
    The name of the Fleet server host.
    hosts List<String>
    A list of hosts.
    default Boolean
    Set as default.
    hostId String
    Unique identifier of the Fleet server host.
    name String
    The name of the Fleet server host.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FleetServerHost 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 FleetServerHost Resource

    Get an existing FleetServerHost 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?: FleetServerHostState, opts?: CustomResourceOptions): FleetServerHost
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            default: Optional[bool] = None,
            host_id: Optional[str] = None,
            hosts: Optional[Sequence[str]] = None,
            name: Optional[str] = None) -> FleetServerHost
    func GetFleetServerHost(ctx *Context, name string, id IDInput, state *FleetServerHostState, opts ...ResourceOption) (*FleetServerHost, error)
    public static FleetServerHost Get(string name, Input<string> id, FleetServerHostState? state, CustomResourceOptions? opts = null)
    public static FleetServerHost get(String name, Output<String> id, FleetServerHostState state, CustomResourceOptions options)
    resources:  _:    type: elasticstack:FleetServerHost    get:      id: ${id}
    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:
    Default bool
    Set as default.
    HostId string
    Unique identifier of the Fleet server host.
    Hosts List<string>
    A list of hosts.
    Name string
    The name of the Fleet server host.
    Default bool
    Set as default.
    HostId string
    Unique identifier of the Fleet server host.
    Hosts []string
    A list of hosts.
    Name string
    The name of the Fleet server host.
    default_ Boolean
    Set as default.
    hostId String
    Unique identifier of the Fleet server host.
    hosts List<String>
    A list of hosts.
    name String
    The name of the Fleet server host.
    default boolean
    Set as default.
    hostId string
    Unique identifier of the Fleet server host.
    hosts string[]
    A list of hosts.
    name string
    The name of the Fleet server host.
    default bool
    Set as default.
    host_id str
    Unique identifier of the Fleet server host.
    hosts Sequence[str]
    A list of hosts.
    name str
    The name of the Fleet server host.
    default Boolean
    Set as default.
    hostId String
    Unique identifier of the Fleet server host.
    hosts List<String>
    A list of hosts.
    name String
    The name of the Fleet server host.

    Import

    $ pulumi import elasticstack:index/fleetServerHost:FleetServerHost my_host <fleet_server_host_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    elasticstack logo
    elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic