def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, key: Optional[pulumi.Input[str]]=None, resource_arn: Optional[pulumi.Input[str]]=None, value: Optional[pulumi.Input[str]]=None, __props__=None):
    if (opts is None):
        opts = pulumi.ResourceOptions()
    if (not isinstance(opts, pulumi.ResourceOptions)):
        raise TypeError('Expected resource options to be a ResourceOptions instance')
    if (opts.version is None):
        opts.version = _utilities.get_version()
    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__ = TagArgs.__new__(TagArgs)
        if ((key is None) and (not opts.urn)):
            raise TypeError("Missing required property 'key'")
        __props__.__dict__['key'] = key
        if ((resource_arn is None) and (not opts.urn)):
            raise TypeError("Missing required property 'resource_arn'")
        __props__.__dict__['resource_arn'] = resource_arn
        if ((value is None) and (not opts.urn)):
            raise TypeError("Missing required property 'value'")
        __props__.__dict__['value'] = value
    super(Tag, __self__).__init__('aws:ecs/tag:Tag', resource_name, __props__, opts)
def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, key: Optional[pulumi.Input[str]]=None, resource_arn: Optional[pulumi.Input[str]]=None, value: Optional[pulumi.Input[str]]=None, __props__=None):
    if (opts is None):
        opts = pulumi.ResourceOptions()
    if (not isinstance(opts, pulumi.ResourceOptions)):
        raise TypeError('Expected resource options to be a ResourceOptions instance')
    if (opts.version is None):
        opts.version = _utilities.get_version()
    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__ = TagArgs.__new__(TagArgs)
        if ((key is None) and (not opts.urn)):
            raise TypeError("Missing required property 'key'")
        __props__.__dict__['key'] = key
        if ((resource_arn is None) and (not opts.urn)):
            raise TypeError("Missing required property 'resource_arn'")
        __props__.__dict__['resource_arn'] = resource_arn
        if ((value is None) and (not opts.urn)):
            raise TypeError("Missing required property 'value'")
        __props__.__dict__['value'] = value
    super(Tag, __self__).__init__('aws:ecs/tag:Tag', resource_name, __props__, opts)