1. Packages
  2. Openstack Provider
  3. API Docs
  4. blockstorage
  5. VolumeTypeAccessV3
OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi

openstack.blockstorage.VolumeTypeAccessV3

Explore with Pulumi AI

openstack logo
OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi

    Manages a V3 block storage volume type access resource within OpenStack.

    Note: This usually requires admin privileges.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const project1 = new openstack.identity.Project("project_1", {name: "project_1"});
    const volumeType1 = new openstack.blockstorage.VolumeTypeV3("volume_type_1", {
        name: "volume_type_1",
        isPublic: false,
    });
    const volumeTypeAccess = new openstack.blockstorage.VolumeTypeAccessV3("volume_type_access", {
        projectId: project1.id,
        volumeTypeId: volumeType1.id,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    project1 = openstack.identity.Project("project_1", name="project_1")
    volume_type1 = openstack.blockstorage.VolumeTypeV3("volume_type_1",
        name="volume_type_1",
        is_public=False)
    volume_type_access = openstack.blockstorage.VolumeTypeAccessV3("volume_type_access",
        project_id=project1.id,
        volume_type_id=volume_type1.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/blockstorage"
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project1, err := identity.NewProject(ctx, "project_1", &identity.ProjectArgs{
    			Name: pulumi.String("project_1"),
    		})
    		if err != nil {
    			return err
    		}
    		volumeType1, err := blockstorage.NewVolumeTypeV3(ctx, "volume_type_1", &blockstorage.VolumeTypeV3Args{
    			Name:     pulumi.String("volume_type_1"),
    			IsPublic: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = blockstorage.NewVolumeTypeAccessV3(ctx, "volume_type_access", &blockstorage.VolumeTypeAccessV3Args{
    			ProjectId:    project1.ID(),
    			VolumeTypeId: volumeType1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var project1 = new OpenStack.Identity.Project("project_1", new()
        {
            Name = "project_1",
        });
    
        var volumeType1 = new OpenStack.BlockStorage.VolumeTypeV3("volume_type_1", new()
        {
            Name = "volume_type_1",
            IsPublic = false,
        });
    
        var volumeTypeAccess = new OpenStack.BlockStorage.VolumeTypeAccessV3("volume_type_access", new()
        {
            ProjectId = project1.Id,
            VolumeTypeId = volumeType1.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.identity.Project;
    import com.pulumi.openstack.identity.ProjectArgs;
    import com.pulumi.openstack.blockstorage.VolumeTypeV3;
    import com.pulumi.openstack.blockstorage.VolumeTypeV3Args;
    import com.pulumi.openstack.blockstorage.VolumeTypeAccessV3;
    import com.pulumi.openstack.blockstorage.VolumeTypeAccessV3Args;
    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 project1 = new Project("project1", ProjectArgs.builder()
                .name("project_1")
                .build());
    
            var volumeType1 = new VolumeTypeV3("volumeType1", VolumeTypeV3Args.builder()
                .name("volume_type_1")
                .isPublic(false)
                .build());
    
            var volumeTypeAccess = new VolumeTypeAccessV3("volumeTypeAccess", VolumeTypeAccessV3Args.builder()
                .projectId(project1.id())
                .volumeTypeId(volumeType1.id())
                .build());
    
        }
    }
    
    resources:
      project1:
        type: openstack:identity:Project
        name: project_1
        properties:
          name: project_1
      volumeType1:
        type: openstack:blockstorage:VolumeTypeV3
        name: volume_type_1
        properties:
          name: volume_type_1
          isPublic: false
      volumeTypeAccess:
        type: openstack:blockstorage:VolumeTypeAccessV3
        name: volume_type_access
        properties:
          projectId: ${project1.id}
          volumeTypeId: ${volumeType1.id}
    

    Create VolumeTypeAccessV3 Resource

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

    Constructor syntax

    new VolumeTypeAccessV3(name: string, args: VolumeTypeAccessV3Args, opts?: CustomResourceOptions);
    @overload
    def VolumeTypeAccessV3(resource_name: str,
                           args: VolumeTypeAccessV3Args,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def VolumeTypeAccessV3(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           project_id: Optional[str] = None,
                           volume_type_id: Optional[str] = None,
                           region: Optional[str] = None)
    func NewVolumeTypeAccessV3(ctx *Context, name string, args VolumeTypeAccessV3Args, opts ...ResourceOption) (*VolumeTypeAccessV3, error)
    public VolumeTypeAccessV3(string name, VolumeTypeAccessV3Args args, CustomResourceOptions? opts = null)
    public VolumeTypeAccessV3(String name, VolumeTypeAccessV3Args args)
    public VolumeTypeAccessV3(String name, VolumeTypeAccessV3Args args, CustomResourceOptions options)
    
    type: openstack:blockstorage:VolumeTypeAccessV3
    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 VolumeTypeAccessV3Args
    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 VolumeTypeAccessV3Args
    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 VolumeTypeAccessV3Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VolumeTypeAccessV3Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VolumeTypeAccessV3Args
    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 volumeTypeAccessV3Resource = new OpenStack.BlockStorage.VolumeTypeAccessV3("volumeTypeAccessV3Resource", new()
    {
        ProjectId = "string",
        VolumeTypeId = "string",
        Region = "string",
    });
    
    example, err := blockstorage.NewVolumeTypeAccessV3(ctx, "volumeTypeAccessV3Resource", &blockstorage.VolumeTypeAccessV3Args{
    	ProjectId:    pulumi.String("string"),
    	VolumeTypeId: pulumi.String("string"),
    	Region:       pulumi.String("string"),
    })
    
    var volumeTypeAccessV3Resource = new VolumeTypeAccessV3("volumeTypeAccessV3Resource", VolumeTypeAccessV3Args.builder()
        .projectId("string")
        .volumeTypeId("string")
        .region("string")
        .build());
    
    volume_type_access_v3_resource = openstack.blockstorage.VolumeTypeAccessV3("volumeTypeAccessV3Resource",
        project_id="string",
        volume_type_id="string",
        region="string")
    
    const volumeTypeAccessV3Resource = new openstack.blockstorage.VolumeTypeAccessV3("volumeTypeAccessV3Resource", {
        projectId: "string",
        volumeTypeId: "string",
        region: "string",
    });
    
    type: openstack:blockstorage:VolumeTypeAccessV3
    properties:
        projectId: string
        region: string
        volumeTypeId: string
    

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

    ProjectId string
    ID of the project to give access to. Changing this creates a new resource.
    VolumeTypeId string
    ID of the volume type to give access to. Changing this creates a new resource.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    ProjectId string
    ID of the project to give access to. Changing this creates a new resource.
    VolumeTypeId string
    ID of the volume type to give access to. Changing this creates a new resource.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    projectId String
    ID of the project to give access to. Changing this creates a new resource.
    volumeTypeId String
    ID of the volume type to give access to. Changing this creates a new resource.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    projectId string
    ID of the project to give access to. Changing this creates a new resource.
    volumeTypeId string
    ID of the volume type to give access to. Changing this creates a new resource.
    region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    project_id str
    ID of the project to give access to. Changing this creates a new resource.
    volume_type_id str
    ID of the volume type to give access to. Changing this creates a new resource.
    region str
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    projectId String
    ID of the project to give access to. Changing this creates a new resource.
    volumeTypeId String
    ID of the volume type to give access to. Changing this creates a new resource.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VolumeTypeAccessV3 Resource

    Get an existing VolumeTypeAccessV3 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?: VolumeTypeAccessV3State, opts?: CustomResourceOptions): VolumeTypeAccessV3
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            volume_type_id: Optional[str] = None) -> VolumeTypeAccessV3
    func GetVolumeTypeAccessV3(ctx *Context, name string, id IDInput, state *VolumeTypeAccessV3State, opts ...ResourceOption) (*VolumeTypeAccessV3, error)
    public static VolumeTypeAccessV3 Get(string name, Input<string> id, VolumeTypeAccessV3State? state, CustomResourceOptions? opts = null)
    public static VolumeTypeAccessV3 get(String name, Output<String> id, VolumeTypeAccessV3State 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:
    ProjectId string
    ID of the project to give access to. Changing this creates a new resource.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    VolumeTypeId string
    ID of the volume type to give access to. Changing this creates a new resource.
    ProjectId string
    ID of the project to give access to. Changing this creates a new resource.
    Region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    VolumeTypeId string
    ID of the volume type to give access to. Changing this creates a new resource.
    projectId String
    ID of the project to give access to. Changing this creates a new resource.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    volumeTypeId String
    ID of the volume type to give access to. Changing this creates a new resource.
    projectId string
    ID of the project to give access to. Changing this creates a new resource.
    region string
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    volumeTypeId string
    ID of the volume type to give access to. Changing this creates a new resource.
    project_id str
    ID of the project to give access to. Changing this creates a new resource.
    region str
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    volume_type_id str
    ID of the volume type to give access to. Changing this creates a new resource.
    projectId String
    ID of the project to give access to. Changing this creates a new resource.
    region String
    The region in which to create the volume. If omitted, the region argument of the provider is used. Changing this creates a new quotaset.
    volumeTypeId String
    ID of the volume type to give access to. Changing this creates a new resource.

    Import

    Volume types access can be imported using the volume_type_id/project_id, e.g.

    $ pulumi import openstack:blockstorage/volumeTypeAccessV3:VolumeTypeAccessV3 volume_type_access 941793f0-0a34-4bc4-b72e-a6326ae58283/ed498e81f0cc448bae0ad4f8f21bf67f
    

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

    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 v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi