pulumi/pkg/codegen/internal/test/testdata/simple-plain-schema/docs/component.md

33 KiB


title: "Component" title_tag: "example.Component" meta_desc: "Documentation for the example.Component resource with examples, input properties, output properties, lookup functions, and supporting types."

Create a Component Resource

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

{{% choosable language nodejs %}}

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

{{% choosable language python %}}

@overload
def Component(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              a: Optional[bool] = None,
              b: Optional[bool] = None,
              bar: Optional[FooArgs] = None,
              baz: Optional[Sequence[FooArgs]] = None,
              baz_map: Optional[Mapping[str, FooArgs]] = None,
              c: Optional[int] = None,
              d: Optional[int] = None,
              e: Optional[str] = None,
              f: Optional[str] = None,
              foo: Optional[FooArgs] = None)
@overload
def Component(resource_name: str,
              args: ComponentArgs,
              opts: Optional[ResourceOptions] = None)
{{% /choosable %}}

{{% choosable language go %}}

func NewComponent(ctx *Context, name string, args ComponentArgs, opts ...ResourceOption) (*Component, error)
{{% /choosable %}}

{{% choosable language csharp %}}

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

{{% choosable language nodejs %}}

name string
The unique name of the resource.
args ComponentArgs
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 ComponentArgs
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 ComponentArgs
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 ComponentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

{{% /choosable %}}

Component 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 Programming Model docs.

Inputs

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

{{% choosable language csharp %}}

A bool
{{% md %}}{{% /md %}}
C int
{{% md %}}{{% /md %}}
E string
{{% md %}}{{% /md %}}
B bool
{{% md %}}{{% /md %}}
Bar FooArgs
{{% md %}}{{% /md %}}
Baz List<FooArgs>
{{% md %}}{{% /md %}}
BazMap Dictionary<string, FooArgs>
{{% md %}}{{% /md %}}
D int
{{% md %}}{{% /md %}}
F string
{{% md %}}{{% /md %}}
Foo FooArgs
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language go %}}

A bool
{{% md %}}{{% /md %}}
C int
{{% md %}}{{% /md %}}
E string
{{% md %}}{{% /md %}}
B bool
{{% md %}}{{% /md %}}
Bar Foo
{{% md %}}{{% /md %}}
Baz []Foo
{{% md %}}{{% /md %}}
BazMap map[string]Foo
{{% md %}}{{% /md %}}
D int
{{% md %}}{{% /md %}}
F string
{{% md %}}{{% /md %}}
Foo Foo
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language nodejs %}}

a boolean
{{% md %}}{{% /md %}}
c number
{{% md %}}{{% /md %}}
e string
{{% md %}}{{% /md %}}
b boolean
{{% md %}}{{% /md %}}
bar FooArgs
{{% md %}}{{% /md %}}
baz FooArgs[]
{{% md %}}{{% /md %}}
bazMap {[key: string]: FooArgs}
{{% md %}}{{% /md %}}
d number
{{% md %}}{{% /md %}}
f string
{{% md %}}{{% /md %}}
foo FooArgs
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language python %}}

a bool
{{% md %}}{{% /md %}}
c int
{{% md %}}{{% /md %}}
e str
{{% md %}}{{% /md %}}
b bool
{{% md %}}{{% /md %}}
bar FooArgs
{{% md %}}{{% /md %}}
baz Sequence[FooArgs]
{{% md %}}{{% /md %}}
baz_map Mapping[str, FooArgs]
{{% md %}}{{% /md %}}
d int
{{% md %}}{{% /md %}}
f str
{{% md %}}{{% /md %}}
foo FooArgs
{{% md %}}{{% /md %}}
{{% /choosable %}}

Outputs

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

Foo

{{% choosable language csharp %}}

A bool
{{% md %}}{{% /md %}}
C int
{{% md %}}{{% /md %}}
E string
{{% md %}}{{% /md %}}
B bool
{{% md %}}{{% /md %}}
D int
{{% md %}}{{% /md %}}
F string
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language go %}}

A bool
{{% md %}}{{% /md %}}
C int
{{% md %}}{{% /md %}}
E string
{{% md %}}{{% /md %}}
B bool
{{% md %}}{{% /md %}}
D int
{{% md %}}{{% /md %}}
F string
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language nodejs %}}

a boolean
{{% md %}}{{% /md %}}
c number
{{% md %}}{{% /md %}}
e string
{{% md %}}{{% /md %}}
b boolean
{{% md %}}{{% /md %}}
d number
{{% md %}}{{% /md %}}
f string
{{% md %}}{{% /md %}}
{{% /choosable %}}

{{% choosable language python %}}

a bool
{{% md %}}{{% /md %}}
c int
{{% md %}}{{% /md %}}
e str
{{% md %}}{{% /md %}}
b bool
{{% md %}}{{% /md %}}
d int
{{% md %}}{{% /md %}}
f str
{{% md %}}{{% /md %}}
{{% /choosable %}}

Package Details

Repository
License