# 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 builtins
import copy
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
from . import outputs

__all__ = [
    'GetImageResult',
    'AwaitableGetImageResult',
    'get_image',
    'get_image_output',
]

@pulumi.output_type
class GetImageResult:
    """
    A collection of values returned by getImage.
    """
    def __init__(__self__, architecture=None, boot_mode=None, created_at=None, description=None, detection_results=None, id=None, image_id=None, image_name=None, image_owner_id=None, instance_id=None, is_install_run_command_agent=None, is_lts=None, is_support_cloud_init=None, kernel=None, license_type=None, os_name=None, os_type=None, platform=None, platform_version=None, project_name=None, share_permissions=None, share_status=None, size=None, snapshot_group_id=None, snapshot_id=None, snapshots=None, status=None, tags=None, updated_at=None, virtual_size=None, visibility=None):
        if architecture and not isinstance(architecture, str):
            raise TypeError("Expected argument 'architecture' to be a str")
        pulumi.set(__self__, "architecture", architecture)
        if boot_mode and not isinstance(boot_mode, str):
            raise TypeError("Expected argument 'boot_mode' to be a str")
        pulumi.set(__self__, "boot_mode", boot_mode)
        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 description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if detection_results and not isinstance(detection_results, dict):
            raise TypeError("Expected argument 'detection_results' to be a dict")
        pulumi.set(__self__, "detection_results", detection_results)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if image_id and not isinstance(image_id, str):
            raise TypeError("Expected argument 'image_id' to be a str")
        pulumi.set(__self__, "image_id", image_id)
        if image_name and not isinstance(image_name, str):
            raise TypeError("Expected argument 'image_name' to be a str")
        pulumi.set(__self__, "image_name", image_name)
        if image_owner_id and not isinstance(image_owner_id, str):
            raise TypeError("Expected argument 'image_owner_id' to be a str")
        pulumi.set(__self__, "image_owner_id", image_owner_id)
        if instance_id and not isinstance(instance_id, str):
            raise TypeError("Expected argument 'instance_id' to be a str")
        pulumi.set(__self__, "instance_id", instance_id)
        if is_install_run_command_agent and not isinstance(is_install_run_command_agent, bool):
            raise TypeError("Expected argument 'is_install_run_command_agent' to be a bool")
        pulumi.set(__self__, "is_install_run_command_agent", is_install_run_command_agent)
        if is_lts and not isinstance(is_lts, bool):
            raise TypeError("Expected argument 'is_lts' to be a bool")
        pulumi.set(__self__, "is_lts", is_lts)
        if is_support_cloud_init and not isinstance(is_support_cloud_init, bool):
            raise TypeError("Expected argument 'is_support_cloud_init' to be a bool")
        pulumi.set(__self__, "is_support_cloud_init", is_support_cloud_init)
        if kernel and not isinstance(kernel, str):
            raise TypeError("Expected argument 'kernel' to be a str")
        pulumi.set(__self__, "kernel", kernel)
        if license_type and not isinstance(license_type, str):
            raise TypeError("Expected argument 'license_type' to be a str")
        pulumi.set(__self__, "license_type", license_type)
        if os_name and not isinstance(os_name, str):
            raise TypeError("Expected argument 'os_name' to be a str")
        pulumi.set(__self__, "os_name", os_name)
        if os_type and not isinstance(os_type, str):
            raise TypeError("Expected argument 'os_type' to be a str")
        pulumi.set(__self__, "os_type", os_type)
        if platform and not isinstance(platform, str):
            raise TypeError("Expected argument 'platform' to be a str")
        pulumi.set(__self__, "platform", platform)
        if platform_version and not isinstance(platform_version, str):
            raise TypeError("Expected argument 'platform_version' to be a str")
        pulumi.set(__self__, "platform_version", platform_version)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if share_permissions and not isinstance(share_permissions, list):
            raise TypeError("Expected argument 'share_permissions' to be a list")
        pulumi.set(__self__, "share_permissions", share_permissions)
        if share_status and not isinstance(share_status, str):
            raise TypeError("Expected argument 'share_status' to be a str")
        pulumi.set(__self__, "share_status", share_status)
        if size and not isinstance(size, int):
            raise TypeError("Expected argument 'size' to be a int")
        pulumi.set(__self__, "size", size)
        if snapshot_group_id and not isinstance(snapshot_group_id, str):
            raise TypeError("Expected argument 'snapshot_group_id' to be a str")
        pulumi.set(__self__, "snapshot_group_id", snapshot_group_id)
        if snapshot_id and not isinstance(snapshot_id, str):
            raise TypeError("Expected argument 'snapshot_id' to be a str")
        pulumi.set(__self__, "snapshot_id", snapshot_id)
        if snapshots and not isinstance(snapshots, list):
            raise TypeError("Expected argument 'snapshots' to be a list")
        pulumi.set(__self__, "snapshots", snapshots)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if virtual_size and not isinstance(virtual_size, float):
            raise TypeError("Expected argument 'virtual_size' to be a float")
        pulumi.set(__self__, "virtual_size", virtual_size)
        if visibility and not isinstance(visibility, str):
            raise TypeError("Expected argument 'visibility' to be a str")
        pulumi.set(__self__, "visibility", visibility)

    @property
    @pulumi.getter
    def architecture(self) -> builtins.str:
        """
        镜像的架构类型。可以选择amd64（x86计算）、arm64（ARM计算）类型。
        """
        return pulumi.get(self, "architecture")

    @property
    @pulumi.getter(name="bootMode")
    def boot_mode(self) -> builtins.str:
        """
        镜像的启动模式。可以选择BIOS、UEFI类型。
        """
        return pulumi.get(self, "boot_mode")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> builtins.str:
        """
        镜像创建时间
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        镜像描述。必须以字母、汉字开头。只能包含中文、字母、数字、下划线“_”、中划线“-”、等号“=”、英文逗号“,”、英文句号“.”、中文逗号“，”、中文句号“。”和空格。长度限制为0～255个字符。不填默认为空。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="detectionResults")
    def detection_results(self) -> 'outputs.GetImageDetectionResultsResult':
        """
        镜像的检测结果。
        """
        return pulumi.get(self, "detection_results")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="imageId")
    def image_id(self) -> builtins.str:
        """
        镜像ID。
        """
        return pulumi.get(self, "image_id")

    @property
    @pulumi.getter(name="imageName")
    def image_name(self) -> builtins.str:
        """
        镜像名称。必须以字母、汉字开头。只能包含中文、字母、数字、下划线“_”、中划线“-”、英文句号“.”。长度限制为1 ~ 128个字符。
        """
        return pulumi.get(self, "image_name")

    @property
    @pulumi.getter(name="imageOwnerId")
    def image_owner_id(self) -> builtins.str:
        """
        镜像所属的账号ID。
        """
        return pulumi.get(self, "image_owner_id")

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> builtins.str:
        """
        实例ID。本参数与SnapshotId、SnapshotGroupId参数，三选一必填。
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter(name="isInstallRunCommandAgent")
    def is_install_run_command_agent(self) -> builtins.bool:
        """
        镜像中是否安装了云助手Agent。
        """
        return pulumi.get(self, "is_install_run_command_agent")

    @property
    @pulumi.getter(name="isLts")
    def is_lts(self) -> builtins.bool:
        """
        公共镜像是否长期维护。
        """
        return pulumi.get(self, "is_lts")

    @property
    @pulumi.getter(name="isSupportCloudInit")
    def is_support_cloud_init(self) -> builtins.bool:
        """
        镜像是否支持Cloud-init。
        """
        return pulumi.get(self, "is_support_cloud_init")

    @property
    @pulumi.getter
    def kernel(self) -> builtins.str:
        """
        镜像的内核版本。
        """
        return pulumi.get(self, "kernel")

    @property
    @pulumi.getter(name="licenseType")
    def license_type(self) -> builtins.str:
        """
        镜像许可证类型。VolcanoEngine：默认，根据您设置的platform，采用官方渠道的许可证。BYOL：自带许可证（BYOL）。
        """
        return pulumi.get(self, "license_type")

    @property
    @pulumi.getter(name="osName")
    def os_name(self) -> builtins.str:
        """
        镜像操作系统的名称。
        """
        return pulumi.get(self, "os_name")

    @property
    @pulumi.getter(name="osType")
    def os_type(self) -> builtins.str:
        """
        操作系统类型。
        """
        return pulumi.get(self, "os_type")

    @property
    @pulumi.getter
    def platform(self) -> builtins.str:
        """
        镜像操作系统的发行版本。可以选择CentOS、Debian、veLinux、Windows Server、Fedora、OpenSUSE、Ubuntu。
        """
        return pulumi.get(self, "platform")

    @property
    @pulumi.getter(name="platformVersion")
    def platform_version(self) -> builtins.str:
        """
        镜像的发行版本。
        """
        return pulumi.get(self, "platform_version")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        资源所属项目。调用接口账号若仅拥有部分项目权限时必须传入有权限的项目信息。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="sharePermissions")
    def share_permissions(self) -> Sequence[builtins.str]:
        """
        镜像共享的账户
        """
        return pulumi.get(self, "share_permissions")

    @property
    @pulumi.getter(name="shareStatus")
    def share_status(self) -> builtins.str:
        """
        镜像共享状态。HasShared：自定义镜像已被共享给其他用户。当自定义镜像未被共享或使用公共镜像时，ShareStatus返回为空。
        """
        return pulumi.get(self, "share_status")

    @property
    @pulumi.getter
    def size(self) -> builtins.int:
        """
        镜像大小，单位为GiB。
        """
        return pulumi.get(self, "size")

    @property
    @pulumi.getter(name="snapshotGroupId")
    def snapshot_group_id(self) -> builtins.str:
        """
        快照一致性组ID，表示使用快照一致性组创建自定义镜像。本参数与SnapshotId、InstanceId参数，三选一必填。
        """
        return pulumi.get(self, "snapshot_group_id")

    @property
    @pulumi.getter(name="snapshotId")
    def snapshot_id(self) -> builtins.str:
        """
        系统盘快照ID，表示使用系统盘快照创建自定义镜像。本参数与InstanceId、SnapshotGroupId参数，三选一必填。
        """
        return pulumi.get(self, "snapshot_id")

    @property
    @pulumi.getter
    def snapshots(self) -> Sequence['outputs.GetImageSnapshotResult']:
        """
        镜像关联快照的信息。
        """
        return pulumi.get(self, "snapshots")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        镜像的状态。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetImageTagResult']:
        """
        镜像绑定的标签列表。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> builtins.str:
        """
        镜像更新时间
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter(name="virtualSize")
    def virtual_size(self) -> builtins.float:
        """
        镜像大小，单位为Byte。
        """
        return pulumi.get(self, "virtual_size")

    @property
    @pulumi.getter
    def visibility(self) -> builtins.str:
        """
        镜像的可见性。public：公共镜像。private：私有镜像。shared：共享镜像。
        """
        return pulumi.get(self, "visibility")


class AwaitableGetImageResult(GetImageResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetImageResult(
            architecture=self.architecture,
            boot_mode=self.boot_mode,
            created_at=self.created_at,
            description=self.description,
            detection_results=self.detection_results,
            id=self.id,
            image_id=self.image_id,
            image_name=self.image_name,
            image_owner_id=self.image_owner_id,
            instance_id=self.instance_id,
            is_install_run_command_agent=self.is_install_run_command_agent,
            is_lts=self.is_lts,
            is_support_cloud_init=self.is_support_cloud_init,
            kernel=self.kernel,
            license_type=self.license_type,
            os_name=self.os_name,
            os_type=self.os_type,
            platform=self.platform,
            platform_version=self.platform_version,
            project_name=self.project_name,
            share_permissions=self.share_permissions,
            share_status=self.share_status,
            size=self.size,
            snapshot_group_id=self.snapshot_group_id,
            snapshot_id=self.snapshot_id,
            snapshots=self.snapshots,
            status=self.status,
            tags=self.tags,
            updated_at=self.updated_at,
            virtual_size=self.virtual_size,
            visibility=self.visibility)


def get_image(id: Optional[builtins.str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetImageResult:
    """
    Data Source schema for Byteplus::ECS::Image


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:ecs/getImage:getImage', __args__, opts=opts, typ=GetImageResult).value

    return AwaitableGetImageResult(
        architecture=pulumi.get(__ret__, 'architecture'),
        boot_mode=pulumi.get(__ret__, 'boot_mode'),
        created_at=pulumi.get(__ret__, 'created_at'),
        description=pulumi.get(__ret__, 'description'),
        detection_results=pulumi.get(__ret__, 'detection_results'),
        id=pulumi.get(__ret__, 'id'),
        image_id=pulumi.get(__ret__, 'image_id'),
        image_name=pulumi.get(__ret__, 'image_name'),
        image_owner_id=pulumi.get(__ret__, 'image_owner_id'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        is_install_run_command_agent=pulumi.get(__ret__, 'is_install_run_command_agent'),
        is_lts=pulumi.get(__ret__, 'is_lts'),
        is_support_cloud_init=pulumi.get(__ret__, 'is_support_cloud_init'),
        kernel=pulumi.get(__ret__, 'kernel'),
        license_type=pulumi.get(__ret__, 'license_type'),
        os_name=pulumi.get(__ret__, 'os_name'),
        os_type=pulumi.get(__ret__, 'os_type'),
        platform=pulumi.get(__ret__, 'platform'),
        platform_version=pulumi.get(__ret__, 'platform_version'),
        project_name=pulumi.get(__ret__, 'project_name'),
        share_permissions=pulumi.get(__ret__, 'share_permissions'),
        share_status=pulumi.get(__ret__, 'share_status'),
        size=pulumi.get(__ret__, 'size'),
        snapshot_group_id=pulumi.get(__ret__, 'snapshot_group_id'),
        snapshot_id=pulumi.get(__ret__, 'snapshot_id'),
        snapshots=pulumi.get(__ret__, 'snapshots'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        virtual_size=pulumi.get(__ret__, 'virtual_size'),
        visibility=pulumi.get(__ret__, 'visibility'))
def get_image_output(id: Optional[pulumi.Input[builtins.str]] = None,
                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetImageResult]:
    """
    Data Source schema for Byteplus::ECS::Image


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:ecs/getImage:getImage', __args__, opts=opts, typ=GetImageResult)
    return __ret__.apply(lambda __response__: GetImageResult(
        architecture=pulumi.get(__response__, 'architecture'),
        boot_mode=pulumi.get(__response__, 'boot_mode'),
        created_at=pulumi.get(__response__, 'created_at'),
        description=pulumi.get(__response__, 'description'),
        detection_results=pulumi.get(__response__, 'detection_results'),
        id=pulumi.get(__response__, 'id'),
        image_id=pulumi.get(__response__, 'image_id'),
        image_name=pulumi.get(__response__, 'image_name'),
        image_owner_id=pulumi.get(__response__, 'image_owner_id'),
        instance_id=pulumi.get(__response__, 'instance_id'),
        is_install_run_command_agent=pulumi.get(__response__, 'is_install_run_command_agent'),
        is_lts=pulumi.get(__response__, 'is_lts'),
        is_support_cloud_init=pulumi.get(__response__, 'is_support_cloud_init'),
        kernel=pulumi.get(__response__, 'kernel'),
        license_type=pulumi.get(__response__, 'license_type'),
        os_name=pulumi.get(__response__, 'os_name'),
        os_type=pulumi.get(__response__, 'os_type'),
        platform=pulumi.get(__response__, 'platform'),
        platform_version=pulumi.get(__response__, 'platform_version'),
        project_name=pulumi.get(__response__, 'project_name'),
        share_permissions=pulumi.get(__response__, 'share_permissions'),
        share_status=pulumi.get(__response__, 'share_status'),
        size=pulumi.get(__response__, 'size'),
        snapshot_group_id=pulumi.get(__response__, 'snapshot_group_id'),
        snapshot_id=pulumi.get(__response__, 'snapshot_id'),
        snapshots=pulumi.get(__response__, 'snapshots'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        virtual_size=pulumi.get(__response__, 'virtual_size'),
        visibility=pulumi.get(__response__, 'visibility')))
