# 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 ._inputs import *

__all__ = ['ProviderArgs', 'Provider']

@pulumi.input_type
class ProviderArgs:
    def __init__(__self__, *,
                 access_key: Optional[pulumi.Input[builtins.str]] = None,
                 assume_role: Optional[pulumi.Input['ProviderAssumeRoleArgs']] = None,
                 customer_headers: Optional[pulumi.Input[builtins.str]] = None,
                 disable_ssl: Optional[pulumi.Input[builtins.bool]] = None,
                 endpoints: Optional[pulumi.Input['ProviderEndpointsArgs']] = None,
                 proxy_url: Optional[pulumi.Input[builtins.str]] = None,
                 region: Optional[pulumi.Input[builtins.str]] = None,
                 secret_key: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a Provider resource.
        :param pulumi.Input[builtins.str] access_key: The Access Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_ACCESS_KEY`
               environment variable
        :param pulumi.Input['ProviderAssumeRoleArgs'] assume_role: An `assume_role` block (documented below). Only one `assume_role` block may be in the configuration.
        :param pulumi.Input[builtins.str] customer_headers: CUSTOMER HEADERS for Byteplus Provider. The customer_headers field uses commas (,) to separate multiple headers, and
               colons (:) to separate each header key from its corresponding value.
        :param pulumi.Input[builtins.bool] disable_ssl: Disable SSL for Byteplus Provider
        :param pulumi.Input['ProviderEndpointsArgs'] endpoints: An `endpoints` block (documented below). Only one `endpoints` block may be in the configuration.
        :param pulumi.Input[builtins.str] proxy_url: PROXY URL for Byteplus Provider
        :param pulumi.Input[builtins.str] region: The Region for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_REGION` environment
               variable
        :param pulumi.Input[builtins.str] secret_key: he Secret Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_SECRET_KEY`
               environment variable
        """
        if access_key is None:
            access_key = _utilities.get_env('BYTEPLUS_ACCESS_KEY')
        if access_key is not None:
            pulumi.set(__self__, "access_key", access_key)
        if assume_role is not None:
            pulumi.set(__self__, "assume_role", assume_role)
        if customer_headers is None:
            customer_headers = _utilities.get_env('BYTEPLUS_CUSTOMER_HEADERS')
        if customer_headers is not None:
            pulumi.set(__self__, "customer_headers", customer_headers)
        if disable_ssl is None:
            disable_ssl = _utilities.get_env_bool('BYTEPLUS_DISABLE_SSL')
        if disable_ssl is not None:
            pulumi.set(__self__, "disable_ssl", disable_ssl)
        if endpoints is not None:
            pulumi.set(__self__, "endpoints", endpoints)
        if proxy_url is None:
            proxy_url = _utilities.get_env('BYTEPLUS_PROXY_URL')
        if proxy_url is not None:
            pulumi.set(__self__, "proxy_url", proxy_url)
        if region is None:
            region = _utilities.get_env('BYTEPLUS_REGION')
        if region is not None:
            pulumi.set(__self__, "region", region)
        if secret_key is None:
            secret_key = _utilities.get_env('BYTEPLUS_SECRET_KEY')
        if secret_key is not None:
            pulumi.set(__self__, "secret_key", secret_key)

    @property
    @pulumi.getter(name="accessKey")
    def access_key(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        The Access Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_ACCESS_KEY`
        environment variable
        """
        return pulumi.get(self, "access_key")

    @access_key.setter
    def access_key(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "access_key", value)

    @property
    @pulumi.getter(name="assumeRole")
    def assume_role(self) -> Optional[pulumi.Input['ProviderAssumeRoleArgs']]:
        """
        An `assume_role` block (documented below). Only one `assume_role` block may be in the configuration.
        """
        return pulumi.get(self, "assume_role")

    @assume_role.setter
    def assume_role(self, value: Optional[pulumi.Input['ProviderAssumeRoleArgs']]):
        pulumi.set(self, "assume_role", value)

    @property
    @pulumi.getter(name="customerHeaders")
    def customer_headers(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        CUSTOMER HEADERS for Byteplus Provider. The customer_headers field uses commas (,) to separate multiple headers, and
        colons (:) to separate each header key from its corresponding value.
        """
        return pulumi.get(self, "customer_headers")

    @customer_headers.setter
    def customer_headers(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "customer_headers", value)

    @property
    @pulumi.getter(name="disableSsl")
    def disable_ssl(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        Disable SSL for Byteplus Provider
        """
        return pulumi.get(self, "disable_ssl")

    @disable_ssl.setter
    def disable_ssl(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "disable_ssl", value)

    @property
    @pulumi.getter
    def endpoints(self) -> Optional[pulumi.Input['ProviderEndpointsArgs']]:
        """
        An `endpoints` block (documented below). Only one `endpoints` block may be in the configuration.
        """
        return pulumi.get(self, "endpoints")

    @endpoints.setter
    def endpoints(self, value: Optional[pulumi.Input['ProviderEndpointsArgs']]):
        pulumi.set(self, "endpoints", value)

    @property
    @pulumi.getter(name="proxyUrl")
    def proxy_url(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        PROXY URL for Byteplus Provider
        """
        return pulumi.get(self, "proxy_url")

    @proxy_url.setter
    def proxy_url(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "proxy_url", value)

    @property
    @pulumi.getter
    def region(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        The Region for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_REGION` environment
        variable
        """
        return pulumi.get(self, "region")

    @region.setter
    def region(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "region", value)

    @property
    @pulumi.getter(name="secretKey")
    def secret_key(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        he Secret Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_SECRET_KEY`
        environment variable
        """
        return pulumi.get(self, "secret_key")

    @secret_key.setter
    def secret_key(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "secret_key", value)


@pulumi.type_token("pulumi:providers:bytepluscc")
class Provider(pulumi.ProviderResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 access_key: Optional[pulumi.Input[builtins.str]] = None,
                 assume_role: Optional[pulumi.Input[Union['ProviderAssumeRoleArgs', 'ProviderAssumeRoleArgsDict']]] = None,
                 customer_headers: Optional[pulumi.Input[builtins.str]] = None,
                 disable_ssl: Optional[pulumi.Input[builtins.bool]] = None,
                 endpoints: Optional[pulumi.Input[Union['ProviderEndpointsArgs', 'ProviderEndpointsArgsDict']]] = None,
                 proxy_url: Optional[pulumi.Input[builtins.str]] = None,
                 region: Optional[pulumi.Input[builtins.str]] = None,
                 secret_key: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        The provider type for the bytepluscc package. By default, resources use package-wide configuration
        settings, however an explicit `Provider` instance may be created and passed during resource
        construction to achieve fine-grained programmatic control over provider settings. See the
        [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] access_key: The Access Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_ACCESS_KEY`
               environment variable
        :param pulumi.Input[Union['ProviderAssumeRoleArgs', 'ProviderAssumeRoleArgsDict']] assume_role: An `assume_role` block (documented below). Only one `assume_role` block may be in the configuration.
        :param pulumi.Input[builtins.str] customer_headers: CUSTOMER HEADERS for Byteplus Provider. The customer_headers field uses commas (,) to separate multiple headers, and
               colons (:) to separate each header key from its corresponding value.
        :param pulumi.Input[builtins.bool] disable_ssl: Disable SSL for Byteplus Provider
        :param pulumi.Input[Union['ProviderEndpointsArgs', 'ProviderEndpointsArgsDict']] endpoints: An `endpoints` block (documented below). Only one `endpoints` block may be in the configuration.
        :param pulumi.Input[builtins.str] proxy_url: PROXY URL for Byteplus Provider
        :param pulumi.Input[builtins.str] region: The Region for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_REGION` environment
               variable
        :param pulumi.Input[builtins.str] secret_key: he Secret Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_SECRET_KEY`
               environment variable
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[ProviderArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The provider type for the bytepluscc package. By default, resources use package-wide configuration
        settings, however an explicit `Provider` instance may be created and passed during resource
        construction to achieve fine-grained programmatic control over provider settings. See the
        [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.

        :param str resource_name: The name of the resource.
        :param ProviderArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 access_key: Optional[pulumi.Input[builtins.str]] = None,
                 assume_role: Optional[pulumi.Input[Union['ProviderAssumeRoleArgs', 'ProviderAssumeRoleArgsDict']]] = None,
                 customer_headers: Optional[pulumi.Input[builtins.str]] = None,
                 disable_ssl: Optional[pulumi.Input[builtins.bool]] = None,
                 endpoints: Optional[pulumi.Input[Union['ProviderEndpointsArgs', 'ProviderEndpointsArgsDict']]] = None,
                 proxy_url: Optional[pulumi.Input[builtins.str]] = None,
                 region: Optional[pulumi.Input[builtins.str]] = None,
                 secret_key: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        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__ = ProviderArgs.__new__(ProviderArgs)

            if access_key is None:
                access_key = _utilities.get_env('BYTEPLUS_ACCESS_KEY')
            __props__.__dict__["access_key"] = access_key
            __props__.__dict__["assume_role"] = pulumi.Output.from_input(assume_role).apply(pulumi.runtime.to_json) if assume_role is not None else None
            if customer_headers is None:
                customer_headers = _utilities.get_env('BYTEPLUS_CUSTOMER_HEADERS')
            __props__.__dict__["customer_headers"] = customer_headers
            if disable_ssl is None:
                disable_ssl = _utilities.get_env_bool('BYTEPLUS_DISABLE_SSL')
            __props__.__dict__["disable_ssl"] = pulumi.Output.from_input(disable_ssl).apply(pulumi.runtime.to_json) if disable_ssl is not None else None
            __props__.__dict__["endpoints"] = pulumi.Output.from_input(endpoints).apply(pulumi.runtime.to_json) if endpoints is not None else None
            if proxy_url is None:
                proxy_url = _utilities.get_env('BYTEPLUS_PROXY_URL')
            __props__.__dict__["proxy_url"] = proxy_url
            if region is None:
                region = _utilities.get_env('BYTEPLUS_REGION')
            __props__.__dict__["region"] = region
            if secret_key is None:
                secret_key = _utilities.get_env('BYTEPLUS_SECRET_KEY')
            __props__.__dict__["secret_key"] = secret_key
        super(Provider, __self__).__init__(
            'bytepluscc',
            resource_name,
            __props__,
            opts)

    @property
    @pulumi.getter(name="accessKey")
    def access_key(self) -> pulumi.Output[Optional[builtins.str]]:
        """
        The Access Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_ACCESS_KEY`
        environment variable
        """
        return pulumi.get(self, "access_key")

    @property
    @pulumi.getter(name="customerHeaders")
    def customer_headers(self) -> pulumi.Output[Optional[builtins.str]]:
        """
        CUSTOMER HEADERS for Byteplus Provider. The customer_headers field uses commas (,) to separate multiple headers, and
        colons (:) to separate each header key from its corresponding value.
        """
        return pulumi.get(self, "customer_headers")

    @property
    @pulumi.getter(name="proxyUrl")
    def proxy_url(self) -> pulumi.Output[Optional[builtins.str]]:
        """
        PROXY URL for Byteplus Provider
        """
        return pulumi.get(self, "proxy_url")

    @property
    @pulumi.getter
    def region(self) -> pulumi.Output[Optional[builtins.str]]:
        """
        The Region for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_REGION` environment
        variable
        """
        return pulumi.get(self, "region")

    @property
    @pulumi.getter(name="secretKey")
    def secret_key(self) -> pulumi.Output[Optional[builtins.str]]:
        """
        he Secret Key for Byteplus Provider. It must be provided, but it can also be sourced from the `BYTEPLUS_SECRET_KEY`
        environment variable
        """
        return pulumi.get(self, "secret_key")

    @pulumi.output_type
    class TerraformConfigResult:
        def __init__(__self__, result=None):
            if result and not isinstance(result, dict):
                raise TypeError("Expected argument 'result' to be a dict")
            pulumi.set(__self__, "result", result)

        @property
        @pulumi.getter
        def result(self) -> Mapping[str, Any]:
            return pulumi.get(self, "result")

    def terraform_config(__self__) -> pulumi.Output['Provider.TerraformConfigResult']:
        """
        This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
        """
        __args__ = dict()
        __args__['__self__'] = __self__
        return pulumi.runtime.call('pulumi:providers:bytepluscc/terraformConfig', __args__, res=__self__, typ=Provider.TerraformConfigResult)

