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",
});
}
}
Inherited Members
Namespace: Pulumi.OpenStack.Compute
Assembly: Pulumi.OpenStack.dll
Syntax
public class Flavor : CustomResource
Constructors
View SourceFlavor(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 SourceDisk
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> |
Ephemeral
Declaration
public Output<int?> Ephemeral { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
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>> |
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>> |
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> |
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> |
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> |
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>> |
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>> |
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 SourceGet(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 |