# 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 pulumi
import pulumi.runtime

class AmiLaunchPermission(pulumi.CustomResource):
    """
    Adds launch permission to Amazon Machine Image (AMI) from another AWS account.
    """
    def __init__(__self__, __name__, __opts__=None, account_id=None, image_id=None):
        """Create a AmiLaunchPermission resource with the given unique name, props, and options."""
        if not __name__:
            raise TypeError('Missing resource name argument (for URN creation)')
        if not isinstance(__name__, basestring):
            raise TypeError('Expected resource name to be a string')
        if __opts__ and not isinstance(__opts__, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        if not account_id:
            raise TypeError('Missing required property account_id')
        elif not isinstance(account_id, basestring):
            raise TypeError('Expected property account_id to be a basestring')
        __self__.account_id = account_id
        """
        An AWS Account ID to add launch permissions.
        """
        __props__['accountId'] = account_id

        if not image_id:
            raise TypeError('Missing required property image_id')
        elif not isinstance(image_id, basestring):
            raise TypeError('Expected property image_id to be a basestring')
        __self__.image_id = image_id
        """
        A region-unique name for the AMI.
        """
        __props__['imageId'] = image_id

        super(AmiLaunchPermission, __self__).__init__(
            'aws:ec2/amiLaunchPermission:AmiLaunchPermission',
            __name__,
            __props__,
            __opts__)

    def set_outputs(self, outs):
        if 'accountId' in outs:
            self.account_id = outs['accountId']
        if 'imageId' in outs:
            self.image_id = outs['imageId']

# 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 pulumi
import pulumi.runtime

class AmiLaunchPermission(pulumi.CustomResource):
    """
    Adds launch permission to Amazon Machine Image (AMI) from another AWS account.
    """
    def __init__(__self__, __name__, __opts__=None, account_id=None, image_id=None):
        """Create a AmiLaunchPermission resource with the given unique name, props, and options."""
        if not __name__:
            raise TypeError('Missing resource name argument (for URN creation)')
        if not isinstance(__name__, basestring):
            raise TypeError('Expected resource name to be a string')
        if __opts__ and not isinstance(__opts__, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        if not account_id:
            raise TypeError('Missing required property account_id')
        elif not isinstance(account_id, basestring):
            raise TypeError('Expected property account_id to be a basestring')
        __self__.account_id = account_id
        """
        An AWS Account ID to add launch permissions.
        """
        __props__['accountId'] = account_id

        if not image_id:
            raise TypeError('Missing required property image_id')
        elif not isinstance(image_id, basestring):
            raise TypeError('Expected property image_id to be a basestring')
        __self__.image_id = image_id
        """
        A region-unique name for the AMI.
        """
        __props__['imageId'] = image_id

        super(AmiLaunchPermission, __self__).__init__(
            'aws:ec2/amiLaunchPermission:AmiLaunchPermission',
            __name__,
            __props__,
            __opts__)

    def set_outputs(self, outs):
        if 'accountId' in outs:
            self.account_id = outs['accountId']
        if 'imageId' in outs:
            self.image_id = outs['imageId']

# 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! *** Adds launch permission to Amazon Machine Image (AMI) from another AWS account. Create a AmiLaunchPermission resource with the given unique name, props, and options. An AWS Account ID to add launch permissions. A region-unique name for the AMI.