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

openstack.networking.QuotaV2

Explore with Pulumi AI

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

    Manages a V2 networking quota resource within OpenStack.

    Note: This usually requires admin privileges.

    Note: This resource has a no-op deletion so no actual actions will be done against the OpenStack API in case of delete call.

    Note: This resource has all-in creation so all optional quota arguments that were not specified are created with zero value.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const project1 = new openstack.identity.Project("project1", {});
    const quota1 = new openstack.networking.QuotaV2("quota1", {
        projectId: project1.id,
        floatingip: 10,
        network: 4,
        port: 100,
        rbacPolicy: 10,
        router: 4,
        securityGroup: 10,
        securityGroupRule: 100,
        subnet: 8,
        subnetpool: 2,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    project1 = openstack.identity.Project("project1")
    quota1 = openstack.networking.QuotaV2("quota1",
        project_id=project1.id,
        floatingip=10,
        network=4,
        port=100,
        rbac_policy=10,
        router=4,
        security_group=10,
        security_group_rule=100,
        subnet=8,
        subnetpool=2)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/identity"
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		project1, err := identity.NewProject(ctx, "project1", nil)
    		if err != nil {
    			return err
    		}
    		_, err = networking.NewQuotaV2(ctx, "quota1", &networking.QuotaV2Args{
    			ProjectId:         project1.ID(),
    			Floatingip:        pulumi.Int(10),
    			Network:           pulumi.Int(4),
    			Port:              pulumi.Int(100),
    			RbacPolicy:        pulumi.Int(10),
    			Router:            pulumi.Int(4),
    			SecurityGroup:     pulumi.Int(10),
    			SecurityGroupRule: pulumi.Int(100),
    			Subnet:            pulumi.Int(8),
    			Subnetpool:        pulumi.Int(2),
    		})
    		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("project1");
    
        var quota1 = new OpenStack.Networking.QuotaV2("quota1", new()
        {
            ProjectId = project1.Id,
            Floatingip = 10,
            Network = 4,
            Port = 100,
            RbacPolicy = 10,
            Router = 4,
            SecurityGroup = 10,
            SecurityGroupRule = 100,
            Subnet = 8,
            Subnetpool = 2,
        });
    
    });
    
    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.networking.QuotaV2;
    import com.pulumi.openstack.networking.QuotaV2Args;
    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");
    
            var quota1 = new QuotaV2("quota1", QuotaV2Args.builder()        
                .projectId(project1.id())
                .floatingip(10)
                .network(4)
                .port(100)
                .rbacPolicy(10)
                .router(4)
                .securityGroup(10)
                .securityGroupRule(100)
                .subnet(8)
                .subnetpool(2)
                .build());
    
        }
    }
    
    resources:
      project1:
        type: openstack:identity:Project
      quota1:
        type: openstack:networking:QuotaV2
        properties:
          projectId: ${project1.id}
          floatingip: 10
          network: 4
          port: 100
          rbacPolicy: 10
          router: 4
          securityGroup: 10
          securityGroupRule: 100
          subnet: 8
          subnetpool: 2
    

    Create QuotaV2 Resource

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

    Constructor syntax

    new QuotaV2(name: string, args: QuotaV2Args, opts?: CustomResourceOptions);
    @overload
    def QuotaV2(resource_name: str,
                args: QuotaV2Args,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def QuotaV2(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                project_id: Optional[str] = None,
                floatingip: Optional[int] = None,
                network: Optional[int] = None,
                port: Optional[int] = None,
                rbac_policy: Optional[int] = None,
                region: Optional[str] = None,
                router: Optional[int] = None,
                security_group: Optional[int] = None,
                security_group_rule: Optional[int] = None,
                subnet: Optional[int] = None,
                subnetpool: Optional[int] = None)
    func NewQuotaV2(ctx *Context, name string, args QuotaV2Args, opts ...ResourceOption) (*QuotaV2, error)
    public QuotaV2(string name, QuotaV2Args args, CustomResourceOptions? opts = null)
    public QuotaV2(String name, QuotaV2Args args)
    public QuotaV2(String name, QuotaV2Args args, CustomResourceOptions options)
    
    type: openstack:networking:QuotaV2
    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 QuotaV2Args
    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 QuotaV2Args
    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 QuotaV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args QuotaV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args QuotaV2Args
    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 quotaV2Resource = new OpenStack.Networking.QuotaV2("quotaV2Resource", new()
    {
        ProjectId = "string",
        Floatingip = 0,
        Network = 0,
        Port = 0,
        RbacPolicy = 0,
        Region = "string",
        Router = 0,
        SecurityGroup = 0,
        SecurityGroupRule = 0,
        Subnet = 0,
        Subnetpool = 0,
    });
    
    example, err := networking.NewQuotaV2(ctx, "quotaV2Resource", &networking.QuotaV2Args{
    	ProjectId:         pulumi.String("string"),
    	Floatingip:        pulumi.Int(0),
    	Network:           pulumi.Int(0),
    	Port:              pulumi.Int(0),
    	RbacPolicy:        pulumi.Int(0),
    	Region:            pulumi.String("string"),
    	Router:            pulumi.Int(0),
    	SecurityGroup:     pulumi.Int(0),
    	SecurityGroupRule: pulumi.Int(0),
    	Subnet:            pulumi.Int(0),
    	Subnetpool:        pulumi.Int(0),
    })
    
    var quotaV2Resource = new QuotaV2("quotaV2Resource", QuotaV2Args.builder()        
        .projectId("string")
        .floatingip(0)
        .network(0)
        .port(0)
        .rbacPolicy(0)
        .region("string")
        .router(0)
        .securityGroup(0)
        .securityGroupRule(0)
        .subnet(0)
        .subnetpool(0)
        .build());
    
    quota_v2_resource = openstack.networking.QuotaV2("quotaV2Resource",
        project_id="string",
        floatingip=0,
        network=0,
        port=0,
        rbac_policy=0,
        region="string",
        router=0,
        security_group=0,
        security_group_rule=0,
        subnet=0,
        subnetpool=0)
    
    const quotaV2Resource = new openstack.networking.QuotaV2("quotaV2Resource", {
        projectId: "string",
        floatingip: 0,
        network: 0,
        port: 0,
        rbacPolicy: 0,
        region: "string",
        router: 0,
        securityGroup: 0,
        securityGroupRule: 0,
        subnet: 0,
        subnetpool: 0,
    });
    
    type: openstack:networking:QuotaV2
    properties:
        floatingip: 0
        network: 0
        port: 0
        projectId: string
        rbacPolicy: 0
        region: string
        router: 0
        securityGroup: 0
        securityGroupRule: 0
        subnet: 0
        subnetpool: 0
    

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

    ProjectId string
    ID of the project to manage quota. Changing this creates new quota.
    Floatingip int
    Quota value for floating IPs. Changing this updates the existing quota.
    Network int
    Quota value for networks. Changing this updates the existing quota.
    Port int
    Quota value for ports. Changing this updates the existing quota.
    RbacPolicy int
    Quota value for RBAC policies. Changing this updates the existing quota.
    Region string
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    Router int
    Quota value for routers. Changing this updates the existing quota.
    SecurityGroup int
    Quota value for security groups. Changing this updates the existing quota.
    SecurityGroupRule int
    Quota value for security group rules. Changing this updates the existing quota.
    Subnet int
    Quota value for subnets. Changing this updates the existing quota.
    Subnetpool int
    Quota value for subnetpools. Changing this updates the existing quota.
    ProjectId string
    ID of the project to manage quota. Changing this creates new quota.
    Floatingip int
    Quota value for floating IPs. Changing this updates the existing quota.
    Network int
    Quota value for networks. Changing this updates the existing quota.
    Port int
    Quota value for ports. Changing this updates the existing quota.
    RbacPolicy int
    Quota value for RBAC policies. Changing this updates the existing quota.
    Region string
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    Router int
    Quota value for routers. Changing this updates the existing quota.
    SecurityGroup int
    Quota value for security groups. Changing this updates the existing quota.
    SecurityGroupRule int
    Quota value for security group rules. Changing this updates the existing quota.
    Subnet int
    Quota value for subnets. Changing this updates the existing quota.
    Subnetpool int
    Quota value for subnetpools. Changing this updates the existing quota.
    projectId String
    ID of the project to manage quota. Changing this creates new quota.
    floatingip Integer
    Quota value for floating IPs. Changing this updates the existing quota.
    network Integer
    Quota value for networks. Changing this updates the existing quota.
    port Integer
    Quota value for ports. Changing this updates the existing quota.
    rbacPolicy Integer
    Quota value for RBAC policies. Changing this updates the existing quota.
    region String
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router Integer
    Quota value for routers. Changing this updates the existing quota.
    securityGroup Integer
    Quota value for security groups. Changing this updates the existing quota.
    securityGroupRule Integer
    Quota value for security group rules. Changing this updates the existing quota.
    subnet Integer
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool Integer
    Quota value for subnetpools. Changing this updates the existing quota.
    projectId string
    ID of the project to manage quota. Changing this creates new quota.
    floatingip number
    Quota value for floating IPs. Changing this updates the existing quota.
    network number
    Quota value for networks. Changing this updates the existing quota.
    port number
    Quota value for ports. Changing this updates the existing quota.
    rbacPolicy number
    Quota value for RBAC policies. Changing this updates the existing quota.
    region string
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router number
    Quota value for routers. Changing this updates the existing quota.
    securityGroup number
    Quota value for security groups. Changing this updates the existing quota.
    securityGroupRule number
    Quota value for security group rules. Changing this updates the existing quota.
    subnet number
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool number
    Quota value for subnetpools. Changing this updates the existing quota.
    project_id str
    ID of the project to manage quota. Changing this creates new quota.
    floatingip int
    Quota value for floating IPs. Changing this updates the existing quota.
    network int
    Quota value for networks. Changing this updates the existing quota.
    port int
    Quota value for ports. Changing this updates the existing quota.
    rbac_policy int
    Quota value for RBAC policies. Changing this updates the existing quota.
    region str
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router int
    Quota value for routers. Changing this updates the existing quota.
    security_group int
    Quota value for security groups. Changing this updates the existing quota.
    security_group_rule int
    Quota value for security group rules. Changing this updates the existing quota.
    subnet int
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool int
    Quota value for subnetpools. Changing this updates the existing quota.
    projectId String
    ID of the project to manage quota. Changing this creates new quota.
    floatingip Number
    Quota value for floating IPs. Changing this updates the existing quota.
    network Number
    Quota value for networks. Changing this updates the existing quota.
    port Number
    Quota value for ports. Changing this updates the existing quota.
    rbacPolicy Number
    Quota value for RBAC policies. Changing this updates the existing quota.
    region String
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router Number
    Quota value for routers. Changing this updates the existing quota.
    securityGroup Number
    Quota value for security groups. Changing this updates the existing quota.
    securityGroupRule Number
    Quota value for security group rules. Changing this updates the existing quota.
    subnet Number
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool Number
    Quota value for subnetpools. Changing this updates the existing quota.

    Outputs

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

    Get an existing QuotaV2 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?: QuotaV2State, opts?: CustomResourceOptions): QuotaV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            floatingip: Optional[int] = None,
            network: Optional[int] = None,
            port: Optional[int] = None,
            project_id: Optional[str] = None,
            rbac_policy: Optional[int] = None,
            region: Optional[str] = None,
            router: Optional[int] = None,
            security_group: Optional[int] = None,
            security_group_rule: Optional[int] = None,
            subnet: Optional[int] = None,
            subnetpool: Optional[int] = None) -> QuotaV2
    func GetQuotaV2(ctx *Context, name string, id IDInput, state *QuotaV2State, opts ...ResourceOption) (*QuotaV2, error)
    public static QuotaV2 Get(string name, Input<string> id, QuotaV2State? state, CustomResourceOptions? opts = null)
    public static QuotaV2 get(String name, Output<String> id, QuotaV2State 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:
    Floatingip int
    Quota value for floating IPs. Changing this updates the existing quota.
    Network int
    Quota value for networks. Changing this updates the existing quota.
    Port int
    Quota value for ports. Changing this updates the existing quota.
    ProjectId string
    ID of the project to manage quota. Changing this creates new quota.
    RbacPolicy int
    Quota value for RBAC policies. Changing this updates the existing quota.
    Region string
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    Router int
    Quota value for routers. Changing this updates the existing quota.
    SecurityGroup int
    Quota value for security groups. Changing this updates the existing quota.
    SecurityGroupRule int
    Quota value for security group rules. Changing this updates the existing quota.
    Subnet int
    Quota value for subnets. Changing this updates the existing quota.
    Subnetpool int
    Quota value for subnetpools. Changing this updates the existing quota.
    Floatingip int
    Quota value for floating IPs. Changing this updates the existing quota.
    Network int
    Quota value for networks. Changing this updates the existing quota.
    Port int
    Quota value for ports. Changing this updates the existing quota.
    ProjectId string
    ID of the project to manage quota. Changing this creates new quota.
    RbacPolicy int
    Quota value for RBAC policies. Changing this updates the existing quota.
    Region string
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    Router int
    Quota value for routers. Changing this updates the existing quota.
    SecurityGroup int
    Quota value for security groups. Changing this updates the existing quota.
    SecurityGroupRule int
    Quota value for security group rules. Changing this updates the existing quota.
    Subnet int
    Quota value for subnets. Changing this updates the existing quota.
    Subnetpool int
    Quota value for subnetpools. Changing this updates the existing quota.
    floatingip Integer
    Quota value for floating IPs. Changing this updates the existing quota.
    network Integer
    Quota value for networks. Changing this updates the existing quota.
    port Integer
    Quota value for ports. Changing this updates the existing quota.
    projectId String
    ID of the project to manage quota. Changing this creates new quota.
    rbacPolicy Integer
    Quota value for RBAC policies. Changing this updates the existing quota.
    region String
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router Integer
    Quota value for routers. Changing this updates the existing quota.
    securityGroup Integer
    Quota value for security groups. Changing this updates the existing quota.
    securityGroupRule Integer
    Quota value for security group rules. Changing this updates the existing quota.
    subnet Integer
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool Integer
    Quota value for subnetpools. Changing this updates the existing quota.
    floatingip number
    Quota value for floating IPs. Changing this updates the existing quota.
    network number
    Quota value for networks. Changing this updates the existing quota.
    port number
    Quota value for ports. Changing this updates the existing quota.
    projectId string
    ID of the project to manage quota. Changing this creates new quota.
    rbacPolicy number
    Quota value for RBAC policies. Changing this updates the existing quota.
    region string
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router number
    Quota value for routers. Changing this updates the existing quota.
    securityGroup number
    Quota value for security groups. Changing this updates the existing quota.
    securityGroupRule number
    Quota value for security group rules. Changing this updates the existing quota.
    subnet number
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool number
    Quota value for subnetpools. Changing this updates the existing quota.
    floatingip int
    Quota value for floating IPs. Changing this updates the existing quota.
    network int
    Quota value for networks. Changing this updates the existing quota.
    port int
    Quota value for ports. Changing this updates the existing quota.
    project_id str
    ID of the project to manage quota. Changing this creates new quota.
    rbac_policy int
    Quota value for RBAC policies. Changing this updates the existing quota.
    region str
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router int
    Quota value for routers. Changing this updates the existing quota.
    security_group int
    Quota value for security groups. Changing this updates the existing quota.
    security_group_rule int
    Quota value for security group rules. Changing this updates the existing quota.
    subnet int
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool int
    Quota value for subnetpools. Changing this updates the existing quota.
    floatingip Number
    Quota value for floating IPs. Changing this updates the existing quota.
    network Number
    Quota value for networks. Changing this updates the existing quota.
    port Number
    Quota value for ports. Changing this updates the existing quota.
    projectId String
    ID of the project to manage quota. Changing this creates new quota.
    rbacPolicy Number
    Quota value for RBAC policies. Changing this updates the existing quota.
    region String
    The region in which to create the quota. If omitted, the region argument of the provider is used. Changing this creates new quota.
    router Number
    Quota value for routers. Changing this updates the existing quota.
    securityGroup Number
    Quota value for security groups. Changing this updates the existing quota.
    securityGroupRule Number
    Quota value for security group rules. Changing this updates the existing quota.
    subnet Number
    Quota value for subnets. Changing this updates the existing quota.
    subnetpool Number
    Quota value for subnetpools. Changing this updates the existing quota.

    Import

    Quotas can be imported using the project_id/region_name, e.g.

    $ pulumi import openstack:networking/quotaV2:QuotaV2 quota_1 2a0f2240-c5e6-41de-896d-e80d97428d6b/region_1
    

    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