1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. ImagesImageAccessV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.ImagesImageAccessV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for Image sharing you can get at documentation portal

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const memberId = config.requireObject("memberId");
    const rancheros = new opentelekomcloud.ImagesImageV2("rancheros", {
        imageSourceUrl: "https://releases.rancher.com/os/latest/rancheros-openstack.img",
        containerFormat: "bare",
        diskFormat: "qcow2",
    });
    const rancherosMember = new opentelekomcloud.ImagesImageAccessV2("rancherosMember", {
        imageId: rancheros.imagesImageV2Id,
        memberId: memberId,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    member_id = config.require_object("memberId")
    rancheros = opentelekomcloud.ImagesImageV2("rancheros",
        image_source_url="https://releases.rancher.com/os/latest/rancheros-openstack.img",
        container_format="bare",
        disk_format="qcow2")
    rancheros_member = opentelekomcloud.ImagesImageAccessV2("rancherosMember",
        image_id=rancheros.images_image_v2_id,
        member_id=member_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		memberId := cfg.RequireObject("memberId")
    		rancheros, err := opentelekomcloud.NewImagesImageV2(ctx, "rancheros", &opentelekomcloud.ImagesImageV2Args{
    			ImageSourceUrl:  pulumi.String("https://releases.rancher.com/os/latest/rancheros-openstack.img"),
    			ContainerFormat: pulumi.String("bare"),
    			DiskFormat:      pulumi.String("qcow2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opentelekomcloud.NewImagesImageAccessV2(ctx, "rancherosMember", &opentelekomcloud.ImagesImageAccessV2Args{
    			ImageId:  rancheros.ImagesImageV2Id,
    			MemberId: pulumi.Any(memberId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var memberId = config.RequireObject<dynamic>("memberId");
        var rancheros = new Opentelekomcloud.ImagesImageV2("rancheros", new()
        {
            ImageSourceUrl = "https://releases.rancher.com/os/latest/rancheros-openstack.img",
            ContainerFormat = "bare",
            DiskFormat = "qcow2",
        });
    
        var rancherosMember = new Opentelekomcloud.ImagesImageAccessV2("rancherosMember", new()
        {
            ImageId = rancheros.ImagesImageV2Id,
            MemberId = memberId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ImagesImageV2;
    import com.pulumi.opentelekomcloud.ImagesImageV2Args;
    import com.pulumi.opentelekomcloud.ImagesImageAccessV2;
    import com.pulumi.opentelekomcloud.ImagesImageAccessV2Args;
    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) {
            final var config = ctx.config();
            final var memberId = config.get("memberId");
            var rancheros = new ImagesImageV2("rancheros", ImagesImageV2Args.builder()
                .imageSourceUrl("https://releases.rancher.com/os/latest/rancheros-openstack.img")
                .containerFormat("bare")
                .diskFormat("qcow2")
                .build());
    
            var rancherosMember = new ImagesImageAccessV2("rancherosMember", ImagesImageAccessV2Args.builder()
                .imageId(rancheros.imagesImageV2Id())
                .memberId(memberId)
                .build());
    
        }
    }
    
    configuration:
      memberId:
        type: dynamic
    resources:
      rancheros:
        type: opentelekomcloud:ImagesImageV2
        properties:
          imageSourceUrl: https://releases.rancher.com/os/latest/rancheros-openstack.img
          containerFormat: bare
          diskFormat: qcow2
      rancherosMember:
        type: opentelekomcloud:ImagesImageAccessV2
        properties:
          imageId: ${rancheros.imagesImageV2Id}
          memberId: ${memberId}
    

    Create ImagesImageAccessV2 Resource

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

    Constructor syntax

    new ImagesImageAccessV2(name: string, args: ImagesImageAccessV2Args, opts?: CustomResourceOptions);
    @overload
    def ImagesImageAccessV2(resource_name: str,
                            args: ImagesImageAccessV2Args,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ImagesImageAccessV2(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            image_id: Optional[str] = None,
                            member_id: Optional[str] = None,
                            images_image_access_v2_id: Optional[str] = None)
    func NewImagesImageAccessV2(ctx *Context, name string, args ImagesImageAccessV2Args, opts ...ResourceOption) (*ImagesImageAccessV2, error)
    public ImagesImageAccessV2(string name, ImagesImageAccessV2Args args, CustomResourceOptions? opts = null)
    public ImagesImageAccessV2(String name, ImagesImageAccessV2Args args)
    public ImagesImageAccessV2(String name, ImagesImageAccessV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:ImagesImageAccessV2
    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 ImagesImageAccessV2Args
    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 ImagesImageAccessV2Args
    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 ImagesImageAccessV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ImagesImageAccessV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ImagesImageAccessV2Args
    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 imagesImageAccessV2Resource = new Opentelekomcloud.ImagesImageAccessV2("imagesImageAccessV2Resource", new()
    {
        ImageId = "string",
        MemberId = "string",
        ImagesImageAccessV2Id = "string",
    });
    
    example, err := opentelekomcloud.NewImagesImageAccessV2(ctx, "imagesImageAccessV2Resource", &opentelekomcloud.ImagesImageAccessV2Args{
    	ImageId:               pulumi.String("string"),
    	MemberId:              pulumi.String("string"),
    	ImagesImageAccessV2Id: pulumi.String("string"),
    })
    
    var imagesImageAccessV2Resource = new ImagesImageAccessV2("imagesImageAccessV2Resource", ImagesImageAccessV2Args.builder()
        .imageId("string")
        .memberId("string")
        .imagesImageAccessV2Id("string")
        .build());
    
    images_image_access_v2_resource = opentelekomcloud.ImagesImageAccessV2("imagesImageAccessV2Resource",
        image_id="string",
        member_id="string",
        images_image_access_v2_id="string")
    
    const imagesImageAccessV2Resource = new opentelekomcloud.ImagesImageAccessV2("imagesImageAccessV2Resource", {
        imageId: "string",
        memberId: "string",
        imagesImageAccessV2Id: "string",
    });
    
    type: opentelekomcloud:ImagesImageAccessV2
    properties:
        imageId: string
        imagesImageAccessV2Id: string
        memberId: string
    

    ImagesImageAccessV2 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 ImagesImageAccessV2 resource accepts the following input properties:

    ImageId string
    The proposed image ID.
    MemberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    ImagesImageAccessV2Id string
    ImageId string
    The proposed image ID.
    MemberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    ImagesImageAccessV2Id string
    imageId String
    The proposed image ID.
    memberId String
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    imagesImageAccessV2Id String
    imageId string
    The proposed image ID.
    memberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    imagesImageAccessV2Id string
    image_id str
    The proposed image ID.
    member_id str
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    images_image_access_v2_id str
    imageId String
    The proposed image ID.
    memberId String
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    imagesImageAccessV2Id String

    Outputs

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

    CreatedAt string
    Specifies the time when a shared image was created. The value is in UTC format.
    Id string
    The provider-assigned unique ID for this managed resource.
    Schema string
    Specifies the sharing schema.
    Status string
    Specifies the image sharing status. After creation is pending.
    UpdateAt string
    CreatedAt string
    Specifies the time when a shared image was created. The value is in UTC format.
    Id string
    The provider-assigned unique ID for this managed resource.
    Schema string
    Specifies the sharing schema.
    Status string
    Specifies the image sharing status. After creation is pending.
    UpdateAt string
    createdAt String
    Specifies the time when a shared image was created. The value is in UTC format.
    id String
    The provider-assigned unique ID for this managed resource.
    schema String
    Specifies the sharing schema.
    status String
    Specifies the image sharing status. After creation is pending.
    updateAt String
    createdAt string
    Specifies the time when a shared image was created. The value is in UTC format.
    id string
    The provider-assigned unique ID for this managed resource.
    schema string
    Specifies the sharing schema.
    status string
    Specifies the image sharing status. After creation is pending.
    updateAt string
    created_at str
    Specifies the time when a shared image was created. The value is in UTC format.
    id str
    The provider-assigned unique ID for this managed resource.
    schema str
    Specifies the sharing schema.
    status str
    Specifies the image sharing status. After creation is pending.
    update_at str
    createdAt String
    Specifies the time when a shared image was created. The value is in UTC format.
    id String
    The provider-assigned unique ID for this managed resource.
    schema String
    Specifies the sharing schema.
    status String
    Specifies the image sharing status. After creation is pending.
    updateAt String

    Look up Existing ImagesImageAccessV2 Resource

    Get an existing ImagesImageAccessV2 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?: ImagesImageAccessV2State, opts?: CustomResourceOptions): ImagesImageAccessV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            image_id: Optional[str] = None,
            images_image_access_v2_id: Optional[str] = None,
            member_id: Optional[str] = None,
            schema: Optional[str] = None,
            status: Optional[str] = None,
            update_at: Optional[str] = None) -> ImagesImageAccessV2
    func GetImagesImageAccessV2(ctx *Context, name string, id IDInput, state *ImagesImageAccessV2State, opts ...ResourceOption) (*ImagesImageAccessV2, error)
    public static ImagesImageAccessV2 Get(string name, Input<string> id, ImagesImageAccessV2State? state, CustomResourceOptions? opts = null)
    public static ImagesImageAccessV2 get(String name, Output<String> id, ImagesImageAccessV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:ImagesImageAccessV2    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.
    The following state arguments are supported:
    CreatedAt string
    Specifies the time when a shared image was created. The value is in UTC format.
    ImageId string
    The proposed image ID.
    ImagesImageAccessV2Id string
    MemberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    Schema string
    Specifies the sharing schema.
    Status string
    Specifies the image sharing status. After creation is pending.
    UpdateAt string
    CreatedAt string
    Specifies the time when a shared image was created. The value is in UTC format.
    ImageId string
    The proposed image ID.
    ImagesImageAccessV2Id string
    MemberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    Schema string
    Specifies the sharing schema.
    Status string
    Specifies the image sharing status. After creation is pending.
    UpdateAt string
    createdAt String
    Specifies the time when a shared image was created. The value is in UTC format.
    imageId String
    The proposed image ID.
    imagesImageAccessV2Id String
    memberId String
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    schema String
    Specifies the sharing schema.
    status String
    Specifies the image sharing status. After creation is pending.
    updateAt String
    createdAt string
    Specifies the time when a shared image was created. The value is in UTC format.
    imageId string
    The proposed image ID.
    imagesImageAccessV2Id string
    memberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    schema string
    Specifies the sharing schema.
    status string
    Specifies the image sharing status. After creation is pending.
    updateAt string
    created_at str
    Specifies the time when a shared image was created. The value is in UTC format.
    image_id str
    The proposed image ID.
    images_image_access_v2_id str
    member_id str
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    schema str
    Specifies the sharing schema.
    status str
    Specifies the image sharing status. After creation is pending.
    update_at str
    createdAt String
    Specifies the time when a shared image was created. The value is in UTC format.
    imageId String
    The proposed image ID.
    imagesImageAccessV2Id String
    memberId String
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    schema String
    Specifies the sharing schema.
    status String
    Specifies the image sharing status. After creation is pending.
    updateAt String

    Import

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

    $ pulumi import opentelekomcloud:index/imagesImageAccessV2:ImagesImageAccessV2 opentelekomcloud_images_image_access_v2 89c60255-9bd6-460c-822a-e2b959ede9d2/bed6b6cbb86a4e2d8dc2735c2f1000e4
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud