1. Packages
  2. Outscale Provider
  3. API Docs
  4. ImageLaunchPermission
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.ImageLaunchPermission

Explore with Pulumi AI

Manages an image launch permission.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

Add permissions

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const image01 = new outscale.ImageLaunchPermission("image01", {
    imageId: "ami-12345678",
    permissionAdditions: {
        accountIds: ["012345678910"],
    },
});
Copy
import pulumi
import pulumi_outscale as outscale

image01 = outscale.ImageLaunchPermission("image01",
    image_id="ami-12345678",
    permission_additions={
        "account_ids": ["012345678910"],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewImageLaunchPermission(ctx, "image01", &outscale.ImageLaunchPermissionArgs{
			ImageId: pulumi.String("ami-12345678"),
			PermissionAdditions: &outscale.ImageLaunchPermissionPermissionAdditionsArgs{
				AccountIds: pulumi.StringArray{
					pulumi.String("012345678910"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var image01 = new Outscale.ImageLaunchPermission("image01", new()
    {
        ImageId = "ami-12345678",
        PermissionAdditions = new Outscale.Inputs.ImageLaunchPermissionPermissionAdditionsArgs
        {
            AccountIds = new[]
            {
                "012345678910",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.ImageLaunchPermission;
import com.pulumi.outscale.ImageLaunchPermissionArgs;
import com.pulumi.outscale.inputs.ImageLaunchPermissionPermissionAdditionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var image01 = new ImageLaunchPermission("image01", ImageLaunchPermissionArgs.builder()
            .imageId("ami-12345678")
            .permissionAdditions(ImageLaunchPermissionPermissionAdditionsArgs.builder()
                .accountIds("012345678910")
                .build())
            .build());

    }
}
Copy
resources:
  image01:
    type: outscale:ImageLaunchPermission
    properties:
      imageId: ami-12345678
      permissionAdditions:
        accountIds:
          - '012345678910'
Copy

Remove permissions

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const image02 = new outscale.ImageLaunchPermission("image02", {
    imageId: "ami-12345678",
    permissionRemovals: {
        accountIds: ["012345678910"],
    },
});
Copy
import pulumi
import pulumi_outscale as outscale

image02 = outscale.ImageLaunchPermission("image02",
    image_id="ami-12345678",
    permission_removals={
        "account_ids": ["012345678910"],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewImageLaunchPermission(ctx, "image02", &outscale.ImageLaunchPermissionArgs{
			ImageId: pulumi.String("ami-12345678"),
			PermissionRemovals: &outscale.ImageLaunchPermissionPermissionRemovalsArgs{
				AccountIds: pulumi.StringArray{
					pulumi.String("012345678910"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var image02 = new Outscale.ImageLaunchPermission("image02", new()
    {
        ImageId = "ami-12345678",
        PermissionRemovals = new Outscale.Inputs.ImageLaunchPermissionPermissionRemovalsArgs
        {
            AccountIds = new[]
            {
                "012345678910",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.ImageLaunchPermission;
import com.pulumi.outscale.ImageLaunchPermissionArgs;
import com.pulumi.outscale.inputs.ImageLaunchPermissionPermissionRemovalsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var image02 = new ImageLaunchPermission("image02", ImageLaunchPermissionArgs.builder()
            .imageId("ami-12345678")
            .permissionRemovals(ImageLaunchPermissionPermissionRemovalsArgs.builder()
                .accountIds("012345678910")
                .build())
            .build());

    }
}
Copy
resources:
  image02:
    type: outscale:ImageLaunchPermission
    properties:
      imageId: ami-12345678
      permissionRemovals:
        accountIds:
          - '012345678910'
Copy

Create ImageLaunchPermission Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ImageLaunchPermission(name: string, args: ImageLaunchPermissionArgs, opts?: CustomResourceOptions);
@overload
def ImageLaunchPermission(resource_name: str,
                          args: ImageLaunchPermissionArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def ImageLaunchPermission(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          image_id: Optional[str] = None,
                          image_launch_permission_id: Optional[str] = None,
                          permission_additions: Optional[ImageLaunchPermissionPermissionAdditionsArgs] = None,
                          permission_removals: Optional[ImageLaunchPermissionPermissionRemovalsArgs] = None)
func NewImageLaunchPermission(ctx *Context, name string, args ImageLaunchPermissionArgs, opts ...ResourceOption) (*ImageLaunchPermission, error)
public ImageLaunchPermission(string name, ImageLaunchPermissionArgs args, CustomResourceOptions? opts = null)
public ImageLaunchPermission(String name, ImageLaunchPermissionArgs args)
public ImageLaunchPermission(String name, ImageLaunchPermissionArgs args, CustomResourceOptions options)
type: outscale:ImageLaunchPermission
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ImageLaunchPermissionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ImageLaunchPermissionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ImageLaunchPermissionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ImageLaunchPermissionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ImageLaunchPermissionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var imageLaunchPermissionResource = new Outscale.ImageLaunchPermission("imageLaunchPermissionResource", new()
{
    ImageId = "string",
    ImageLaunchPermissionId = "string",
    PermissionAdditions = new Outscale.Inputs.ImageLaunchPermissionPermissionAdditionsArgs
    {
        AccountIds = new[]
        {
            "string",
        },
        GlobalPermission = "string",
    },
    PermissionRemovals = new Outscale.Inputs.ImageLaunchPermissionPermissionRemovalsArgs
    {
        AccountIds = new[]
        {
            "string",
        },
        GlobalPermission = "string",
    },
});
Copy
example, err := outscale.NewImageLaunchPermission(ctx, "imageLaunchPermissionResource", &outscale.ImageLaunchPermissionArgs{
	ImageId:                 pulumi.String("string"),
	ImageLaunchPermissionId: pulumi.String("string"),
	PermissionAdditions: &outscale.ImageLaunchPermissionPermissionAdditionsArgs{
		AccountIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		GlobalPermission: pulumi.String("string"),
	},
	PermissionRemovals: &outscale.ImageLaunchPermissionPermissionRemovalsArgs{
		AccountIds: pulumi.StringArray{
			pulumi.String("string"),
		},
		GlobalPermission: pulumi.String("string"),
	},
})
Copy
var imageLaunchPermissionResource = new ImageLaunchPermission("imageLaunchPermissionResource", ImageLaunchPermissionArgs.builder()
    .imageId("string")
    .imageLaunchPermissionId("string")
    .permissionAdditions(ImageLaunchPermissionPermissionAdditionsArgs.builder()
        .accountIds("string")
        .globalPermission("string")
        .build())
    .permissionRemovals(ImageLaunchPermissionPermissionRemovalsArgs.builder()
        .accountIds("string")
        .globalPermission("string")
        .build())
    .build());
Copy
image_launch_permission_resource = outscale.ImageLaunchPermission("imageLaunchPermissionResource",
    image_id="string",
    image_launch_permission_id="string",
    permission_additions={
        "account_ids": ["string"],
        "global_permission": "string",
    },
    permission_removals={
        "account_ids": ["string"],
        "global_permission": "string",
    })
Copy
const imageLaunchPermissionResource = new outscale.ImageLaunchPermission("imageLaunchPermissionResource", {
    imageId: "string",
    imageLaunchPermissionId: "string",
    permissionAdditions: {
        accountIds: ["string"],
        globalPermission: "string",
    },
    permissionRemovals: {
        accountIds: ["string"],
        globalPermission: "string",
    },
});
Copy
type: outscale:ImageLaunchPermission
properties:
    imageId: string
    imageLaunchPermissionId: string
    permissionAdditions:
        accountIds:
            - string
        globalPermission: string
    permissionRemovals:
        accountIds:
            - string
        globalPermission: string
Copy

ImageLaunchPermission Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ImageLaunchPermission resource accepts the following input properties:

ImageId This property is required. string
The ID of the OMI you want to modify.
ImageLaunchPermissionId string
PermissionAdditions ImageLaunchPermissionPermissionAdditions
Information about the users to whom you want to give permissions for the resource.
PermissionRemovals ImageLaunchPermissionPermissionRemovals
Information about the users from whom you want to remove permissions for the resource.
ImageId This property is required. string
The ID of the OMI you want to modify.
ImageLaunchPermissionId string
PermissionAdditions ImageLaunchPermissionPermissionAdditionsArgs
Information about the users to whom you want to give permissions for the resource.
PermissionRemovals ImageLaunchPermissionPermissionRemovalsArgs
Information about the users from whom you want to remove permissions for the resource.
imageId This property is required. String
The ID of the OMI you want to modify.
imageLaunchPermissionId String
permissionAdditions ImageLaunchPermissionPermissionAdditions
Information about the users to whom you want to give permissions for the resource.
permissionRemovals ImageLaunchPermissionPermissionRemovals
Information about the users from whom you want to remove permissions for the resource.
imageId This property is required. string
The ID of the OMI you want to modify.
imageLaunchPermissionId string
permissionAdditions ImageLaunchPermissionPermissionAdditions
Information about the users to whom you want to give permissions for the resource.
permissionRemovals ImageLaunchPermissionPermissionRemovals
Information about the users from whom you want to remove permissions for the resource.
image_id This property is required. str
The ID of the OMI you want to modify.
image_launch_permission_id str
permission_additions ImageLaunchPermissionPermissionAdditionsArgs
Information about the users to whom you want to give permissions for the resource.
permission_removals ImageLaunchPermissionPermissionRemovalsArgs
Information about the users from whom you want to remove permissions for the resource.
imageId This property is required. String
The ID of the OMI you want to modify.
imageLaunchPermissionId String
permissionAdditions Property Map
Information about the users to whom you want to give permissions for the resource.
permissionRemovals Property Map
Information about the users from whom you want to remove permissions for the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the ImageLaunchPermission resource produces the following output properties:

Description string
The description of the OMI.
Id string
The provider-assigned unique ID for this managed resource.
PermissionsToLaunches List<ImageLaunchPermissionPermissionsToLaunch>
Permissions for the resource.
RequestId string
Description string
The description of the OMI.
Id string
The provider-assigned unique ID for this managed resource.
PermissionsToLaunches []ImageLaunchPermissionPermissionsToLaunch
Permissions for the resource.
RequestId string
description String
The description of the OMI.
id String
The provider-assigned unique ID for this managed resource.
permissionsToLaunches List<ImageLaunchPermissionPermissionsToLaunch>
Permissions for the resource.
requestId String
description string
The description of the OMI.
id string
The provider-assigned unique ID for this managed resource.
permissionsToLaunches ImageLaunchPermissionPermissionsToLaunch[]
Permissions for the resource.
requestId string
description str
The description of the OMI.
id str
The provider-assigned unique ID for this managed resource.
permissions_to_launches Sequence[ImageLaunchPermissionPermissionsToLaunch]
Permissions for the resource.
request_id str
description String
The description of the OMI.
id String
The provider-assigned unique ID for this managed resource.
permissionsToLaunches List<Property Map>
Permissions for the resource.
requestId String

Look up Existing ImageLaunchPermission Resource

Get an existing ImageLaunchPermission resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ImageLaunchPermissionState, opts?: CustomResourceOptions): ImageLaunchPermission
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        image_id: Optional[str] = None,
        image_launch_permission_id: Optional[str] = None,
        permission_additions: Optional[ImageLaunchPermissionPermissionAdditionsArgs] = None,
        permission_removals: Optional[ImageLaunchPermissionPermissionRemovalsArgs] = None,
        permissions_to_launches: Optional[Sequence[ImageLaunchPermissionPermissionsToLaunchArgs]] = None,
        request_id: Optional[str] = None) -> ImageLaunchPermission
func GetImageLaunchPermission(ctx *Context, name string, id IDInput, state *ImageLaunchPermissionState, opts ...ResourceOption) (*ImageLaunchPermission, error)
public static ImageLaunchPermission Get(string name, Input<string> id, ImageLaunchPermissionState? state, CustomResourceOptions? opts = null)
public static ImageLaunchPermission get(String name, Output<String> id, ImageLaunchPermissionState state, CustomResourceOptions options)
resources:  _:    type: outscale:ImageLaunchPermission    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
The description of the OMI.
ImageId string
The ID of the OMI you want to modify.
ImageLaunchPermissionId string
PermissionAdditions ImageLaunchPermissionPermissionAdditions
Information about the users to whom you want to give permissions for the resource.
PermissionRemovals ImageLaunchPermissionPermissionRemovals
Information about the users from whom you want to remove permissions for the resource.
PermissionsToLaunches List<ImageLaunchPermissionPermissionsToLaunch>
Permissions for the resource.
RequestId string
Description string
The description of the OMI.
ImageId string
The ID of the OMI you want to modify.
ImageLaunchPermissionId string
PermissionAdditions ImageLaunchPermissionPermissionAdditionsArgs
Information about the users to whom you want to give permissions for the resource.
PermissionRemovals ImageLaunchPermissionPermissionRemovalsArgs
Information about the users from whom you want to remove permissions for the resource.
PermissionsToLaunches []ImageLaunchPermissionPermissionsToLaunchArgs
Permissions for the resource.
RequestId string
description String
The description of the OMI.
imageId String
The ID of the OMI you want to modify.
imageLaunchPermissionId String
permissionAdditions ImageLaunchPermissionPermissionAdditions
Information about the users to whom you want to give permissions for the resource.
permissionRemovals ImageLaunchPermissionPermissionRemovals
Information about the users from whom you want to remove permissions for the resource.
permissionsToLaunches List<ImageLaunchPermissionPermissionsToLaunch>
Permissions for the resource.
requestId String
description string
The description of the OMI.
imageId string
The ID of the OMI you want to modify.
imageLaunchPermissionId string
permissionAdditions ImageLaunchPermissionPermissionAdditions
Information about the users to whom you want to give permissions for the resource.
permissionRemovals ImageLaunchPermissionPermissionRemovals
Information about the users from whom you want to remove permissions for the resource.
permissionsToLaunches ImageLaunchPermissionPermissionsToLaunch[]
Permissions for the resource.
requestId string
description str
The description of the OMI.
image_id str
The ID of the OMI you want to modify.
image_launch_permission_id str
permission_additions ImageLaunchPermissionPermissionAdditionsArgs
Information about the users to whom you want to give permissions for the resource.
permission_removals ImageLaunchPermissionPermissionRemovalsArgs
Information about the users from whom you want to remove permissions for the resource.
permissions_to_launches Sequence[ImageLaunchPermissionPermissionsToLaunchArgs]
Permissions for the resource.
request_id str
description String
The description of the OMI.
imageId String
The ID of the OMI you want to modify.
imageLaunchPermissionId String
permissionAdditions Property Map
Information about the users to whom you want to give permissions for the resource.
permissionRemovals Property Map
Information about the users from whom you want to remove permissions for the resource.
permissionsToLaunches List<Property Map>
Permissions for the resource.
requestId String

Supporting Types

ImageLaunchPermissionPermissionAdditions
, ImageLaunchPermissionPermissionAdditionsArgs

AccountIds List<string>
The account ID of one or more users to whom you want to give permissions.
GlobalPermission string
If true, the resource is public. If false, the resource is private.
AccountIds []string
The account ID of one or more users to whom you want to give permissions.
GlobalPermission string
If true, the resource is public. If false, the resource is private.
accountIds List<String>
The account ID of one or more users to whom you want to give permissions.
globalPermission String
If true, the resource is public. If false, the resource is private.
accountIds string[]
The account ID of one or more users to whom you want to give permissions.
globalPermission string
If true, the resource is public. If false, the resource is private.
account_ids Sequence[str]
The account ID of one or more users to whom you want to give permissions.
global_permission str
If true, the resource is public. If false, the resource is private.
accountIds List<String>
The account ID of one or more users to whom you want to give permissions.
globalPermission String
If true, the resource is public. If false, the resource is private.

ImageLaunchPermissionPermissionRemovals
, ImageLaunchPermissionPermissionRemovalsArgs

AccountIds List<string>
The account ID of one or more users from whom you want to remove permissions.
GlobalPermission string
If true, the resource is public. If false, the resource is private.
AccountIds []string
The account ID of one or more users from whom you want to remove permissions.
GlobalPermission string
If true, the resource is public. If false, the resource is private.
accountIds List<String>
The account ID of one or more users from whom you want to remove permissions.
globalPermission String
If true, the resource is public. If false, the resource is private.
accountIds string[]
The account ID of one or more users from whom you want to remove permissions.
globalPermission string
If true, the resource is public. If false, the resource is private.
account_ids Sequence[str]
The account ID of one or more users from whom you want to remove permissions.
global_permission str
If true, the resource is public. If false, the resource is private.
accountIds List<String>
The account ID of one or more users from whom you want to remove permissions.
globalPermission String
If true, the resource is public. If false, the resource is private.

ImageLaunchPermissionPermissionsToLaunch
, ImageLaunchPermissionPermissionsToLaunchArgs

AccountIds This property is required. List<string>
One or more account IDs that the permission is associated with.
GlobalPermission This property is required. string
A global permission for all accounts. (Request) Set this parameter to true to make the resource public (if the parent parameter is additions) or to make the resource private (if the parent parameter is removals). (Response) If true, the resource is public. If false, the resource is private.
AccountIds This property is required. []string
One or more account IDs that the permission is associated with.
GlobalPermission This property is required. string
A global permission for all accounts. (Request) Set this parameter to true to make the resource public (if the parent parameter is additions) or to make the resource private (if the parent parameter is removals). (Response) If true, the resource is public. If false, the resource is private.
accountIds This property is required. List<String>
One or more account IDs that the permission is associated with.
globalPermission This property is required. String
A global permission for all accounts. (Request) Set this parameter to true to make the resource public (if the parent parameter is additions) or to make the resource private (if the parent parameter is removals). (Response) If true, the resource is public. If false, the resource is private.
accountIds This property is required. string[]
One or more account IDs that the permission is associated with.
globalPermission This property is required. string
A global permission for all accounts. (Request) Set this parameter to true to make the resource public (if the parent parameter is additions) or to make the resource private (if the parent parameter is removals). (Response) If true, the resource is public. If false, the resource is private.
account_ids This property is required. Sequence[str]
One or more account IDs that the permission is associated with.
global_permission This property is required. str
A global permission for all accounts. (Request) Set this parameter to true to make the resource public (if the parent parameter is additions) or to make the resource private (if the parent parameter is removals). (Response) If true, the resource is public. If false, the resource is private.
accountIds This property is required. List<String>
One or more account IDs that the permission is associated with.
globalPermission This property is required. String
A global permission for all accounts. (Request) Set this parameter to true to make the resource public (if the parent parameter is additions) or to make the resource private (if the parent parameter is removals). (Response) If true, the resource is public. If false, the resource is private.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.