# 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__ = [
    'GetPartnerAttachmentServiceKeyResult',
    'AwaitableGetPartnerAttachmentServiceKeyResult',
    'get_partner_attachment_service_key',
    'get_partner_attachment_service_key_output',
]

@pulumi.output_type
class GetPartnerAttachmentServiceKeyResult:
    """
    A collection of values returned by getPartnerAttachmentServiceKey.
    """
    def __init__(__self__, attachment_id=None, created_at=None, id=None, state=None, value=None):
        if attachment_id and not isinstance(attachment_id, str):
            raise TypeError("Expected argument 'attachment_id' to be a str")
        pulumi.set(__self__, "attachment_id", attachment_id)
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if value and not isinstance(value, str):
            raise TypeError("Expected argument 'value' to be a str")
        pulumi.set(__self__, "value", value)

    @_builtins.property
    @pulumi.getter(name="attachmentId")
    def attachment_id(self) -> _builtins.str:
        return pulumi.get(self, "attachment_id")

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

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def state(self) -> _builtins.str:
        return pulumi.get(self, "state")

    @_builtins.property
    @pulumi.getter
    def value(self) -> _builtins.str:
        return pulumi.get(self, "value")


class AwaitableGetPartnerAttachmentServiceKeyResult(GetPartnerAttachmentServiceKeyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPartnerAttachmentServiceKeyResult(
            attachment_id=self.attachment_id,
            created_at=self.created_at,
            id=self.id,
            state=self.state,
            value=self.value)


def get_partner_attachment_service_key(attachment_id: Optional[_builtins.str] = None,
                                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPartnerAttachmentServiceKeyResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['attachmentId'] = attachment_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('digitalocean:index/getPartnerAttachmentServiceKey:getPartnerAttachmentServiceKey', __args__, opts=opts, typ=GetPartnerAttachmentServiceKeyResult).value

    return AwaitableGetPartnerAttachmentServiceKeyResult(
        attachment_id=pulumi.get(__ret__, 'attachment_id'),
        created_at=pulumi.get(__ret__, 'created_at'),
        id=pulumi.get(__ret__, 'id'),
        state=pulumi.get(__ret__, 'state'),
        value=pulumi.get(__ret__, 'value'))
def get_partner_attachment_service_key_output(attachment_id: Optional[pulumi.Input[_builtins.str]] = None,
                                              opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPartnerAttachmentServiceKeyResult]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['attachmentId'] = attachment_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getPartnerAttachmentServiceKey:getPartnerAttachmentServiceKey', __args__, opts=opts, typ=GetPartnerAttachmentServiceKeyResult)
    return __ret__.apply(lambda __response__: GetPartnerAttachmentServiceKeyResult(
        attachment_id=pulumi.get(__response__, 'attachment_id'),
        created_at=pulumi.get(__response__, 'created_at'),
        id=pulumi.get(__response__, 'id'),
        state=pulumi.get(__response__, 'state'),
        value=pulumi.get(__response__, 'value')))
