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

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._enums import *

__all__ = ['LinkServiceToEnvGroupArgs', 'LinkServiceToEnvGroup']

@pulumi.input_type
class LinkServiceToEnvGroupArgs:
    def __init__(__self__, *,
                 env_group_id: Optional[pulumi.Input[str]] = None,
                 service_id: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a LinkServiceToEnvGroup resource.
        :param pulumi.Input[str] env_group_id: Filter for resources that belong to an environment group
        :param pulumi.Input[str] service_id: The ID of the service
        """
        if env_group_id is not None:
            pulumi.set(__self__, "env_group_id", env_group_id)
        if service_id is not None:
            pulumi.set(__self__, "service_id", service_id)

    @property
    @pulumi.getter(name="envGroupId")
    def env_group_id(self) -> Optional[pulumi.Input[str]]:
        """
        Filter for resources that belong to an environment group
        """
        return pulumi.get(self, "env_group_id")

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

    @property
    @pulumi.getter(name="serviceId")
    def service_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the service
        """
        return pulumi.get(self, "service_id")

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


class LinkServiceToEnvGroup(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 env_group_id: Optional[pulumi.Input[str]] = None,
                 service_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Create a LinkServiceToEnvGroup resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] env_group_id: Filter for resources that belong to an environment group
        :param pulumi.Input[str] service_id: The ID of the service
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[LinkServiceToEnvGroupArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a LinkServiceToEnvGroup resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param LinkServiceToEnvGroupArgs 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(LinkServiceToEnvGroupArgs, 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,
                 env_group_id: Optional[pulumi.Input[str]] = None,
                 service_id: Optional[pulumi.Input[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__ = LinkServiceToEnvGroupArgs.__new__(LinkServiceToEnvGroupArgs)

            __props__.__dict__["env_group_id"] = env_group_id
            __props__.__dict__["service_id"] = service_id
            __props__.__dict__["created_at"] = None
            __props__.__dict__["env_vars"] = None
            __props__.__dict__["environment_id"] = None
            __props__.__dict__["name"] = None
            __props__.__dict__["owner_id"] = None
            __props__.__dict__["secret_files"] = None
            __props__.__dict__["service_links"] = None
            __props__.__dict__["updated_at"] = None
        super(LinkServiceToEnvGroup, __self__).__init__(
            'render:env-groups:LinkServiceToEnvGroup',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None) -> 'LinkServiceToEnvGroup':
        """
        Get an existing LinkServiceToEnvGroup 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.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = LinkServiceToEnvGroupArgs.__new__(LinkServiceToEnvGroupArgs)

        __props__.__dict__["created_at"] = None
        __props__.__dict__["env_vars"] = None
        __props__.__dict__["environment_id"] = None
        __props__.__dict__["name"] = None
        __props__.__dict__["owner_id"] = None
        __props__.__dict__["secret_files"] = None
        __props__.__dict__["service_links"] = None
        __props__.__dict__["updated_at"] = None
        return LinkServiceToEnvGroup(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="envVars")
    def env_vars(self) -> pulumi.Output[Optional[Sequence['outputs.EnvVar']]]:
        return pulumi.get(self, "env_vars")

    @property
    @pulumi.getter(name="environmentId")
    def environment_id(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "environment_id")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="ownerId")
    def owner_id(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "owner_id")

    @property
    @pulumi.getter(name="secretFiles")
    def secret_files(self) -> pulumi.Output[Optional[Sequence['outputs.SecretFile']]]:
        return pulumi.get(self, "secret_files")

    @property
    @pulumi.getter(name="serviceLinks")
    def service_links(self) -> pulumi.Output[Optional[Sequence['outputs.ServiceLink']]]:
        """
        List of serviceIds linked to the envGroup
        """
        return pulumi.get(self, "service_links")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "updated_at")

