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"],
    },
});
import pulumi
import pulumi_outscale as outscale
image01 = outscale.ImageLaunchPermission("image01",
    image_id="ami-12345678",
    permission_additions={
        "account_ids": ["012345678910"],
    })
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
	})
}
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",
            },
        },
    });
});
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());
    }
}
resources:
  image01:
    type: outscale:ImageLaunchPermission
    properties:
      imageId: ami-12345678
      permissionAdditions:
        accountIds:
          - '012345678910'
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"],
    },
});
import pulumi
import pulumi_outscale as outscale
image02 = outscale.ImageLaunchPermission("image02",
    image_id="ami-12345678",
    permission_removals={
        "account_ids": ["012345678910"],
    })
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
	})
}
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",
            },
        },
    });
});
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());
    }
}
resources:
  image02:
    type: outscale:ImageLaunchPermission
    properties:
      imageId: ami-12345678
      permissionRemovals:
        accountIds:
          - '012345678910'
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 string
- The unique name of the resource.
- args ImageLaunchPermissionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ImageLaunchPermissionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ImageLaunchPermissionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
    },
});
example, err := outscale.NewImageLaunchPermission(ctx, "imageLaunchPermissionResource", &outscale.ImageLaunchPermissionArgs{
ImageId: pulumi.String("string"),
ImageLaunchPermissionId: pulumi.String("string"),
PermissionAdditions: &.ImageLaunchPermissionPermissionAdditionsArgs{
AccountIds: pulumi.StringArray{
pulumi.String("string"),
},
GlobalPermission: pulumi.String("string"),
},
PermissionRemovals: &.ImageLaunchPermissionPermissionRemovalsArgs{
AccountIds: pulumi.StringArray{
pulumi.String("string"),
},
GlobalPermission: pulumi.String("string"),
},
})
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());
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",
    })
const imageLaunchPermissionResource = new outscale.ImageLaunchPermission("imageLaunchPermissionResource", {
    imageId: "string",
    imageLaunchPermissionId: "string",
    permissionAdditions: {
        accountIds: ["string"],
        globalPermission: "string",
    },
    permissionRemovals: {
        accountIds: ["string"],
        globalPermission: "string",
    },
});
type: outscale:ImageLaunchPermission
properties:
    imageId: string
    imageLaunchPermissionId: string
    permissionAdditions:
        accountIds:
            - string
        globalPermission: string
    permissionRemovals:
        accountIds:
            - string
        globalPermission: string
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 string
- The ID of the OMI you want to modify.
- ImageLaunch stringPermission Id 
- PermissionAdditions ImageLaunch Permission Permission Additions 
- Information about the users to whom you want to give permissions for the resource.
- PermissionRemovals ImageLaunch Permission Permission Removals 
- Information about the users from whom you want to remove permissions for the resource.
- ImageId string
- The ID of the OMI you want to modify.
- ImageLaunch stringPermission Id 
- PermissionAdditions ImageLaunch Permission Permission Additions Args 
- Information about the users to whom you want to give permissions for the resource.
- PermissionRemovals ImageLaunch Permission Permission Removals Args 
- Information about the users from whom you want to remove permissions for the resource.
- imageId String
- The ID of the OMI you want to modify.
- imageLaunch StringPermission Id 
- permissionAdditions ImageLaunch Permission Permission Additions 
- Information about the users to whom you want to give permissions for the resource.
- permissionRemovals ImageLaunch Permission Permission Removals 
- Information about the users from whom you want to remove permissions for the resource.
- imageId string
- The ID of the OMI you want to modify.
- imageLaunch stringPermission Id 
- permissionAdditions ImageLaunch Permission Permission Additions 
- Information about the users to whom you want to give permissions for the resource.
- permissionRemovals ImageLaunch Permission Permission Removals 
- Information about the users from whom you want to remove permissions for the resource.
- image_id str
- The ID of the OMI you want to modify.
- image_launch_ strpermission_ id 
- permission_additions ImageLaunch Permission Permission Additions Args 
- Information about the users to whom you want to give permissions for the resource.
- permission_removals ImageLaunch Permission Permission Removals Args 
- Information about the users from whom you want to remove permissions for the resource.
- imageId String
- The ID of the OMI you want to modify.
- imageLaunch StringPermission Id 
- 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.
- PermissionsTo List<ImageLaunches Launch Permission Permissions To Launch> 
- Permissions for the resource.
- RequestId string
- Description string
- The description of the OMI.
- Id string
- The provider-assigned unique ID for this managed resource.
- PermissionsTo []ImageLaunches Launch Permission Permissions To Launch 
- Permissions for the resource.
- RequestId string
- description String
- The description of the OMI.
- id String
- The provider-assigned unique ID for this managed resource.
- permissionsTo List<ImageLaunches Launch Permission Permissions To Launch> 
- Permissions for the resource.
- requestId String
- description string
- The description of the OMI.
- id string
- The provider-assigned unique ID for this managed resource.
- permissionsTo ImageLaunches Launch Permission Permissions To Launch[] 
- 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_ Sequence[Imagelaunches Launch Permission Permissions To Launch] 
- 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.
- permissionsTo List<Property Map>Launches 
- 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) -> ImageLaunchPermissionfunc 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Description string
- The description of the OMI.
- ImageId string
- The ID of the OMI you want to modify.
- ImageLaunch stringPermission Id 
- PermissionAdditions ImageLaunch Permission Permission Additions 
- Information about the users to whom you want to give permissions for the resource.
- PermissionRemovals ImageLaunch Permission Permission Removals 
- Information about the users from whom you want to remove permissions for the resource.
- PermissionsTo List<ImageLaunches Launch Permission Permissions To Launch> 
- Permissions for the resource.
- RequestId string
- Description string
- The description of the OMI.
- ImageId string
- The ID of the OMI you want to modify.
- ImageLaunch stringPermission Id 
- PermissionAdditions ImageLaunch Permission Permission Additions Args 
- Information about the users to whom you want to give permissions for the resource.
- PermissionRemovals ImageLaunch Permission Permission Removals Args 
- Information about the users from whom you want to remove permissions for the resource.
- PermissionsTo []ImageLaunches Launch Permission Permissions To Launch Args 
- Permissions for the resource.
- RequestId string
- description String
- The description of the OMI.
- imageId String
- The ID of the OMI you want to modify.
- imageLaunch StringPermission Id 
- permissionAdditions ImageLaunch Permission Permission Additions 
- Information about the users to whom you want to give permissions for the resource.
- permissionRemovals ImageLaunch Permission Permission Removals 
- Information about the users from whom you want to remove permissions for the resource.
- permissionsTo List<ImageLaunches Launch Permission Permissions To Launch> 
- Permissions for the resource.
- requestId String
- description string
- The description of the OMI.
- imageId string
- The ID of the OMI you want to modify.
- imageLaunch stringPermission Id 
- permissionAdditions ImageLaunch Permission Permission Additions 
- Information about the users to whom you want to give permissions for the resource.
- permissionRemovals ImageLaunch Permission Permission Removals 
- Information about the users from whom you want to remove permissions for the resource.
- permissionsTo ImageLaunches Launch Permission Permissions To Launch[] 
- 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_ strpermission_ id 
- permission_additions ImageLaunch Permission Permission Additions Args 
- Information about the users to whom you want to give permissions for the resource.
- permission_removals ImageLaunch Permission Permission Removals Args 
- Information about the users from whom you want to remove permissions for the resource.
- permissions_to_ Sequence[Imagelaunches Launch Permission Permissions To Launch Args] 
- 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.
- imageLaunch StringPermission Id 
- 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.
- permissionsTo List<Property Map>Launches 
- 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 List<string>
- One or more account IDs that the permission is associated with.
- GlobalPermission 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 isremovals). (Response) If true, the resource is public. If false, the resource is private.
- AccountIds []string
- One or more account IDs that the permission is associated with.
- GlobalPermission 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 isremovals). (Response) If true, the resource is public. If false, the resource is private.
- accountIds List<String>
- One or more account IDs that the permission is associated with.
- globalPermission 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 isremovals). (Response) If true, the resource is public. If false, the resource is private.
- accountIds string[]
- One or more account IDs that the permission is associated with.
- globalPermission 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 isremovals). (Response) If true, the resource is public. If false, the resource is private.
- account_ids Sequence[str]
- One or more account IDs that the permission is associated with.
- global_permission 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 isremovals). (Response) If true, the resource is public. If false, the resource is private.
- accountIds List<String>
- One or more account IDs that the permission is associated with.
- globalPermission 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 isremovals). (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 outscaleTerraform Provider.