# 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 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

__all__ = [
    'GetCatalogV2Result',
    'AwaitableGetCatalogV2Result',
    'get_catalog_v2',
    'get_catalog_v2_output',
]

@pulumi.output_type
class GetCatalogV2Result:
    """
    A collection of values returned by getCatalogV2.
    """
    def __init__(__self__, annotations=None, ca_bundle=None, cluster_id=None, enabled=None, exponential_backoff_max_retries=None, exponential_backoff_max_wait=None, exponential_backoff_min_wait=None, git_branch=None, git_repo=None, id=None, insecure=None, insecure_plain_http=None, labels=None, name=None, resource_version=None, secret_name=None, secret_namespace=None, service_account=None, service_account_namespace=None, url=None):
        if annotations and not isinstance(annotations, dict):
            raise TypeError("Expected argument 'annotations' to be a dict")
        pulumi.set(__self__, "annotations", annotations)
        if ca_bundle and not isinstance(ca_bundle, str):
            raise TypeError("Expected argument 'ca_bundle' to be a str")
        pulumi.set(__self__, "ca_bundle", ca_bundle)
        if cluster_id and not isinstance(cluster_id, str):
            raise TypeError("Expected argument 'cluster_id' to be a str")
        pulumi.set(__self__, "cluster_id", cluster_id)
        if enabled and not isinstance(enabled, bool):
            raise TypeError("Expected argument 'enabled' to be a bool")
        pulumi.set(__self__, "enabled", enabled)
        if exponential_backoff_max_retries and not isinstance(exponential_backoff_max_retries, int):
            raise TypeError("Expected argument 'exponential_backoff_max_retries' to be a int")
        pulumi.set(__self__, "exponential_backoff_max_retries", exponential_backoff_max_retries)
        if exponential_backoff_max_wait and not isinstance(exponential_backoff_max_wait, int):
            raise TypeError("Expected argument 'exponential_backoff_max_wait' to be a int")
        pulumi.set(__self__, "exponential_backoff_max_wait", exponential_backoff_max_wait)
        if exponential_backoff_min_wait and not isinstance(exponential_backoff_min_wait, int):
            raise TypeError("Expected argument 'exponential_backoff_min_wait' to be a int")
        pulumi.set(__self__, "exponential_backoff_min_wait", exponential_backoff_min_wait)
        if git_branch and not isinstance(git_branch, str):
            raise TypeError("Expected argument 'git_branch' to be a str")
        pulumi.set(__self__, "git_branch", git_branch)
        if git_repo and not isinstance(git_repo, str):
            raise TypeError("Expected argument 'git_repo' to be a str")
        pulumi.set(__self__, "git_repo", git_repo)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if insecure and not isinstance(insecure, bool):
            raise TypeError("Expected argument 'insecure' to be a bool")
        pulumi.set(__self__, "insecure", insecure)
        if insecure_plain_http and not isinstance(insecure_plain_http, bool):
            raise TypeError("Expected argument 'insecure_plain_http' to be a bool")
        pulumi.set(__self__, "insecure_plain_http", insecure_plain_http)
        if labels and not isinstance(labels, dict):
            raise TypeError("Expected argument 'labels' to be a dict")
        pulumi.set(__self__, "labels", labels)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if resource_version and not isinstance(resource_version, str):
            raise TypeError("Expected argument 'resource_version' to be a str")
        pulumi.set(__self__, "resource_version", resource_version)
        if secret_name and not isinstance(secret_name, str):
            raise TypeError("Expected argument 'secret_name' to be a str")
        pulumi.set(__self__, "secret_name", secret_name)
        if secret_namespace and not isinstance(secret_namespace, str):
            raise TypeError("Expected argument 'secret_namespace' to be a str")
        pulumi.set(__self__, "secret_namespace", secret_namespace)
        if service_account and not isinstance(service_account, str):
            raise TypeError("Expected argument 'service_account' to be a str")
        pulumi.set(__self__, "service_account", service_account)
        if service_account_namespace and not isinstance(service_account_namespace, str):
            raise TypeError("Expected argument 'service_account_namespace' to be a str")
        pulumi.set(__self__, "service_account_namespace", service_account_namespace)
        if url and not isinstance(url, str):
            raise TypeError("Expected argument 'url' to be a str")
        pulumi.set(__self__, "url", url)

    @property
    @pulumi.getter
    def annotations(self) -> Mapping[str, str]:
        """
        (Computed) Annotations for the catalog v2 (map)
        """
        return pulumi.get(self, "annotations")

    @property
    @pulumi.getter(name="caBundle")
    def ca_bundle(self) -> str:
        """
        (Computed) PEM encoded CA bundle which will be used to validate the repo's certificate (string)
        """
        return pulumi.get(self, "ca_bundle")

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> str:
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter
    def enabled(self) -> bool:
        """
        (Computed) If disabled the repo clone will not be updated or allowed to be installed from. Default: `true` (bool)
        """
        return pulumi.get(self, "enabled")

    @property
    @pulumi.getter(name="exponentialBackoffMaxRetries")
    def exponential_backoff_max_retries(self) -> int:
        return pulumi.get(self, "exponential_backoff_max_retries")

    @property
    @pulumi.getter(name="exponentialBackoffMaxWait")
    def exponential_backoff_max_wait(self) -> int:
        return pulumi.get(self, "exponential_backoff_max_wait")

    @property
    @pulumi.getter(name="exponentialBackoffMinWait")
    def exponential_backoff_min_wait(self) -> int:
        return pulumi.get(self, "exponential_backoff_min_wait")

    @property
    @pulumi.getter(name="gitBranch")
    def git_branch(self) -> str:
        """
        (Computed) Git Repository branch containing Helm chart definitions. Default `master` (string)
        """
        return pulumi.get(self, "git_branch")

    @property
    @pulumi.getter(name="gitRepo")
    def git_repo(self) -> str:
        """
        (Computed) The url of the catalog v2 repo (string)
        """
        return pulumi.get(self, "git_repo")

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

    @property
    @pulumi.getter
    def insecure(self) -> bool:
        """
        (Computed) Use insecure HTTPS to download the repo's index. Default: `false` (bool)
        """
        return pulumi.get(self, "insecure")

    @property
    @pulumi.getter(name="insecurePlainHttp")
    def insecure_plain_http(self) -> Optional[bool]:
        return pulumi.get(self, "insecure_plain_http")

    @property
    @pulumi.getter
    def labels(self) -> Mapping[str, str]:
        """
        (Computed) Labels for the catalog v2 (map)
        """
        return pulumi.get(self, "labels")

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

    @property
    @pulumi.getter(name="resourceVersion")
    def resource_version(self) -> str:
        """
        (Computed) The k8s resource version (string)
        """
        return pulumi.get(self, "resource_version")

    @property
    @pulumi.getter(name="secretName")
    def secret_name(self) -> str:
        """
        (Computed) K8s secret name to be used to connect to the repo (string)
        """
        return pulumi.get(self, "secret_name")

    @property
    @pulumi.getter(name="secretNamespace")
    def secret_namespace(self) -> str:
        """
        (Computed) K8s secret namespace (string)
        """
        return pulumi.get(self, "secret_namespace")

    @property
    @pulumi.getter(name="serviceAccount")
    def service_account(self) -> str:
        """
        (Computed) K8s service account used to deploy charts instead of the end users credentials (string)
        """
        return pulumi.get(self, "service_account")

    @property
    @pulumi.getter(name="serviceAccountNamespace")
    def service_account_namespace(self) -> str:
        """
        (Computed) The username to access the catalog if needed (string)
        """
        return pulumi.get(self, "service_account_namespace")

    @property
    @pulumi.getter
    def url(self) -> str:
        """
        (Computed) URL to an index generated by Helm (string)
        """
        return pulumi.get(self, "url")


class AwaitableGetCatalogV2Result(GetCatalogV2Result):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCatalogV2Result(
            annotations=self.annotations,
            ca_bundle=self.ca_bundle,
            cluster_id=self.cluster_id,
            enabled=self.enabled,
            exponential_backoff_max_retries=self.exponential_backoff_max_retries,
            exponential_backoff_max_wait=self.exponential_backoff_max_wait,
            exponential_backoff_min_wait=self.exponential_backoff_min_wait,
            git_branch=self.git_branch,
            git_repo=self.git_repo,
            id=self.id,
            insecure=self.insecure,
            insecure_plain_http=self.insecure_plain_http,
            labels=self.labels,
            name=self.name,
            resource_version=self.resource_version,
            secret_name=self.secret_name,
            secret_namespace=self.secret_namespace,
            service_account=self.service_account,
            service_account_namespace=self.service_account_namespace,
            url=self.url)


def get_catalog_v2(cluster_id: Optional[str] = None,
                   exponential_backoff_max_retries: Optional[int] = None,
                   exponential_backoff_max_wait: Optional[int] = None,
                   exponential_backoff_min_wait: Optional[int] = None,
                   insecure_plain_http: Optional[bool] = None,
                   name: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCatalogV2Result:
    """
    Use this data source to retrieve information about a Rancher2 catalog v2. Catalog v2 resource is available at Rancher v2.5.x and above.


    :param str cluster_id: The cluster id of the catalog V2 (string)
    :param str name: The name of the catalog v2 (string)
    """
    __args__ = dict()
    __args__['clusterId'] = cluster_id
    __args__['exponentialBackoffMaxRetries'] = exponential_backoff_max_retries
    __args__['exponentialBackoffMaxWait'] = exponential_backoff_max_wait
    __args__['exponentialBackoffMinWait'] = exponential_backoff_min_wait
    __args__['insecurePlainHttp'] = insecure_plain_http
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('rancher2:index/getCatalogV2:getCatalogV2', __args__, opts=opts, typ=GetCatalogV2Result).value

    return AwaitableGetCatalogV2Result(
        annotations=pulumi.get(__ret__, 'annotations'),
        ca_bundle=pulumi.get(__ret__, 'ca_bundle'),
        cluster_id=pulumi.get(__ret__, 'cluster_id'),
        enabled=pulumi.get(__ret__, 'enabled'),
        exponential_backoff_max_retries=pulumi.get(__ret__, 'exponential_backoff_max_retries'),
        exponential_backoff_max_wait=pulumi.get(__ret__, 'exponential_backoff_max_wait'),
        exponential_backoff_min_wait=pulumi.get(__ret__, 'exponential_backoff_min_wait'),
        git_branch=pulumi.get(__ret__, 'git_branch'),
        git_repo=pulumi.get(__ret__, 'git_repo'),
        id=pulumi.get(__ret__, 'id'),
        insecure=pulumi.get(__ret__, 'insecure'),
        insecure_plain_http=pulumi.get(__ret__, 'insecure_plain_http'),
        labels=pulumi.get(__ret__, 'labels'),
        name=pulumi.get(__ret__, 'name'),
        resource_version=pulumi.get(__ret__, 'resource_version'),
        secret_name=pulumi.get(__ret__, 'secret_name'),
        secret_namespace=pulumi.get(__ret__, 'secret_namespace'),
        service_account=pulumi.get(__ret__, 'service_account'),
        service_account_namespace=pulumi.get(__ret__, 'service_account_namespace'),
        url=pulumi.get(__ret__, 'url'))
def get_catalog_v2_output(cluster_id: Optional[pulumi.Input[str]] = None,
                          exponential_backoff_max_retries: Optional[pulumi.Input[Optional[int]]] = None,
                          exponential_backoff_max_wait: Optional[pulumi.Input[Optional[int]]] = None,
                          exponential_backoff_min_wait: Optional[pulumi.Input[Optional[int]]] = None,
                          insecure_plain_http: Optional[pulumi.Input[Optional[bool]]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCatalogV2Result]:
    """
    Use this data source to retrieve information about a Rancher2 catalog v2. Catalog v2 resource is available at Rancher v2.5.x and above.


    :param str cluster_id: The cluster id of the catalog V2 (string)
    :param str name: The name of the catalog v2 (string)
    """
    __args__ = dict()
    __args__['clusterId'] = cluster_id
    __args__['exponentialBackoffMaxRetries'] = exponential_backoff_max_retries
    __args__['exponentialBackoffMaxWait'] = exponential_backoff_max_wait
    __args__['exponentialBackoffMinWait'] = exponential_backoff_min_wait
    __args__['insecurePlainHttp'] = insecure_plain_http
    __args__['name'] = name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('rancher2:index/getCatalogV2:getCatalogV2', __args__, opts=opts, typ=GetCatalogV2Result)
    return __ret__.apply(lambda __response__: GetCatalogV2Result(
        annotations=pulumi.get(__response__, 'annotations'),
        ca_bundle=pulumi.get(__response__, 'ca_bundle'),
        cluster_id=pulumi.get(__response__, 'cluster_id'),
        enabled=pulumi.get(__response__, 'enabled'),
        exponential_backoff_max_retries=pulumi.get(__response__, 'exponential_backoff_max_retries'),
        exponential_backoff_max_wait=pulumi.get(__response__, 'exponential_backoff_max_wait'),
        exponential_backoff_min_wait=pulumi.get(__response__, 'exponential_backoff_min_wait'),
        git_branch=pulumi.get(__response__, 'git_branch'),
        git_repo=pulumi.get(__response__, 'git_repo'),
        id=pulumi.get(__response__, 'id'),
        insecure=pulumi.get(__response__, 'insecure'),
        insecure_plain_http=pulumi.get(__response__, 'insecure_plain_http'),
        labels=pulumi.get(__response__, 'labels'),
        name=pulumi.get(__response__, 'name'),
        resource_version=pulumi.get(__response__, 'resource_version'),
        secret_name=pulumi.get(__response__, 'secret_name'),
        secret_namespace=pulumi.get(__response__, 'secret_namespace'),
        service_account=pulumi.get(__response__, 'service_account'),
        service_account_namespace=pulumi.get(__response__, 'service_account_namespace'),
        url=pulumi.get(__response__, 'url')))
