# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import _utilities, _tables

__all__ = ['Handshake']


class Handshake(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 note: Optional[pulumi.Input[str]] = None,
                 target_entity: Optional[pulumi.Input[str]] = None,
                 target_type: Optional[pulumi.Input[str]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Provides a Resource Manager handshake resource. You can invite accounts to join a resource directory for unified management.
        For information about Resource Manager handshake and how to use it, see [What is Resource Manager handshake](https://www.alibabacloud.com/help/en/doc-detail/135287.htm).

        > **NOTE:** Available in v1.82.0+.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        # Add a Resource Manager handshake.
        example = alicloud.resourcemanager.Handshake("example",
            note="test resource manager handshake",
            target_entity="1182775234******",
            target_type="Account")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] note: Remarks. The maximum length is 1024 characters.
        :param pulumi.Input[str] target_entity: Invited account ID or login email.
        :param pulumi.Input[str] target_type: Type of account being invited. Valid values: `Account`, `Email`.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        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__ = dict()

            __props__['note'] = note
            if target_entity is None:
                raise TypeError("Missing required property 'target_entity'")
            __props__['target_entity'] = target_entity
            if target_type is None:
                raise TypeError("Missing required property 'target_type'")
            __props__['target_type'] = target_type
            __props__['expire_time'] = None
            __props__['master_account_id'] = None
            __props__['master_account_name'] = None
            __props__['modify_time'] = None
            __props__['resource_directory_id'] = None
            __props__['status'] = None
        super(Handshake, __self__).__init__(
            'alicloud:resourcemanager/handshake:Handshake',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            expire_time: Optional[pulumi.Input[str]] = None,
            master_account_id: Optional[pulumi.Input[str]] = None,
            master_account_name: Optional[pulumi.Input[str]] = None,
            modify_time: Optional[pulumi.Input[str]] = None,
            note: Optional[pulumi.Input[str]] = None,
            resource_directory_id: Optional[pulumi.Input[str]] = None,
            status: Optional[pulumi.Input[str]] = None,
            target_entity: Optional[pulumi.Input[str]] = None,
            target_type: Optional[pulumi.Input[str]] = None) -> 'Handshake':
        """
        Get an existing Handshake 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[str] expire_time: The expiration time of the invitation.
        :param pulumi.Input[str] master_account_id: Resource account master account ID.
        :param pulumi.Input[str] master_account_name: The name of the main account of the resource directory.
        :param pulumi.Input[str] modify_time: The modification time of the invitation.
        :param pulumi.Input[str] note: Remarks. The maximum length is 1024 characters.
        :param pulumi.Input[str] resource_directory_id: Resource directory ID.
        :param pulumi.Input[str] status: Invitation status. Valid values: `Pending` waiting for confirmation, `Accepted`, `Cancelled`, `Declined`, `Expired`.
        :param pulumi.Input[str] target_entity: Invited account ID or login email.
        :param pulumi.Input[str] target_type: Type of account being invited. Valid values: `Account`, `Email`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["expire_time"] = expire_time
        __props__["master_account_id"] = master_account_id
        __props__["master_account_name"] = master_account_name
        __props__["modify_time"] = modify_time
        __props__["note"] = note
        __props__["resource_directory_id"] = resource_directory_id
        __props__["status"] = status
        __props__["target_entity"] = target_entity
        __props__["target_type"] = target_type
        return Handshake(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="expireTime")
    def expire_time(self) -> pulumi.Output[str]:
        """
        The expiration time of the invitation.
        """
        return pulumi.get(self, "expire_time")

    @property
    @pulumi.getter(name="masterAccountId")
    def master_account_id(self) -> pulumi.Output[str]:
        """
        Resource account master account ID.
        """
        return pulumi.get(self, "master_account_id")

    @property
    @pulumi.getter(name="masterAccountName")
    def master_account_name(self) -> pulumi.Output[str]:
        """
        The name of the main account of the resource directory.
        """
        return pulumi.get(self, "master_account_name")

    @property
    @pulumi.getter(name="modifyTime")
    def modify_time(self) -> pulumi.Output[str]:
        """
        The modification time of the invitation.
        """
        return pulumi.get(self, "modify_time")

    @property
    @pulumi.getter
    def note(self) -> pulumi.Output[Optional[str]]:
        """
        Remarks. The maximum length is 1024 characters.
        """
        return pulumi.get(self, "note")

    @property
    @pulumi.getter(name="resourceDirectoryId")
    def resource_directory_id(self) -> pulumi.Output[str]:
        """
        Resource directory ID.
        """
        return pulumi.get(self, "resource_directory_id")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[str]:
        """
        Invitation status. Valid values: `Pending` waiting for confirmation, `Accepted`, `Cancelled`, `Declined`, `Expired`.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="targetEntity")
    def target_entity(self) -> pulumi.Output[str]:
        """
        Invited account ID or login email.
        """
        return pulumi.get(self, "target_entity")

    @property
    @pulumi.getter(name="targetType")
    def target_type(self) -> pulumi.Output[str]:
        """
        Type of account being invited. Valid values: `Account`, `Email`.
        """
        return pulumi.get(self, "target_type")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

