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

openstack.images.ImageAccessAccept

Explore with Pulumi AI

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

    Manages memberships status for the shared OpenStack Glance V2 Image within the destination project, which has a member proposal.

    Example Usage

    Accept a shared image membershipship proposal within the current project.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var rancheros = OpenStack.Images.GetImage.Invoke(new()
        {
            Name = "RancherOS",
            Visibility = "shared",
            MemberStatus = "all",
        });
    
        var rancherosMember = new OpenStack.Images.ImageAccessAccept("rancherosMember", new()
        {
            ImageId = rancheros.Apply(getImageResult => getImageResult.Id),
            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.LookupImage(ctx, &images.LookupImageArgs{
    			Name:         pulumi.StringRef("RancherOS"),
    			Visibility:   pulumi.StringRef("shared"),
    			MemberStatus: pulumi.StringRef("all"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = images.NewImageAccessAccept(ctx, "rancherosMember", &images.ImageAccessAcceptArgs{
    			ImageId: *pulumi.String(rancheros.Id),
    			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.ImagesFunctions;
    import com.pulumi.openstack.images.inputs.GetImageArgs;
    import com.pulumi.openstack.images.ImageAccessAccept;
    import com.pulumi.openstack.images.ImageAccessAcceptArgs;
    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 rancheros = ImagesFunctions.getImage(GetImageArgs.builder()
                .name("RancherOS")
                .visibility("shared")
                .memberStatus("all")
                .build());
    
            var rancherosMember = new ImageAccessAccept("rancherosMember", ImageAccessAcceptArgs.builder()        
                .imageId(rancheros.applyValue(getImageResult -> getImageResult.id()))
                .status("accepted")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    rancheros = openstack.images.get_image(name="RancherOS",
        visibility="shared",
        member_status="all")
    rancheros_member = openstack.images.ImageAccessAccept("rancherosMember",
        image_id=rancheros.id,
        status="accepted")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const rancheros = openstack.images.getImage({
        name: "RancherOS",
        visibility: "shared",
        memberStatus: "all",
    });
    const rancherosMember = new openstack.images.ImageAccessAccept("rancherosMember", {
        imageId: rancheros.then(rancheros => rancheros.id),
        status: "accepted",
    });
    
    resources:
      rancherosMember:
        type: openstack:images:ImageAccessAccept
        properties:
          imageId: ${rancheros.id}
          status: accepted
    variables:
      rancheros:
        fn::invoke:
          Function: openstack:images:getImage
          Arguments:
            name: RancherOS
            visibility: shared
            memberStatus: all
    

    Create ImageAccessAccept Resource

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

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

    ImageId string
    The proposed image ID.
    Status string
    The membership proposal status. Can either be accepted, rejected or pending.
    MemberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    ImageId string
    The proposed image ID.
    Status string
    The membership proposal status. Can either be accepted, rejected or pending.
    MemberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    imageId String
    The proposed image ID.
    status String
    The membership proposal status. Can either be accepted, rejected or pending.
    memberId String
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    imageId string
    The proposed image ID.
    status string
    The membership proposal status. Can either be accepted, rejected or pending.
    memberId string
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    image_id str
    The proposed image ID.
    status str
    The membership proposal status. Can either be accepted, rejected or pending.
    member_id str
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    region str
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    imageId String
    The proposed image ID.
    status String
    The membership proposal status. Can either be accepted, rejected or pending.
    memberId String
    The member ID, e.g. the target project ID. Optional for admin accounts. Defaults to the current scope project ID.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.

    Outputs

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

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

    Look up Existing ImageAccessAccept Resource

    Get an existing ImageAccessAccept 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?: ImageAccessAcceptState, opts?: CustomResourceOptions): ImageAccessAccept
    @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) -> ImageAccessAccept
    func GetImageAccessAccept(ctx *Context, name string, id IDInput, state *ImageAccessAcceptState, opts ...ResourceOption) (*ImageAccessAccept, error)
    public static ImageAccessAccept Get(string name, Input<string> id, ImageAccessAcceptState? state, CustomResourceOptions? opts = null)
    public static ImageAccessAccept get(String name, Output<String> id, ImageAccessAcceptState 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 membership was created.
    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.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    Schema string
    The membership schema.
    Status string
    The membership proposal status. Can either be accepted, rejected or pending.
    UpdatedAt string
    The date the image membership was last updated.
    CreatedAt string
    The date the image membership was created.
    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.
    Region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    Schema string
    The membership schema.
    Status string
    The membership proposal status. Can either be accepted, rejected or pending.
    UpdatedAt string
    The date the image membership was last updated.
    createdAt String
    The date the image membership was created.
    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.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    schema String
    The membership schema.
    status String
    The membership proposal status. Can either be accepted, rejected or pending.
    updatedAt String
    The date the image membership was last updated.
    createdAt string
    The date the image membership was created.
    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.
    region string
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    schema string
    The membership schema.
    status string
    The membership proposal status. Can either be accepted, rejected or pending.
    updatedAt string
    The date the image membership was last updated.
    created_at str
    The date the image membership was created.
    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.
    region str
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    schema str
    The membership schema.
    status str
    The membership proposal status. Can either be accepted, rejected or pending.
    updated_at str
    The date the image membership was last updated.
    createdAt String
    The date the image membership was created.
    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.
    region String
    The region in which to obtain the V2 Glance client. A Glance client is needed to manage Image memberships. If omitted, the region argument of the provider is used. Changing this creates a new membership.
    schema String
    The membership schema.
    status String
    The membership proposal status. Can either be accepted, rejected or pending.
    updatedAt String
    The date the image membership was last updated.

    Import

    Image access acceptance status can be imported using the image_id, e.g.

     $ pulumi import openstack:images/imageAccessAccept:ImageAccessAccept openstack_images_image_access_accept_v2 89c60255-9bd6-460c-822a-e2b959ede9d2
    

    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