1. Packages
  2. OpenStack
  3. API Docs
  4. blockstorage
  5. QosAssociationV3
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

openstack.blockstorage.QosAssociationV3

Explore with Pulumi AI

openstack logo
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

    Manages a V3 block storage Qos Association resource within OpenStack.

    Note: This usually requires admin privileges.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const qos = new openstack.blockstorage.QosV3("qos", {
        consumer: "front-end",
        specs: {
            read_iops_sec: "20000",
        },
    });
    const volumeType = new openstack.blockstorage.VolumeTypeV3("volumeType", {});
    const qosAssociation = new openstack.blockstorage.QosAssociationV3("qosAssociation", {
        qosId: qos.id,
        volumeTypeId: volumeType.id,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    qos = openstack.blockstorage.QosV3("qos",
        consumer="front-end",
        specs={
            "read_iops_sec": "20000",
        })
    volume_type = openstack.blockstorage.VolumeTypeV3("volumeType")
    qos_association = openstack.blockstorage.QosAssociationV3("qosAssociation",
        qos_id=qos.id,
        volume_type_id=volume_type.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/blockstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		qos, err := blockstorage.NewQosV3(ctx, "qos", &blockstorage.QosV3Args{
    			Consumer: pulumi.String("front-end"),
    			Specs: pulumi.Map{
    				"read_iops_sec": pulumi.Any("20000"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		volumeType, err := blockstorage.NewVolumeTypeV3(ctx, "volumeType", nil)
    		if err != nil {
    			return err
    		}
    		_, err = blockstorage.NewQosAssociationV3(ctx, "qosAssociation", &blockstorage.QosAssociationV3Args{
    			QosId:        qos.ID(),
    			VolumeTypeId: volumeType.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 qos = new OpenStack.BlockStorage.QosV3("qos", new()
        {
            Consumer = "front-end",
            Specs = 
            {
                { "read_iops_sec", "20000" },
            },
        });
    
        var volumeType = new OpenStack.BlockStorage.VolumeTypeV3("volumeType");
    
        var qosAssociation = new OpenStack.BlockStorage.QosAssociationV3("qosAssociation", new()
        {
            QosId = qos.Id,
            VolumeTypeId = volumeType.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.blockstorage.QosV3;
    import com.pulumi.openstack.blockstorage.QosV3Args;
    import com.pulumi.openstack.blockstorage.VolumeTypeV3;
    import com.pulumi.openstack.blockstorage.QosAssociationV3;
    import com.pulumi.openstack.blockstorage.QosAssociationV3Args;
    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 qos = new QosV3("qos", QosV3Args.builder()        
                .consumer("front-end")
                .specs(Map.of("read_iops_sec", "20000"))
                .build());
    
            var volumeType = new VolumeTypeV3("volumeType");
    
            var qosAssociation = new QosAssociationV3("qosAssociation", QosAssociationV3Args.builder()        
                .qosId(qos.id())
                .volumeTypeId(volumeType.id())
                .build());
    
        }
    }
    
    resources:
      qos:
        type: openstack:blockstorage:QosV3
        properties:
          consumer: front-end
          specs:
            read_iops_sec: '20000'
      volumeType:
        type: openstack:blockstorage:VolumeTypeV3
      qosAssociation:
        type: openstack:blockstorage:QosAssociationV3
        properties:
          qosId: ${qos.id}
          volumeTypeId: ${volumeType.id}
    

    Create QosAssociationV3 Resource

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

    Constructor syntax

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

    Example

    The following reference example uses placeholder values for all input properties.

    var qosAssociationV3Resource = new OpenStack.BlockStorage.QosAssociationV3("qosAssociationV3Resource", new()
    {
        QosId = "string",
        VolumeTypeId = "string",
        Region = "string",
    });
    
    example, err := blockstorage.NewQosAssociationV3(ctx, "qosAssociationV3Resource", &blockstorage.QosAssociationV3Args{
    	QosId:        pulumi.String("string"),
    	VolumeTypeId: pulumi.String("string"),
    	Region:       pulumi.String("string"),
    })
    
    var qosAssociationV3Resource = new QosAssociationV3("qosAssociationV3Resource", QosAssociationV3Args.builder()        
        .qosId("string")
        .volumeTypeId("string")
        .region("string")
        .build());
    
    qos_association_v3_resource = openstack.blockstorage.QosAssociationV3("qosAssociationV3Resource",
        qos_id="string",
        volume_type_id="string",
        region="string")
    
    const qosAssociationV3Resource = new openstack.blockstorage.QosAssociationV3("qosAssociationV3Resource", {
        qosId: "string",
        volumeTypeId: "string",
        region: "string",
    });
    
    type: openstack:blockstorage:QosAssociationV3
    properties:
        qosId: string
        region: string
        volumeTypeId: string
    

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

    QosId string
    ID of the qos to associate. Changing this creates a new qos association.
    VolumeTypeId string
    ID of the volume_type to associate. Changing this creates a new qos association.
    Region string
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    QosId string
    ID of the qos to associate. Changing this creates a new qos association.
    VolumeTypeId string
    ID of the volume_type to associate. Changing this creates a new qos association.
    Region string
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    qosId String
    ID of the qos to associate. Changing this creates a new qos association.
    volumeTypeId String
    ID of the volume_type to associate. Changing this creates a new qos association.
    region String
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    qosId string
    ID of the qos to associate. Changing this creates a new qos association.
    volumeTypeId string
    ID of the volume_type to associate. Changing this creates a new qos association.
    region string
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    qos_id str
    ID of the qos to associate. Changing this creates a new qos association.
    volume_type_id str
    ID of the volume_type to associate. Changing this creates a new qos association.
    region str
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    qosId String
    ID of the qos to associate. Changing this creates a new qos association.
    volumeTypeId String
    ID of the volume_type to associate. Changing this creates a new qos association.
    region String
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the QosAssociationV3 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 QosAssociationV3 Resource

    Get an existing QosAssociationV3 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?: QosAssociationV3State, opts?: CustomResourceOptions): QosAssociationV3
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            qos_id: Optional[str] = None,
            region: Optional[str] = None,
            volume_type_id: Optional[str] = None) -> QosAssociationV3
    func GetQosAssociationV3(ctx *Context, name string, id IDInput, state *QosAssociationV3State, opts ...ResourceOption) (*QosAssociationV3, error)
    public static QosAssociationV3 Get(string name, Input<string> id, QosAssociationV3State? state, CustomResourceOptions? opts = null)
    public static QosAssociationV3 get(String name, Output<String> id, QosAssociationV3State 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:
    QosId string
    ID of the qos to associate. Changing this creates a new qos association.
    Region string
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    VolumeTypeId string
    ID of the volume_type to associate. Changing this creates a new qos association.
    QosId string
    ID of the qos to associate. Changing this creates a new qos association.
    Region string
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    VolumeTypeId string
    ID of the volume_type to associate. Changing this creates a new qos association.
    qosId String
    ID of the qos to associate. Changing this creates a new qos association.
    region String
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    volumeTypeId String
    ID of the volume_type to associate. Changing this creates a new qos association.
    qosId string
    ID of the qos to associate. Changing this creates a new qos association.
    region string
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    volumeTypeId string
    ID of the volume_type to associate. Changing this creates a new qos association.
    qos_id str
    ID of the qos to associate. Changing this creates a new qos association.
    region str
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    volume_type_id str
    ID of the volume_type to associate. Changing this creates a new qos association.
    qosId String
    ID of the qos to associate. Changing this creates a new qos association.
    region String
    The region in which to create the qos association. If omitted, the region argument of the provider is used. Changing this creates a new qos association.
    volumeTypeId String
    ID of the volume_type to associate. Changing this creates a new qos association.

    Import

    Qos association can be imported using the qos_id/volume_type_id, e.g.

    $ pulumi import openstack:blockstorage/qosAssociationV3:QosAssociationV3 qos_association 941793f0-0a34-4bc4-b72e-a6326ae58283/ea257959-eeb1-4c10-8d33-26f0409a755d
    

    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 v3.15.2 published on Friday, Mar 29, 2024 by Pulumi