@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
159 lines (158 loc) • 5.44 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Adds a launch permission to an Amazon Machine Image (AMI).
*
* ## Example Usage
*
* ### AWS Account ID
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ec2.AmiLaunchPermission("example", {
* imageId: "ami-12345678",
* accountId: "123456789012",
* });
* ```
*
* ### Public Access
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ec2.AmiLaunchPermission("example", {
* imageId: "ami-12345678",
* group: "all",
* });
* ```
*
* ### Organization Access
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.organizations.getOrganization({});
* const example = new aws.ec2.AmiLaunchPermission("example", {
* imageId: "ami-12345678",
* organizationArn: current.then(current => current.arn),
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import AMI Launch Permissions using `[ACCOUNT-ID|GROUP-NAME|ORGANIZATION-ARN|ORGANIZATIONAL-UNIT-ARN]/IMAGE-ID`. For example:
*
* ```sh
* $ pulumi import aws:ec2/amiLaunchPermission:AmiLaunchPermission example 123456789012/ami-12345678
* ```
*/
export declare class AmiLaunchPermission extends pulumi.CustomResource {
/**
* Get an existing AmiLaunchPermission resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AmiLaunchPermissionState, opts?: pulumi.CustomResourceOptions): AmiLaunchPermission;
/**
* Returns true if the given object is an instance of AmiLaunchPermission. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is AmiLaunchPermission;
/**
* AWS account ID for the launch permission.
*/
readonly accountId: pulumi.Output<string | undefined>;
/**
* Name of the group for the launch permission. Valid values: `"all"`.
*/
readonly group: pulumi.Output<string | undefined>;
/**
* ID of the AMI.
*/
readonly imageId: pulumi.Output<string>;
/**
* ARN of an organization for the launch permission.
*/
readonly organizationArn: pulumi.Output<string | undefined>;
/**
* ARN of an organizational unit for the launch permission.
*/
readonly organizationalUnitArn: pulumi.Output<string | undefined>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Create a AmiLaunchPermission resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AmiLaunchPermissionArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AmiLaunchPermission resources.
*/
export interface AmiLaunchPermissionState {
/**
* AWS account ID for the launch permission.
*/
accountId?: pulumi.Input<string>;
/**
* Name of the group for the launch permission. Valid values: `"all"`.
*/
group?: pulumi.Input<string>;
/**
* ID of the AMI.
*/
imageId?: pulumi.Input<string>;
/**
* ARN of an organization for the launch permission.
*/
organizationArn?: pulumi.Input<string>;
/**
* ARN of an organizational unit for the launch permission.
*/
organizationalUnitArn?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AmiLaunchPermission resource.
*/
export interface AmiLaunchPermissionArgs {
/**
* AWS account ID for the launch permission.
*/
accountId?: pulumi.Input<string>;
/**
* Name of the group for the launch permission. Valid values: `"all"`.
*/
group?: pulumi.Input<string>;
/**
* ID of the AMI.
*/
imageId: pulumi.Input<string>;
/**
* ARN of an organization for the launch permission.
*/
organizationArn?: pulumi.Input<string>;
/**
* ARN of an organizational unit for the launch permission.
*/
organizationalUnitArn?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}