# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities

__all__ = ['FleetArgs', 'Fleet']

@pulumi.input_type
class FleetArgs:
    def __init__(__self__, *,
                 managed_entity_type: pulumi.Input[_builtins.str],
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 operating_system: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 product: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
        """
        The set of arguments for constructing a Fleet resource.

        :param pulumi.Input[_builtins.str] managed_entity_type: The type of entities this fleet will manage. Valid values are `HOST` or `KUBERNETESCLUSTER`. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] description: A description of the fleet. This can be updated after creation.
        :param pulumi.Input[_builtins.str] name: The name of the fleet. This can be changed after creation.
        :param pulumi.Input[_builtins.str] operating_system: The operating system type for HOST fleets. **Required when `managed_entity_type` is `HOST`**. Valid values are `LINUX` or `WINDOWS`. **Must not be set when `managed_entity_type` is `KUBERNETESCLUSTER`**. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, it will be automatically fetched from your account. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] product: The New Relic product associated with this fleet (e.g., `INFRA`).
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: A list of tags for the fleet. Each tag should be in the format `"key:value1,value2"` where multiple values can be comma-separated.
        """
        pulumi.set(__self__, "managed_entity_type", managed_entity_type)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if operating_system is not None:
            pulumi.set(__self__, "operating_system", operating_system)
        if organization_id is not None:
            pulumi.set(__self__, "organization_id", organization_id)
        if product is not None:
            pulumi.set(__self__, "product", product)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

    @_builtins.property
    @pulumi.getter(name="managedEntityType")
    def managed_entity_type(self) -> pulumi.Input[_builtins.str]:
        """
        The type of entities this fleet will manage. Valid values are `HOST` or `KUBERNETESCLUSTER`. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "managed_entity_type")

    @managed_entity_type.setter
    def managed_entity_type(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "managed_entity_type", value)

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        A description of the fleet. This can be updated after creation.
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "description", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the fleet. This can be changed after creation.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="operatingSystem")
    def operating_system(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The operating system type for HOST fleets. **Required when `managed_entity_type` is `HOST`**. Valid values are `LINUX` or `WINDOWS`. **Must not be set when `managed_entity_type` is `KUBERNETESCLUSTER`**. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "operating_system")

    @operating_system.setter
    def operating_system(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "operating_system", value)

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The organization ID. If not provided, it will be automatically fetched from your account. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "organization_id")

    @organization_id.setter
    def organization_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "organization_id", value)

    @_builtins.property
    @pulumi.getter
    def product(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The New Relic product associated with this fleet (e.g., `INFRA`).
        """
        return pulumi.get(self, "product")

    @product.setter
    def product(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "product", value)

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
        """
        A list of tags for the fleet. Each tag should be in the format `"key:value1,value2"` where multiple values can be comma-separated.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "tags", value)


@pulumi.input_type
class _FleetState:
    def __init__(__self__, *,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 managed_entity_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 operating_system: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 product: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
        """
        Input properties used for looking up and filtering Fleet resources.

        :param pulumi.Input[_builtins.str] description: A description of the fleet. This can be updated after creation.
        :param pulumi.Input[_builtins.str] managed_entity_type: The type of entities this fleet will manage. Valid values are `HOST` or `KUBERNETESCLUSTER`. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] name: The name of the fleet. This can be changed after creation.
        :param pulumi.Input[_builtins.str] operating_system: The operating system type for HOST fleets. **Required when `managed_entity_type` is `HOST`**. Valid values are `LINUX` or `WINDOWS`. **Must not be set when `managed_entity_type` is `KUBERNETESCLUSTER`**. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, it will be automatically fetched from your account. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] product: The New Relic product associated with this fleet (e.g., `INFRA`).
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: A list of tags for the fleet. Each tag should be in the format `"key:value1,value2"` where multiple values can be comma-separated.
        """
        if description is not None:
            pulumi.set(__self__, "description", description)
        if managed_entity_type is not None:
            pulumi.set(__self__, "managed_entity_type", managed_entity_type)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if operating_system is not None:
            pulumi.set(__self__, "operating_system", operating_system)
        if organization_id is not None:
            pulumi.set(__self__, "organization_id", organization_id)
        if product is not None:
            pulumi.set(__self__, "product", product)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        A description of the fleet. This can be updated after creation.
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "description", value)

    @_builtins.property
    @pulumi.getter(name="managedEntityType")
    def managed_entity_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The type of entities this fleet will manage. Valid values are `HOST` or `KUBERNETESCLUSTER`. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "managed_entity_type")

    @managed_entity_type.setter
    def managed_entity_type(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "managed_entity_type", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The name of the fleet. This can be changed after creation.
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="operatingSystem")
    def operating_system(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The operating system type for HOST fleets. **Required when `managed_entity_type` is `HOST`**. Valid values are `LINUX` or `WINDOWS`. **Must not be set when `managed_entity_type` is `KUBERNETESCLUSTER`**. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "operating_system")

    @operating_system.setter
    def operating_system(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "operating_system", value)

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The organization ID. If not provided, it will be automatically fetched from your account. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "organization_id")

    @organization_id.setter
    def organization_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "organization_id", value)

    @_builtins.property
    @pulumi.getter
    def product(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The New Relic product associated with this fleet (e.g., `INFRA`).
        """
        return pulumi.get(self, "product")

    @product.setter
    def product(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "product", value)

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
        """
        A list of tags for the fleet. Each tag should be in the format `"key:value1,value2"` where multiple values can be comma-separated.
        """
        return pulumi.get(self, "tags")

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
        pulumi.set(self, "tags", value)


@pulumi.type_token("newrelic:index/fleet:Fleet")
class Fleet(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 managed_entity_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 operating_system: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 product: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 __props__=None):
        """
        Use this resource to create and manage New Relic fleets for centralized agent management.

        Fleets enable you to organize and manage New Relic agents across your infrastructure. You can create fleets for different types of infrastructure (HOST or KUBERNETESCLUSTER) and use them to centrally deploy agent configurations, manage updates, and organize your entities with tags.

        ## Example Usage

        ### Linux Host Fleet

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        linux_hosts = newrelic.Fleet("linux_hosts",
            name="Production Linux Hosts",
            managed_entity_type="HOST",
            operating_system="LINUX",
            description="Fleet for managing Linux production hosts",
            product="INFRA",
            tags=[
                "environment:production",
                "team:platform,ops",
            ])
        ```

        ### Windows Host Fleet

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        windows_hosts = newrelic.Fleet("windows_hosts",
            name="Production Windows Hosts",
            managed_entity_type="HOST",
            operating_system="WINDOWS",
            description="Fleet for managing Windows production hosts")
        ```

        ### Kubernetes Cluster Fleet

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        k8s_clusters = newrelic.Fleet("k8s_clusters",
            name="Production Kubernetes Clusters",
            managed_entity_type="KUBERNETESCLUSTER",
            description="Fleet for managing Kubernetes clusters",
            tags=["environment:production"])
        ```

        ## Import

        Fleets can be imported using the fleet ID:

        ```sh
        $ pulumi import newrelic:index/fleet:Fleet linux_hosts <fleet_id>
        ```


        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] description: A description of the fleet. This can be updated after creation.
        :param pulumi.Input[_builtins.str] managed_entity_type: The type of entities this fleet will manage. Valid values are `HOST` or `KUBERNETESCLUSTER`. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] name: The name of the fleet. This can be changed after creation.
        :param pulumi.Input[_builtins.str] operating_system: The operating system type for HOST fleets. **Required when `managed_entity_type` is `HOST`**. Valid values are `LINUX` or `WINDOWS`. **Must not be set when `managed_entity_type` is `KUBERNETESCLUSTER`**. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, it will be automatically fetched from your account. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] product: The New Relic product associated with this fleet (e.g., `INFRA`).
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: A list of tags for the fleet. Each tag should be in the format `"key:value1,value2"` where multiple values can be comma-separated.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: FleetArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Use this resource to create and manage New Relic fleets for centralized agent management.

        Fleets enable you to organize and manage New Relic agents across your infrastructure. You can create fleets for different types of infrastructure (HOST or KUBERNETESCLUSTER) and use them to centrally deploy agent configurations, manage updates, and organize your entities with tags.

        ## Example Usage

        ### Linux Host Fleet

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        linux_hosts = newrelic.Fleet("linux_hosts",
            name="Production Linux Hosts",
            managed_entity_type="HOST",
            operating_system="LINUX",
            description="Fleet for managing Linux production hosts",
            product="INFRA",
            tags=[
                "environment:production",
                "team:platform,ops",
            ])
        ```

        ### Windows Host Fleet

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        windows_hosts = newrelic.Fleet("windows_hosts",
            name="Production Windows Hosts",
            managed_entity_type="HOST",
            operating_system="WINDOWS",
            description="Fleet for managing Windows production hosts")
        ```

        ### Kubernetes Cluster Fleet

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        k8s_clusters = newrelic.Fleet("k8s_clusters",
            name="Production Kubernetes Clusters",
            managed_entity_type="KUBERNETESCLUSTER",
            description="Fleet for managing Kubernetes clusters",
            tags=["environment:production"])
        ```

        ## Import

        Fleets can be imported using the fleet ID:

        ```sh
        $ pulumi import newrelic:index/fleet:Fleet linux_hosts <fleet_id>
        ```


        :param str resource_name: The name of the resource.
        :param FleetArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(FleetArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 managed_entity_type: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 operating_system: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 product: Optional[pulumi.Input[_builtins.str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = FleetArgs.__new__(FleetArgs)

            __props__.__dict__["description"] = description
            if managed_entity_type is None and not opts.urn:
                raise TypeError("Missing required property 'managed_entity_type'")
            __props__.__dict__["managed_entity_type"] = managed_entity_type
            __props__.__dict__["name"] = name
            __props__.__dict__["operating_system"] = operating_system
            __props__.__dict__["organization_id"] = organization_id
            __props__.__dict__["product"] = product
            __props__.__dict__["tags"] = tags
        super(Fleet, __self__).__init__(
            'newrelic:index/fleet:Fleet',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            description: Optional[pulumi.Input[_builtins.str]] = None,
            managed_entity_type: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            operating_system: Optional[pulumi.Input[_builtins.str]] = None,
            organization_id: Optional[pulumi.Input[_builtins.str]] = None,
            product: Optional[pulumi.Input[_builtins.str]] = None,
            tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None) -> 'Fleet':
        """
        Get an existing Fleet resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] description: A description of the fleet. This can be updated after creation.
        :param pulumi.Input[_builtins.str] managed_entity_type: The type of entities this fleet will manage. Valid values are `HOST` or `KUBERNETESCLUSTER`. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] name: The name of the fleet. This can be changed after creation.
        :param pulumi.Input[_builtins.str] operating_system: The operating system type for HOST fleets. **Required when `managed_entity_type` is `HOST`**. Valid values are `LINUX` or `WINDOWS`. **Must not be set when `managed_entity_type` is `KUBERNETESCLUSTER`**. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, it will be automatically fetched from your account. **Note**: This cannot be changed after creation (forces new resource).
        :param pulumi.Input[_builtins.str] product: The New Relic product associated with this fleet (e.g., `INFRA`).
        :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: A list of tags for the fleet. Each tag should be in the format `"key:value1,value2"` where multiple values can be comma-separated.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _FleetState.__new__(_FleetState)

        __props__.__dict__["description"] = description
        __props__.__dict__["managed_entity_type"] = managed_entity_type
        __props__.__dict__["name"] = name
        __props__.__dict__["operating_system"] = operating_system
        __props__.__dict__["organization_id"] = organization_id
        __props__.__dict__["product"] = product
        __props__.__dict__["tags"] = tags
        return Fleet(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        A description of the fleet. This can be updated after creation.
        """
        return pulumi.get(self, "description")

    @_builtins.property
    @pulumi.getter(name="managedEntityType")
    def managed_entity_type(self) -> pulumi.Output[_builtins.str]:
        """
        The type of entities this fleet will manage. Valid values are `HOST` or `KUBERNETESCLUSTER`. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "managed_entity_type")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        The name of the fleet. This can be changed after creation.
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="operatingSystem")
    def operating_system(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The operating system type for HOST fleets. **Required when `managed_entity_type` is `HOST`**. Valid values are `LINUX` or `WINDOWS`. **Must not be set when `managed_entity_type` is `KUBERNETESCLUSTER`**. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "operating_system")

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> pulumi.Output[_builtins.str]:
        """
        The organization ID. If not provided, it will be automatically fetched from your account. **Note**: This cannot be changed after creation (forces new resource).
        """
        return pulumi.get(self, "organization_id")

    @_builtins.property
    @pulumi.getter
    def product(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The New Relic product associated with this fleet (e.g., `INFRA`).
        """
        return pulumi.get(self, "product")

    @_builtins.property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
        """
        A list of tags for the fleet. Each tag should be in the format `"key:value1,value2"` where multiple values can be comma-separated.
        """
        return pulumi.get(self, "tags")

