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

__all__ = ['AwsEuSovereignIntegrationsArgs', 'AwsEuSovereignIntegrations']

@pulumi.input_type
class AwsEuSovereignIntegrationsArgs:
    def __init__(__self__, *,
                 linked_account_id: pulumi.Input[_builtins.str],
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 billing: Optional[pulumi.Input['AwsEuSovereignIntegrationsBillingArgs']] = None,
                 cloudtrail: Optional[pulumi.Input['AwsEuSovereignIntegrationsCloudtrailArgs']] = None,
                 x_ray: Optional[pulumi.Input['AwsEuSovereignIntegrationsXRayArgs']] = None):
        """
        The set of arguments for constructing a AwsEuSovereignIntegrations resource.

        :param pulumi.Input[_builtins.str] linked_account_id: The ID of the linked AWS EU Sovereign account in New Relic.
        :param pulumi.Input[_builtins.str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
        :param pulumi.Input['AwsEuSovereignIntegrationsBillingArgs'] billing: Billing integration
        :param pulumi.Input['AwsEuSovereignIntegrationsCloudtrailArgs'] cloudtrail: CloudTrail integration
        :param pulumi.Input['AwsEuSovereignIntegrationsXRayArgs'] x_ray: X-Ray integration
        """
        pulumi.set(__self__, "linked_account_id", linked_account_id)
        if account_id is not None:
            pulumi.set(__self__, "account_id", account_id)
        if billing is not None:
            pulumi.set(__self__, "billing", billing)
        if cloudtrail is not None:
            pulumi.set(__self__, "cloudtrail", cloudtrail)
        if x_ray is not None:
            pulumi.set(__self__, "x_ray", x_ray)

    @_builtins.property
    @pulumi.getter(name="linkedAccountId")
    def linked_account_id(self) -> pulumi.Input[_builtins.str]:
        """
        The ID of the linked AWS EU Sovereign account in New Relic.
        """
        return pulumi.get(self, "linked_account_id")

    @linked_account_id.setter
    def linked_account_id(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "linked_account_id", value)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
        """
        return pulumi.get(self, "account_id")

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

    @_builtins.property
    @pulumi.getter
    def billing(self) -> Optional[pulumi.Input['AwsEuSovereignIntegrationsBillingArgs']]:
        """
        Billing integration
        """
        return pulumi.get(self, "billing")

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

    @_builtins.property
    @pulumi.getter
    def cloudtrail(self) -> Optional[pulumi.Input['AwsEuSovereignIntegrationsCloudtrailArgs']]:
        """
        CloudTrail integration
        """
        return pulumi.get(self, "cloudtrail")

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

    @_builtins.property
    @pulumi.getter(name="xRay")
    def x_ray(self) -> Optional[pulumi.Input['AwsEuSovereignIntegrationsXRayArgs']]:
        """
        X-Ray integration
        """
        return pulumi.get(self, "x_ray")

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


@pulumi.input_type
class _AwsEuSovereignIntegrationsState:
    def __init__(__self__, *,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 billing: Optional[pulumi.Input['AwsEuSovereignIntegrationsBillingArgs']] = None,
                 cloudtrail: Optional[pulumi.Input['AwsEuSovereignIntegrationsCloudtrailArgs']] = None,
                 linked_account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 x_ray: Optional[pulumi.Input['AwsEuSovereignIntegrationsXRayArgs']] = None):
        """
        Input properties used for looking up and filtering AwsEuSovereignIntegrations resources.

        :param pulumi.Input[_builtins.str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
        :param pulumi.Input['AwsEuSovereignIntegrationsBillingArgs'] billing: Billing integration
        :param pulumi.Input['AwsEuSovereignIntegrationsCloudtrailArgs'] cloudtrail: CloudTrail integration
        :param pulumi.Input[_builtins.str] linked_account_id: The ID of the linked AWS EU Sovereign account in New Relic.
        :param pulumi.Input['AwsEuSovereignIntegrationsXRayArgs'] x_ray: X-Ray integration
        """
        if account_id is not None:
            pulumi.set(__self__, "account_id", account_id)
        if billing is not None:
            pulumi.set(__self__, "billing", billing)
        if cloudtrail is not None:
            pulumi.set(__self__, "cloudtrail", cloudtrail)
        if linked_account_id is not None:
            pulumi.set(__self__, "linked_account_id", linked_account_id)
        if x_ray is not None:
            pulumi.set(__self__, "x_ray", x_ray)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
        """
        return pulumi.get(self, "account_id")

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

    @_builtins.property
    @pulumi.getter
    def billing(self) -> Optional[pulumi.Input['AwsEuSovereignIntegrationsBillingArgs']]:
        """
        Billing integration
        """
        return pulumi.get(self, "billing")

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

    @_builtins.property
    @pulumi.getter
    def cloudtrail(self) -> Optional[pulumi.Input['AwsEuSovereignIntegrationsCloudtrailArgs']]:
        """
        CloudTrail integration
        """
        return pulumi.get(self, "cloudtrail")

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

    @_builtins.property
    @pulumi.getter(name="linkedAccountId")
    def linked_account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The ID of the linked AWS EU Sovereign account in New Relic.
        """
        return pulumi.get(self, "linked_account_id")

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

    @_builtins.property
    @pulumi.getter(name="xRay")
    def x_ray(self) -> Optional[pulumi.Input['AwsEuSovereignIntegrationsXRayArgs']]:
        """
        X-Ray integration
        """
        return pulumi.get(self, "x_ray")

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


@pulumi.type_token("newrelic:cloud/awsEuSovereignIntegrations:AwsEuSovereignIntegrations")
class AwsEuSovereignIntegrations(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 billing: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsBillingArgs', 'AwsEuSovereignIntegrationsBillingArgsDict']]] = None,
                 cloudtrail: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsCloudtrailArgs', 'AwsEuSovereignIntegrationsCloudtrailArgsDict']]] = None,
                 linked_account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 x_ray: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsXRayArgs', 'AwsEuSovereignIntegrationsXRayArgsDict']]] = None,
                 __props__=None):
        """
        Use this resource to integrate AWS EU Sovereign services with New Relic.

        ## Prerequisite

        Setup is required for this resource to work properly. This resource assumes you have linked an AWS EU Sovereign account to New Relic.

        The New Relic AWS EU Sovereign integration relies on two mechanisms to get data into New Relic:

        * **CloudWatch Metric Streams (PUSH)**: This is the supported method for AWS EU Sovereign Cloud to get metrics into New Relic for the majority of AWS services. Follow the [steps outlined here](https://docs-preview.newrelic.com/docs/aws-eu-sovereign-cloud-integration) to set up a metric stream.

        * **API Polling (PULL)**: Required for services that are **not supported** by CloudWatch Metric Streams. The following three services must be integrated via API Polling: **Billing**, **CloudTrail** and **X-Ray**. Follow the [steps outlined here](https://docs-preview.newrelic.com/docs/aws-eu-sovereign-cloud-integration).

        This resource is used to configure API Polling integrations for those three services that are not available through AWS CloudWatch Metric Streams.

        ## Example Usage

        The following example demonstrates the use of the `cloud.AwsEuSovereignIntegrations` resource with multiple AWS EU Sovereign integrations supported by the resource.

        To view a full example with all supported AWS EU Sovereign integrations, please see the Additional Examples section. Integration blocks used in the resource may also be left empty to use the default configuration of the integration.

        A full example, inclusive of setup of AWS resources (from the AWS Terraform Provider) associated with this resource, may be found in our AWS EU Sovereign cloud integration guide.

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        foo = newrelic.cloud.AwsEuSovereignLinkAccount("foo",
            arn="arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations",
            metric_collection_mode="PULL",
            name="my-eu-sovereign-account")
        bar = newrelic.cloud.AwsEuSovereignIntegrations("bar",
            linked_account_id=foo.id,
            billing={
                "metrics_polling_interval": 3600,
            },
            cloudtrail={
                "metrics_polling_interval": 300,
                "aws_regions": ["eusc-de-east-1"],
            },
            x_ray={
                "metrics_polling_interval": 300,
                "aws_regions": ["eusc-de-east-1"],
            })
        ```

        ## Supported AWS EU Sovereign Integrations

        > **NOTE:** CloudWatch Metric Streams is the only supported method for AWS EU Sovereign Cloud. The following three integrations are for services **not supported by CloudWatch Metric Streams** and must be configured via API Polling using this resource.

        <details>
          <summary>Expand this section to view all supported AWS EU Sovereign services that may be integrated via this resource.</summary>

        | Block                  | Description                   |
        |------------------------|-------------------------------|
        | `billing`              | Billing Integration           |
        | `cloudtrail`           | CloudTrail Integration        |
        | `x_ray`                | X-Ray Integration             |

        </details>

        ## Additional Examples

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        bar = newrelic.cloud.AwsEuSovereignIntegrations("bar",
            linked_account_id=foo["id"],
            billing={
                "metrics_polling_interval": 300,
            },
            cloudtrail={
                "metrics_polling_interval": 900,
                "aws_regions": ["eusc-de-east-1"],
            },
            x_ray={
                "metrics_polling_interval": 300,
                "aws_regions": ["eusc-de-east-1"],
            })
        ```

        ## Import

        Linked AWS EU Sovereign account integrations can be imported using the `id`, e.g.

        ```sh
        $ pulumi import newrelic:cloud/awsEuSovereignIntegrations:AwsEuSovereignIntegrations foo <id>
        ```


        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
        :param pulumi.Input[Union['AwsEuSovereignIntegrationsBillingArgs', 'AwsEuSovereignIntegrationsBillingArgsDict']] billing: Billing integration
        :param pulumi.Input[Union['AwsEuSovereignIntegrationsCloudtrailArgs', 'AwsEuSovereignIntegrationsCloudtrailArgsDict']] cloudtrail: CloudTrail integration
        :param pulumi.Input[_builtins.str] linked_account_id: The ID of the linked AWS EU Sovereign account in New Relic.
        :param pulumi.Input[Union['AwsEuSovereignIntegrationsXRayArgs', 'AwsEuSovereignIntegrationsXRayArgsDict']] x_ray: X-Ray integration
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: AwsEuSovereignIntegrationsArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Use this resource to integrate AWS EU Sovereign services with New Relic.

        ## Prerequisite

        Setup is required for this resource to work properly. This resource assumes you have linked an AWS EU Sovereign account to New Relic.

        The New Relic AWS EU Sovereign integration relies on two mechanisms to get data into New Relic:

        * **CloudWatch Metric Streams (PUSH)**: This is the supported method for AWS EU Sovereign Cloud to get metrics into New Relic for the majority of AWS services. Follow the [steps outlined here](https://docs-preview.newrelic.com/docs/aws-eu-sovereign-cloud-integration) to set up a metric stream.

        * **API Polling (PULL)**: Required for services that are **not supported** by CloudWatch Metric Streams. The following three services must be integrated via API Polling: **Billing**, **CloudTrail** and **X-Ray**. Follow the [steps outlined here](https://docs-preview.newrelic.com/docs/aws-eu-sovereign-cloud-integration).

        This resource is used to configure API Polling integrations for those three services that are not available through AWS CloudWatch Metric Streams.

        ## Example Usage

        The following example demonstrates the use of the `cloud.AwsEuSovereignIntegrations` resource with multiple AWS EU Sovereign integrations supported by the resource.

        To view a full example with all supported AWS EU Sovereign integrations, please see the Additional Examples section. Integration blocks used in the resource may also be left empty to use the default configuration of the integration.

        A full example, inclusive of setup of AWS resources (from the AWS Terraform Provider) associated with this resource, may be found in our AWS EU Sovereign cloud integration guide.

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        foo = newrelic.cloud.AwsEuSovereignLinkAccount("foo",
            arn="arn:aws-eusc:iam::123456789012:role/NewRelicInfrastructure-Integrations",
            metric_collection_mode="PULL",
            name="my-eu-sovereign-account")
        bar = newrelic.cloud.AwsEuSovereignIntegrations("bar",
            linked_account_id=foo.id,
            billing={
                "metrics_polling_interval": 3600,
            },
            cloudtrail={
                "metrics_polling_interval": 300,
                "aws_regions": ["eusc-de-east-1"],
            },
            x_ray={
                "metrics_polling_interval": 300,
                "aws_regions": ["eusc-de-east-1"],
            })
        ```

        ## Supported AWS EU Sovereign Integrations

        > **NOTE:** CloudWatch Metric Streams is the only supported method for AWS EU Sovereign Cloud. The following three integrations are for services **not supported by CloudWatch Metric Streams** and must be configured via API Polling using this resource.

        <details>
          <summary>Expand this section to view all supported AWS EU Sovereign services that may be integrated via this resource.</summary>

        | Block                  | Description                   |
        |------------------------|-------------------------------|
        | `billing`              | Billing Integration           |
        | `cloudtrail`           | CloudTrail Integration        |
        | `x_ray`                | X-Ray Integration             |

        </details>

        ## Additional Examples

        ```python
        import pulumi
        import pulumi_newrelic as newrelic

        bar = newrelic.cloud.AwsEuSovereignIntegrations("bar",
            linked_account_id=foo["id"],
            billing={
                "metrics_polling_interval": 300,
            },
            cloudtrail={
                "metrics_polling_interval": 900,
                "aws_regions": ["eusc-de-east-1"],
            },
            x_ray={
                "metrics_polling_interval": 300,
                "aws_regions": ["eusc-de-east-1"],
            })
        ```

        ## Import

        Linked AWS EU Sovereign account integrations can be imported using the `id`, e.g.

        ```sh
        $ pulumi import newrelic:cloud/awsEuSovereignIntegrations:AwsEuSovereignIntegrations foo <id>
        ```


        :param str resource_name: The name of the resource.
        :param AwsEuSovereignIntegrationsArgs 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(AwsEuSovereignIntegrationsArgs, 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,
                 account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 billing: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsBillingArgs', 'AwsEuSovereignIntegrationsBillingArgsDict']]] = None,
                 cloudtrail: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsCloudtrailArgs', 'AwsEuSovereignIntegrationsCloudtrailArgsDict']]] = None,
                 linked_account_id: Optional[pulumi.Input[_builtins.str]] = None,
                 x_ray: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsXRayArgs', 'AwsEuSovereignIntegrationsXRayArgsDict']]] = 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__ = AwsEuSovereignIntegrationsArgs.__new__(AwsEuSovereignIntegrationsArgs)

            __props__.__dict__["account_id"] = account_id
            __props__.__dict__["billing"] = billing
            __props__.__dict__["cloudtrail"] = cloudtrail
            if linked_account_id is None and not opts.urn:
                raise TypeError("Missing required property 'linked_account_id'")
            __props__.__dict__["linked_account_id"] = linked_account_id
            __props__.__dict__["x_ray"] = x_ray
        super(AwsEuSovereignIntegrations, __self__).__init__(
            'newrelic:cloud/awsEuSovereignIntegrations:AwsEuSovereignIntegrations',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            account_id: Optional[pulumi.Input[_builtins.str]] = None,
            billing: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsBillingArgs', 'AwsEuSovereignIntegrationsBillingArgsDict']]] = None,
            cloudtrail: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsCloudtrailArgs', 'AwsEuSovereignIntegrationsCloudtrailArgsDict']]] = None,
            linked_account_id: Optional[pulumi.Input[_builtins.str]] = None,
            x_ray: Optional[pulumi.Input[Union['AwsEuSovereignIntegrationsXRayArgs', 'AwsEuSovereignIntegrationsXRayArgsDict']]] = None) -> 'AwsEuSovereignIntegrations':
        """
        Get an existing AwsEuSovereignIntegrations 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[_builtins.str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
        :param pulumi.Input[Union['AwsEuSovereignIntegrationsBillingArgs', 'AwsEuSovereignIntegrationsBillingArgsDict']] billing: Billing integration
        :param pulumi.Input[Union['AwsEuSovereignIntegrationsCloudtrailArgs', 'AwsEuSovereignIntegrationsCloudtrailArgsDict']] cloudtrail: CloudTrail integration
        :param pulumi.Input[_builtins.str] linked_account_id: The ID of the linked AWS EU Sovereign account in New Relic.
        :param pulumi.Input[Union['AwsEuSovereignIntegrationsXRayArgs', 'AwsEuSovereignIntegrationsXRayArgsDict']] x_ray: X-Ray integration
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _AwsEuSovereignIntegrationsState.__new__(_AwsEuSovereignIntegrationsState)

        __props__.__dict__["account_id"] = account_id
        __props__.__dict__["billing"] = billing
        __props__.__dict__["cloudtrail"] = cloudtrail
        __props__.__dict__["linked_account_id"] = linked_account_id
        __props__.__dict__["x_ray"] = x_ray
        return AwsEuSovereignIntegrations(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> pulumi.Output[_builtins.str]:
        """
        The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
        """
        return pulumi.get(self, "account_id")

    @_builtins.property
    @pulumi.getter
    def billing(self) -> pulumi.Output[Optional['outputs.AwsEuSovereignIntegrationsBilling']]:
        """
        Billing integration
        """
        return pulumi.get(self, "billing")

    @_builtins.property
    @pulumi.getter
    def cloudtrail(self) -> pulumi.Output[Optional['outputs.AwsEuSovereignIntegrationsCloudtrail']]:
        """
        CloudTrail integration
        """
        return pulumi.get(self, "cloudtrail")

    @_builtins.property
    @pulumi.getter(name="linkedAccountId")
    def linked_account_id(self) -> pulumi.Output[_builtins.str]:
        """
        The ID of the linked AWS EU Sovereign account in New Relic.
        """
        return pulumi.get(self, "linked_account_id")

    @_builtins.property
    @pulumi.getter(name="xRay")
    def x_ray(self) -> pulumi.Output[Optional['outputs.AwsEuSovereignIntegrationsXRay']]:
        """
        X-Ray integration
        """
        return pulumi.get(self, "x_ray")

