mirror of https://github.com/pulumi/pulumi.git
58 KiB
58 KiB
title: "ModuleResource" title_tag: "foobar.ModuleResource" meta_desc: "Documentation for the foobar.ModuleResource resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true
Create ModuleResource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ModuleResource(name: string, args: ModuleResourceArgs, opts?: CustomResourceOptions);
@overload
def ModuleResource(resource_name: str,
args: ModuleResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ModuleResource(resource_name: str,
opts: Optional[ResourceOptions] = None,
plain_required_bool: Optional[bool] = None,
required_string: Optional[str] = None,
required_number: Optional[float] = None,
required_enum: Optional[EnumThing] = None,
required_bool: Optional[bool] = None,
plain_required_string: Optional[str] = None,
plain_required_number: Optional[float] = None,
optional_string: Optional[str] = None,
plain_optional_string: Optional[str] = None,
plain_optional_number: Optional[float] = None,
plain_optional_bool: Optional[bool] = None,
optional_bool: Optional[bool] = None,
optional_number: Optional[float] = None,
optional_enum: Optional[EnumThing] = None)
func NewModuleResource(ctx *Context, name string, args ModuleResourceArgs, opts ...ResourceOption) (*ModuleResource, error)
public ModuleResource(string name, ModuleResourceArgs args, CustomResourceOptions? opts = null)
public ModuleResource(String name, ModuleResourceArgs args)
public ModuleResource(String name, ModuleResourceArgs args, CustomResourceOptions options)
type: foobar:ModuleResource
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 ModuleResourceArgs
- 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 ModuleResourceArgs
- 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 ModuleResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ModuleResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ModuleResourceArgs
- 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 moduleResourceResource = new FooBar.ModuleResource("moduleResourceResource", new()
{
PlainRequiredBool = false,
RequiredString = "string",
RequiredNumber = 0,
RequiredEnum = FooBar.EnumThing.Four,
RequiredBool = false,
PlainRequiredString = "string",
PlainRequiredNumber = 0,
PlainRequiredConst = "string",
OptionalString = "string",
PlainOptionalString = "string",
PlainOptionalNumber = 0,
PlainOptionalConst = "string",
PlainOptionalBool = false,
OptionalBool = false,
OptionalNumber = 0,
OptionalEnum = FooBar.EnumThing.Four,
OptionalConst = "string",
});
example, err := foobar.NewModuleResource(ctx, "moduleResourceResource", &foobar.ModuleResourceArgs{
PlainRequiredBool: false,
RequiredString: pulumi.String("string"),
RequiredNumber: pulumi.Float64(0),
RequiredEnum: foobar.EnumThingFour,
RequiredBool: pulumi.Bool(false),
PlainRequiredString: "string",
PlainRequiredNumber: 0,
PlainRequiredConst: "string",
OptionalString: pulumi.String("string"),
PlainOptionalString: "string",
PlainOptionalNumber: 0,
PlainOptionalConst: "string",
PlainOptionalBool: false,
OptionalBool: pulumi.Bool(false),
OptionalNumber: pulumi.Float64(0),
OptionalEnum: foobar.EnumThingFour,
OptionalConst: pulumi.String("string"),
})
var moduleResourceResource = new ModuleResource("moduleResourceResource", ModuleResourceArgs.builder()
.plainRequiredBool(false)
.requiredString("string")
.requiredNumber(0)
.requiredEnum(4)
.requiredBool(false)
.plainRequiredString("string")
.plainRequiredNumber(0)
.plainRequiredConst("string")
.optionalString("string")
.plainOptionalString("string")
.plainOptionalNumber(0)
.plainOptionalConst("string")
.plainOptionalBool(false)
.optionalBool(false)
.optionalNumber(0)
.optionalEnum(4)
.optionalConst("string")
.build());
module_resource_resource = foobar.ModuleResource("moduleResourceResource",
plain_required_bool=False,
required_string="string",
required_number=0,
required_enum=foobar.EnumThing.FOUR,
required_bool=False,
plain_required_string="string",
plain_required_number=0,
plain_required_const="string",
optional_string="string",
plain_optional_string="string",
plain_optional_number=0,
plain_optional_const="string",
plain_optional_bool=False,
optional_bool=False,
optional_number=0,
optional_enum=foobar.EnumThing.FOUR,
optional_const="string")
const moduleResourceResource = new foobar.ModuleResource("moduleResourceResource", {
plainRequiredBool: false,
requiredString: "string",
requiredNumber: 0,
requiredEnum: foobar.EnumThing.Four,
requiredBool: false,
plainRequiredString: "string",
plainRequiredNumber: 0,
plainRequiredConst: "string",
optionalString: "string",
plainOptionalString: "string",
plainOptionalNumber: 0,
plainOptionalConst: "string",
plainOptionalBool: false,
optionalBool: false,
optionalNumber: 0,
optionalEnum: foobar.EnumThing.Four,
optionalConst: "string",
});
type: foobar:ModuleResource
properties:
optionalBool: false
optionalConst: string
optionalEnum: 4
optionalNumber: 0
optionalString: string
plainOptionalBool: false
plainOptionalConst: string
plainOptionalNumber: 0
plainOptionalString: string
plainRequiredBool: false
plainRequiredConst: string
plainRequiredNumber: 0
plainRequiredString: string
requiredBool: false
requiredEnum: 4
requiredNumber: 0
requiredString: string
ModuleResource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ModuleResource resource accepts the following input properties:
-
Plain
Required boolBool -
Plain
Required doubleNumber -
Plain
Required stringString -
Required
Bool bool -
Required
Enum Pulumi.Foo Bar. Enum Thing -
Required
Number double -
Required
String string -
Optional
Bool bool -
Optional
Enum Pulumi.Foo Bar. Enum Thing -
Optional
Number double -
Optional
String string -
Plain
Optional boolBool -
Plain
Optional doubleNumber -
Plain
Optional stringString
-
Plain
Required boolBool -
Plain
Required float64Number -
Plain
Required stringString -
Required
Bool bool -
Required
Enum EnumThing -
Required
Number float64 -
Required
String string -
Optional
Bool bool -
Optional
Enum EnumThing -
Optional
Number float64 -
Optional
String string -
Plain
Optional boolBool -
Plain
Optional float64Number -
Plain
Optional stringString
-
plain
Required BooleanBool -
plain
Required DoubleNumber -
plain
Required StringString -
required
Bool Boolean -
required
Enum EnumThing -
required
Number Double -
required
String String -
optional
Bool Boolean -
optional
Enum EnumThing -
optional
Number Double -
optional
String String -
plain
Optional BooleanBool -
plain
Optional DoubleNumber -
plain
Optional StringString
-
plain
Required booleanBool -
plain
Required numberNumber -
plain
Required stringString -
required
Bool boolean -
required
Enum EnumThing -
required
Number number -
required
String string -
optional
Bool boolean -
optional
Enum EnumThing -
optional
Number number -
optional
String string -
plain
Optional booleanBool -
plain
Optional numberNumber -
plain
Optional stringString
-
plain_
required_ boolbool -
plain_
required_ floatnumber -
plain_
required_ strstring -
required_
bool bool -
required_
enum EnumThing -
required_
number float -
required_
string str -
optional_
bool bool -
optional_
enum EnumThing -
optional_
number float -
optional_
string str -
plain_
optional_ boolbool -
plain_
optional_ floatnumber -
plain_
optional_ strstring
-
plain
Required BooleanBool -
plain
Required NumberNumber -
plain
Required StringString -
required
Bool Boolean -
required
Enum 4 | 6 | 8 -
required
Number Number -
required
String String -
optional
Bool Boolean -
optional
Enum 4 | 6 | 8 -
optional
Number Number -
optional
String String -
plain
Optional BooleanBool -
plain
Optional NumberNumber -
plain
Optional StringString
Outputs
All input properties are implicitly available as output properties. Additionally, the ModuleResource 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.
Supporting Types
EnumThing, EnumThingArgs
- Four
- 4
- Six
- 6
- Eight
- 8
- Enum
Thing Four - 4
- Enum
Thing Six - 6
- Enum
Thing Eight - 8
- Four
- 4
- Six
- 6
- Eight
- 8
- Four
- 4
- Six
- 6
- Eight
- 8
- FOUR
- 4
- SIX
- 6
- EIGHT
- 8
- '\x04'
- 4
- '\x06'
- 6
- '\b'
- 8
Package Details
- Repository
- foobar
- License