pulumi/pkg/codegen/internal/test/testdata/plain-and-default/docs/moduleresource/_index.md
2021-11-08 15:43:36 -08:00

38 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 a ModuleResource Resource

{{< chooser language "typescript,python,go,csharp" / >}}

{{% choosable language nodejs %}}

new ModuleResource(name: string, args: ModuleResourceArgs, opts?: CustomResourceOptions);
{{% /choosable %}}

{{% choosable language python %}}

@overload
def ModuleResource(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   default_bool: Optional[bool] = None,
                   default_enum: Optional[EnumThing] = None,
                   default_number: Optional[float] = None,
                   default_string: Optional[str] = None,
                   optional_enum: Optional[EnumThing] = None,
                   plain_optional_bool: Optional[bool] = None,
                   plain_optional_number: Optional[float] = None,
                   plain_optional_string: Optional[str] = None,
                   plain_required_bool: Optional[bool] = None,
                   plain_required_enum: Optional[EnumThing] = None,
                   plain_required_number: Optional[float] = None,
                   plain_required_string: Optional[str] = None,
                   required_bool: Optional[bool] = None,
                   required_enum: Optional[EnumThing] = None,
                   required_number: Optional[float] = None,
                   required_string: Optional[str] = None)
@overload
def ModuleResource(resource_name: str,
                   args: ModuleResourceArgs,
                   opts: Optional[ResourceOptions] = None)
{{% /choosable %}}

{{% choosable language go %}}

func NewModuleResource(ctx *Context, name string, args ModuleResourceArgs, opts ...ResourceOption) (*ModuleResource, error)
{{% /choosable %}}

{{% choosable language csharp %}}

public ModuleResource(string name, ModuleResourceArgs args, CustomResourceOptions? opts = null)
{{% /choosable %}}

{{% choosable language nodejs %}}

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.

{{% /choosable %}}

{{% choosable language python %}}

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.

{{% /choosable %}}

{{% choosable language go %}}

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.

{{% /choosable %}}

{{% choosable language csharp %}}

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.

{{% /choosable %}}

ModuleResource Resource Properties

To learn more about resource properties and how to use them, see [Inputs and Outputs]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) in the Architecture and Concepts docs.

Inputs

The ModuleResource resource accepts the following [input]({{< relref "/docs/intro/concepts/inputs-outputs" >}}) properties:

{{% choosable language csharp %}}

Plain_required_bool bool
{{% md %}}{{% /md %}}
Plain_required_enum Pulumi.FooBar.EnumThing
{{% md %}}{{% /md %}}
Plain_required_number double
{{% md %}}{{% /md %}}
Plain_required_string string
{{% md %}}{{% /md %}}
Required_bool bool
{{% md %}}{{% /md %}}
Required_enum Pulumi.FooBar.EnumThing
{{% md %}}{{% /md %}}
Required_number double
{{% md %}}{{% /md %}}
Required_string string
{{% md %}}{{% /md %}}
Default_bool bool
{{% md %}}{{% /md %}}
Default_enum Pulumi.FooBar.EnumThing
{{% md %}}{{% /md %}}
Default_number double
{{% md %}}{{% /md %}}
Default_string string
{{% md %}}{{% /md %}}
Optional_enum Pulumi.FooBar.EnumThing
{{% md %}}{{% /md %}}
Plain_optional_bool bool
{{% md %}}{{% /md %}}
Plain_optional_number double
{{% md %}}{{% /md %}}
Plain_optional_string string
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language go %}}

Plain_required_bool bool
{{% md %}}{{% /md %}}
Plain_required_enum EnumThing
{{% md %}}{{% /md %}}
Plain_required_number float64
{{% md %}}{{% /md %}}
Plain_required_string string
{{% md %}}{{% /md %}}
Required_bool bool
{{% md %}}{{% /md %}}
Required_enum EnumThing
{{% md %}}{{% /md %}}
Required_number float64
{{% md %}}{{% /md %}}
Required_string string
{{% md %}}{{% /md %}}
Default_bool bool
{{% md %}}{{% /md %}}
Default_enum EnumThing
{{% md %}}{{% /md %}}
Default_number float64
{{% md %}}{{% /md %}}
Default_string string
{{% md %}}{{% /md %}}
Optional_enum EnumThing
{{% md %}}{{% /md %}}
Plain_optional_bool bool
{{% md %}}{{% /md %}}
Plain_optional_number float64
{{% md %}}{{% /md %}}
Plain_optional_string string
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language nodejs %}}

plain_required_bool boolean
{{% md %}}{{% /md %}}
plain_required_enum EnumThing
{{% md %}}{{% /md %}}
plain_required_number number
{{% md %}}{{% /md %}}
plain_required_string string
{{% md %}}{{% /md %}}
required_bool boolean
{{% md %}}{{% /md %}}
required_enum EnumThing
{{% md %}}{{% /md %}}
required_number number
{{% md %}}{{% /md %}}
required_string string
{{% md %}}{{% /md %}}
default_bool boolean
{{% md %}}{{% /md %}}
default_enum EnumThing
{{% md %}}{{% /md %}}
default_number number
{{% md %}}{{% /md %}}
default_string string
{{% md %}}{{% /md %}}
optional_enum EnumThing
{{% md %}}{{% /md %}}
plain_optional_bool boolean
{{% md %}}{{% /md %}}
plain_optional_number number
{{% md %}}{{% /md %}}
plain_optional_string string
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language python %}}

plain_required_bool bool
{{% md %}}{{% /md %}}
plain_required_enum EnumThing
{{% md %}}{{% /md %}}
plain_required_number float
{{% md %}}{{% /md %}}
plain_required_string str
{{% md %}}{{% /md %}}
required_bool bool
{{% md %}}{{% /md %}}
required_enum EnumThing
{{% md %}}{{% /md %}}
required_number float
{{% md %}}{{% /md %}}
required_string str
{{% md %}}{{% /md %}}
default_bool bool
{{% md %}}{{% /md %}}
default_enum EnumThing
{{% md %}}{{% /md %}}
default_number float
{{% md %}}{{% /md %}}
default_string str
{{% md %}}{{% /md %}}
optional_enum EnumThing
{{% md %}}{{% /md %}}
plain_optional_bool bool
{{% md %}}{{% /md %}}
plain_optional_number float
{{% md %}}{{% /md %}}
plain_optional_string str
{{% md %}}{{% /md %}}
{{% /choosable %}}

Outputs

All input properties are implicitly available as output properties. Additionally, the ModuleResource resource produces the following output properties:

{{% choosable language csharp %}}

Id string
{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}
{{% /choosable %}}

{{% choosable language go %}}

Id string
{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}
{{% /choosable %}}

{{% choosable language nodejs %}}

id string
{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}
{{% /choosable %}}

{{% choosable language python %}}

id str
{{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}
{{% /choosable %}}

Supporting Types

EnumThing

{{% choosable language csharp %}}

Four
4
Six
6
Eight
8
{{% /choosable %}}

{{% choosable language go %}}

EnumThingFour
4
EnumThingSix
6
EnumThingEight
8
{{% /choosable %}}

{{% choosable language nodejs %}}

Four
4
Six
6
Eight
8
{{% /choosable %}}

{{% choosable language python %}}

FOUR
4
SIX
6
EIGHT
8
{{% /choosable %}}

Package Details

Repository
License