<reponame>JakeGinnivan/pulumi-aws
# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetSelectionResult:
    """
    A collection of values returned by getSelection.
    """
    def __init__(__self__, iam_role_arn=None, id=None, name=None, plan_id=None, resources=None, selection_id=None):
        if iam_role_arn and not isinstance(iam_role_arn, str):
            raise TypeError("Expected argument 'iam_role_arn' to be a str")
        __self__.iam_role_arn = iam_role_arn
        """
        The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the [AWS Backup Developer Guide](https://docs.aws.amazon.com/aws-backup/latest/devguide/access-control.html#managed-policies) for additional information about using AWS managed policies or creating custom policies attached to the IAM role.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        """
        The display name of a resource selection document.
        """
        if plan_id and not isinstance(plan_id, str):
            raise TypeError("Expected argument 'plan_id' to be a str")
        __self__.plan_id = plan_id
        if resources and not isinstance(resources, list):
            raise TypeError("Expected argument 'resources' to be a list")
        __self__.resources = resources
        """
        An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan..
        """
        if selection_id and not isinstance(selection_id, str):
            raise TypeError("Expected argument 'selection_id' to be a str")
        __self__.selection_id = selection_id
class AwaitableGetSelectionResult(GetSelectionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSelectionResult(
            iam_role_arn=self.iam_role_arn,
            id=self.id,
            name=self.name,
            plan_id=self.plan_id,
            resources=self.resources,
            selection_id=self.selection_id)

def get_selection(plan_id=None,selection_id=None,opts=None):
    """
    Use this data source to get information on an existing backup selection.

    ## Example Usage



    ```python
    import pulumi
    import pulumi_aws as aws

    example = aws.backup.get_selection(plan_id=data["aws_backup_plan"]["example"]["id"],
        selection_id="selection-id-example")
    ```


    :param str plan_id: The backup plan ID associated with the selection of resources.
    :param str selection_id: The backup selection ID.
    """
    __args__ = dict()


    __args__['planId'] = plan_id
    __args__['selectionId'] = selection_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:backup/getSelection:getSelection', __args__, opts=opts).value

    return AwaitableGetSelectionResult(
        iam_role_arn=__ret__.get('iamRoleArn'),
        id=__ret__.get('id'),
        name=__ret__.get('name'),
        plan_id=__ret__.get('planId'),
        resources=__ret__.get('resources'),
        selection_id=__ret__.get('selectionId'))

# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class GetSelectionResult:
    """
    A collection of values returned by getSelection.
    """
    def __init__(__self__, iam_role_arn=None, id=None, name=None, plan_id=None, resources=None, selection_id=None):
        if iam_role_arn and not isinstance(iam_role_arn, str):
            raise TypeError("Expected argument 'iam_role_arn' to be a str")
        __self__.iam_role_arn = iam_role_arn
        """
        The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the [AWS Backup Developer Guide](https://docs.aws.amazon.com/aws-backup/latest/devguide/access-control.html#managed-policies) for additional information about using AWS managed policies or creating custom policies attached to the IAM role.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        """
        The display name of a resource selection document.
        """
        if plan_id and not isinstance(plan_id, str):
            raise TypeError("Expected argument 'plan_id' to be a str")
        __self__.plan_id = plan_id
        if resources and not isinstance(resources, list):
            raise TypeError("Expected argument 'resources' to be a list")
        __self__.resources = resources
        """
        An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan..
        """
        if selection_id and not isinstance(selection_id, str):
            raise TypeError("Expected argument 'selection_id' to be a str")
        __self__.selection_id = selection_id
class AwaitableGetSelectionResult(GetSelectionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSelectionResult(
            iam_role_arn=self.iam_role_arn,
            id=self.id,
            name=self.name,
            plan_id=self.plan_id,
            resources=self.resources,
            selection_id=self.selection_id)

def get_selection(plan_id=None,selection_id=None,opts=None):
    """
    Use this data source to get information on an existing backup selection.

    ## Example Usage



    ```python
    import pulumi
    import pulumi_aws as aws

    example = aws.backup.get_selection(plan_id=data["aws_backup_plan"]["example"]["id"],
        selection_id="selection-id-example")
    ```


    :param str plan_id: The backup plan ID associated with the selection of resources.
    :param str selection_id: The backup selection ID.
    """
    __args__ = dict()


    __args__['planId'] = plan_id
    __args__['selectionId'] = selection_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:backup/getSelection:getSelection', __args__, opts=opts).value

    return AwaitableGetSelectionResult(
        iam_role_arn=__ret__.get('iamRoleArn'),
        id=__ret__.get('id'),
        name=__ret__.get('name'),
        plan_id=__ret__.get('planId'),
        resources=__ret__.get('resources'),
        selection_id=__ret__.get('selectionId'))
# 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! *** A collection of values returned by getSelection. The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the [AWS Backup Developer Guide](https://docs.aws.amazon.com/aws-backup/latest/devguide/access-control.html#managed-policies) for additional information about using AWS managed policies or creating custom policies attached to the IAM role. The provider-assigned unique ID for this managed resource. The display name of a resource selection document. An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.. # pylint: disable=using-constant-test Use this data source to get information on an existing backup selection.      ## Example Usage        ```python     import pulumi     import pulumi_aws as aws      example = aws.backup.get_selection(plan_id=data["aws_backup_plan"]["example"]["id"],         selection_id="selection-id-example")     ```       :param str plan_id: The backup plan ID associated with the selection of resources.     :param str selection_id: The backup selection ID.