Show / Hide Table of Contents

Class Flavor

Manages a V2 flavor resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var test_flavor = new OpenStack.Compute.Flavor("test-flavor", new OpenStack.Compute.FlavorArgs
    {
        Disk = "20",
        ExtraSpecs = 
        {
            { "hw:cpu_policy", "CPU-POLICY" },
            { "hw:cpu_thread_policy", "CPU-THREAD-POLICY" },
        },
        Ram = "8096",
        Vcpus = "2",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Flavor
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.Compute
Assembly: Pulumi.OpenStack.dll
Syntax
public class Flavor : CustomResource

Constructors

View Source

Flavor(String, FlavorArgs, CustomResourceOptions)

Create a Flavor resource with the given unique name, arguments, and options.

Declaration
public Flavor(string name, FlavorArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

FlavorArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Disk

The amount of disk space in gigabytes to use for the root (/) partition. Changing this creates a new flavor.

Declaration
public Output<int> Disk { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Ephemeral

Declaration
public Output<int?> Ephemeral { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

ExtraSpecs

Key/Value pairs of metadata for the flavor.

Declaration
public Output<ImmutableDictionary<string, object>> ExtraSpecs { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

IsPublic

Whether the flavor is public. Changing this creates a new flavor.

Declaration
public Output<bool?> IsPublic { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Name

A unique name for the flavor. Changing this creates a new flavor.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Ram

The amount of RAM to use, in megabytes. Changing this creates a new flavor.

Declaration
public Output<int> Ram { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Region

The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new flavor.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

RxTxFactor

RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.

Declaration
public Output<double?> RxTxFactor { get; }
Property Value
Type Description
Output<System.Nullable<System.Double>>
View Source

Swap

The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.

Declaration
public Output<int?> Swap { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Vcpus

The number of virtual CPUs to use. Changing this creates a new flavor.

Declaration
public Output<int> Vcpus { get; }
Property Value
Type Description
Output<System.Int32>

Methods

View Source

Get(String, Input<String>, FlavorState, CustomResourceOptions)

Get an existing Flavor resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Flavor Get(string name, Input<string> id, FlavorState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

FlavorState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Flavor
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.