1. Packages
  2. OpenStack
  3. API Docs
  4. images
  5. ImageAccess
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

openstack.images.ImageAccess

Explore with Pulumi AI

openstack logo
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

    Manages members for the shared OpenStack Glance V2 Image within the source project, which owns the Image.

    Example Usage

    Unprivileged user

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var rancheros = new OpenStack.Images.Image("rancheros", new()
        {
            ImageSourceUrl = "https://releases.rancher.com/os/latest/rancheros-openstack.img",
            ContainerFormat = "bare",
            DiskFormat = "qcow2",
            Visibility = "shared",
            Properties = 
            {
                { "key", "value" },
            },
        });
    
        var rancherosMember = new OpenStack.Images.ImageAccess("rancherosMember", new()
        {
            ImageId = rancheros.Id,
            MemberId = "bed6b6cbb86a4e2d8dc2735c2f1000e4",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/images"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rancheros, err := images.NewImage(ctx, "rancheros", &images.ImageArgs{
    			ImageSourceUrl:  pulumi.String("https://releases.rancher.com/os/latest/rancheros-openstack.img"),
    			ContainerFormat: pulumi.String("bare"),
    			DiskFormat:      pulumi.String("qcow2"),
    			Visibility:      pulumi.String("shared"),
    			Properties: pulumi.Map{
    				"key": pulumi.Any("value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = images.NewImageAccess(ctx, "rancherosMember", &images.ImageAccessArgs{
    			ImageId:  rancheros.ID(),
    			MemberId: pulumi.String("bed6b6cbb86a4e2d8dc2735c2f1000e4"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.images.Image;
    import com.pulumi.openstack.images.ImageArgs;
    import com.pulumi.openstack.images.ImageAccess;
    import com.pulumi.openstack.images.ImageAccessArgs;
    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 rancheros = new Image("rancheros", ImageArgs.builder()        
                .imageSourceUrl("https://releases.rancher.com/os/latest/rancheros-openstack.img")
                .containerFormat("bare")
                .diskFormat("qcow2")
                .visibility("shared")
                .properties(Map.of("key", "value"))
                .build());
    
            var rancherosMember = new ImageAccess("rancherosMember", ImageAccessArgs.builder()        
                .imageId(rancheros.id())
                .memberId("bed6b6cbb86a4e2d8dc2735c2f1000e4")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    rancheros = openstack.images.Image("rancheros",
        image_source_url="https://releases.rancher.com/os/latest/rancheros-openstack.img",
        container_format="bare",
        disk_format="qcow2",
        visibility="shared",
        properties={
            "key": "value",
        })
    rancheros_member = openstack.images.ImageAccess("rancherosMember",
        image_id=rancheros.id,
        member_id="bed6b6cbb86a4e2d8dc2735c2f1000e4")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const rancheros = new openstack.images.Image("rancheros", {
        imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
        containerFormat: "bare",
        diskFormat: "qcow2",
        visibility: "shared",
        properties: {
            key: "value",
        },
    });
    const rancherosMember = new openstack.images.ImageAccess("rancherosMember", {
        imageId: rancheros.id,
        memberId: "bed6b6cbb86a4e2d8dc2735c2f1000e4",
    });
    
    resources:
      rancheros:
        type: openstack:images:Image
        properties:
          imageSourceUrl: https://releases.rancher.com/os/latest/rancheros-openstack.img
          containerFormat: bare
          diskFormat: qcow2
          visibility: shared
          properties:
            key: value
      rancherosMember:
        type: openstack:images:ImageAccess
        properties:
          imageId: ${rancheros.id}
          memberId: bed6b6cbb86a4e2d8dc2735c2f1000e4
    

    Privileged user

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var rancheros = new OpenStack.Images.Image("rancheros", new()
        {
            ImageSourceUrl = "https://releases.rancher.com/os/latest/rancheros-openstack.img",
            ContainerFormat = "bare",
            DiskFormat = "qcow2",
            Visibility = "shared",
            Properties = 
            {
                { "key", "value" },
            },
        });
    
        var rancherosMember = new OpenStack.Images.ImageAccess("rancherosMember", new()
        {
            ImageId = rancheros.Id,
            MemberId = "bed6b6cbb86a4e2d8dc2735c2f1000e4",
            Status = "accepted",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/images"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rancheros, err := images.NewImage(ctx, "rancheros", &images.ImageArgs{
    			ImageSourceUrl:  pulumi.String("https://releases.rancher.com/os/latest/rancheros-openstack.img"),
    			ContainerFormat: pulumi.String("bare"),
    			DiskFormat:      pulumi.String("qcow2"),
    			Visibility:      pulumi.String("shared"),
    			Properties: pulumi.Map{
    				"key": pulumi.Any("value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = images.NewImageAccess(ctx, "rancherosMember", &images.ImageAccessArgs{
    			ImageId:  rancheros.ID(),
    			MemberId: pulumi.String("bed6b6cbb86a4e2d8dc2735c2f1000e4"),
    			Status:   pulumi.String("accepted"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.images.Image;
    import com.pulumi.openstack.images.ImageArgs;
    import com.pulumi.openstack.images.ImageAccess;
    import com.pulumi.openstack.images.ImageAccessArgs;
    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 rancheros = new Image("rancheros", ImageArgs.builder()        
                .imageSourceUrl("https://releases.rancher.com/os/latest/rancheros-openstack.img")
                .containerFormat("bare")
                .diskFormat("qcow2")
                .visibility("shared")
                .properties(Map.of("key", "value"))
                .build());
    
            var rancherosMember = new ImageAccess("rancherosMember", ImageAccessArgs.builder()        
                .imageId(rancheros.id())
                .memberId("bed6b6cbb86a4e2d8dc2735c2f1000e4")
                .status("accepted")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    rancheros = openstack.images.Image("rancheros",
        image_source_url="https://releases.rancher.com/os/latest/rancheros-openstack.img",
        container_format="bare",
        disk_format="qcow2",
        visibility="shared",
        properties={
            "key": "value",
        })
    rancheros_member = openstack.images.ImageAccess("rancherosMember",
        image_id=rancheros.id,
        member_id="bed6b6cbb86a4e2d8dc2735c2f1000e4",
        status="accepted")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const rancheros = new openstack.images.Image("rancheros", {
        imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
        containerFormat: "bare",
        diskFormat: "qcow2",
        visibility: "shared",
        properties: {
            key: "value",
        },
    });
    const rancherosMember = new openstack.images.ImageAccess("rancherosMember", {
        imageId: rancheros.id,
        memberId: "bed6b6cbb86a4e2d8dc2735c2f1000e4",
        status: "accepted",
    });
    
    resources:
      rancheros:
        type: openstack:images:Image
        properties:
          imageSourceUrl: https://releases.rancher.com/os/latest/rancheros-openstack.img
          containerFormat: bare
          diskFormat: qcow2
          visibility: shared
          properties:
            key: value
      rancherosMember:
        type: openstack:images:ImageAccess
        properties:
          imageId: ${rancheros.id}
          memberId: bed6b6cbb86a4e2d8dc2735c2f1000e4
          status: accepted
    

    Create ImageAccess Resource

    new ImageAccess(name: string, args: ImageAccessArgs, opts?: CustomResourceOptions);
    @overload
    def ImageAccess(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    image_id: Optional[str] = None,
                    member_id: Optional[str] = None,
                    region: Optional[str] = None,
                    status: Optional[str] = None)
    @overload
    def ImageAccess(resource_name: str,
                    args: ImageAccessArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewImageAccess(ctx *Context, name string, args ImageAccessArgs, opts ...ResourceOption) (*ImageAccess, error)
    public ImageAccess(string name, ImageAccessArgs args, CustomResourceOptions? opts = null)
    public ImageAccess(String name, ImageAccessArgs args)
    public ImageAccess(String name, ImageAccessArgs args, CustomResourceOptions options)
    
    type: openstack:images:ImageAccess
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ImageAccessArgs
    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 ImageAccessArgs
    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 ImageAccessArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImageAccessArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImageAccessArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ImageAccess Resource Properties

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

    Inputs

    The ImageAccess resource accepts the following input properties:

    ImageId string
    The image ID.
    MemberId string
    The member ID, e.g. the target project ID.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    Status string
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    ImageId string
    The image ID.
    MemberId string
    The member ID, e.g. the target project ID.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    Status string
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    imageId String
    The image ID.
    memberId String
    The member ID, e.g. the target project ID.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    status String
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    imageId string
    The image ID.
    memberId string
    The member ID, e.g. the target project ID.
    region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    status string
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    image_id str
    The image ID.
    member_id str
    The member ID, e.g. the target project ID.
    region str
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    status str
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    imageId String
    The image ID.
    memberId String
    The member ID, e.g. the target project ID.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    status String
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.

    Outputs

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

    CreatedAt string
    The date the image access was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Schema string
    The member schema.
    UpdatedAt string
    The date the image access was last updated.
    CreatedAt string
    The date the image access was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Schema string
    The member schema.
    UpdatedAt string
    The date the image access was last updated.
    createdAt String
    The date the image access was created.
    id String
    The provider-assigned unique ID for this managed resource.
    schema String
    The member schema.
    updatedAt String
    The date the image access was last updated.
    createdAt string
    The date the image access was created.
    id string
    The provider-assigned unique ID for this managed resource.
    schema string
    The member schema.
    updatedAt string
    The date the image access was last updated.
    created_at str
    The date the image access was created.
    id str
    The provider-assigned unique ID for this managed resource.
    schema str
    The member schema.
    updated_at str
    The date the image access was last updated.
    createdAt String
    The date the image access was created.
    id String
    The provider-assigned unique ID for this managed resource.
    schema String
    The member schema.
    updatedAt String
    The date the image access was last updated.

    Look up Existing ImageAccess Resource

    Get an existing ImageAccess 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?: ImageAccessState, opts?: CustomResourceOptions): ImageAccess
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            image_id: Optional[str] = None,
            member_id: Optional[str] = None,
            region: Optional[str] = None,
            schema: Optional[str] = None,
            status: Optional[str] = None,
            updated_at: Optional[str] = None) -> ImageAccess
    func GetImageAccess(ctx *Context, name string, id IDInput, state *ImageAccessState, opts ...ResourceOption) (*ImageAccess, error)
    public static ImageAccess Get(string name, Input<string> id, ImageAccessState? state, CustomResourceOptions? opts = null)
    public static ImageAccess get(String name, Output<String> id, ImageAccessState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    CreatedAt string
    The date the image access was created.
    ImageId string
    The image ID.
    MemberId string
    The member ID, e.g. the target project ID.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    Schema string
    The member schema.
    Status string
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    UpdatedAt string
    The date the image access was last updated.
    CreatedAt string
    The date the image access was created.
    ImageId string
    The image ID.
    MemberId string
    The member ID, e.g. the target project ID.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    Schema string
    The member schema.
    Status string
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    UpdatedAt string
    The date the image access was last updated.
    createdAt String
    The date the image access was created.
    imageId String
    The image ID.
    memberId String
    The member ID, e.g. the target project ID.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    schema String
    The member schema.
    status String
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    updatedAt String
    The date the image access was last updated.
    createdAt string
    The date the image access was created.
    imageId string
    The image ID.
    memberId string
    The member ID, e.g. the target project ID.
    region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    schema string
    The member schema.
    status string
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    updatedAt string
    The date the image access was last updated.
    created_at str
    The date the image access was created.
    image_id str
    The image ID.
    member_id str
    The member ID, e.g. the target project ID.
    region str
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    schema str
    The member schema.
    status str
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    updated_at str
    The date the image access was last updated.
    createdAt String
    The date the image access was created.
    imageId String
    The image ID.
    memberId String
    The member ID, e.g. the target project ID.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image members. If omitted, the region argument of the provider is used. Changing this creates a new resource.
    schema String
    The member schema.
    status String
    The member proposal status. Optional if admin wants to force the member proposal acceptance. Can either be accepted, rejected or pending. Defaults to pending. Foridden for non-admin users.
    updatedAt String
    The date the image access was last updated.

    Import

    Image access can be imported using the image_id and the member_id, separated by a slash, e.g.

     $ pulumi import openstack:images/imageAccess:ImageAccess openstack_images_image_access_v2 89c60255-9bd6-460c-822a-e2b959ede9d2/bed6b6cbb86a4e2d8dc2735c2f1000e4
    

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi