31 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 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,
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 language go %}}
func NewComponent(ctx *Context, name string, args ComponentArgs, opts ...ResourceOption) (*Component, error)
{{% choosable language csharp %}}
public Component(string name, ComponentArgs args, CustomResourceOptions? opts = null)
{{% 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
Foo
Args - {{% md %}}{{% /md %}}
-
Baz
List<Foo
Args> - {{% md %}}{{% /md %}}
- D int
- {{% md %}}{{% /md %}}
- F string
- {{% md %}}{{% /md %}}
-
Foo
Foo
Args - {{% md %}}{{% /md %}}
{{% 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 %}}
- D int
- {{% md %}}{{% /md %}}
- F string
- {{% md %}}{{% /md %}}
- Foo Foo
- {{% md %}}{{% /md %}}
{{% choosable language nodejs %}}
- a boolean
- {{% md %}}{{% /md %}}
- c number
- {{% md %}}{{% /md %}}
- e string
- {{% md %}}{{% /md %}}
- b boolean
- {{% md %}}{{% /md %}}
-
bar
Foo
Args - {{% md %}}{{% /md %}}
-
baz
Foo
Args[] - {{% md %}}{{% /md %}}
- d number
- {{% md %}}{{% /md %}}
- f string
- {{% md %}}{{% /md %}}
-
foo
Foo
Args - {{% md %}}{{% /md %}}
{{% choosable language python %}}
- a bool
- {{% md %}}{{% /md %}}
- c int
- {{% md %}}{{% /md %}}
- e str
- {{% md %}}{{% /md %}}
- b bool
- {{% md %}}{{% /md %}}
-
bar
Foo
Args - {{% md %}}{{% /md %}}
-
baz
Sequence[Foo
Args] - {{% md %}}{{% /md %}}
- d int
- {{% md %}}{{% /md %}}
- f str
- {{% md %}}{{% /md %}}
-
foo
Foo
Args - {{% md %}}{{% /md %}}
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 language go %}}
- Id string
- {{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}
{{% choosable language nodejs %}}
- id string
- {{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}
{{% choosable language python %}}
- id str
- {{% md %}}The provider-assigned unique ID for this managed resource.{{% /md %}}
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 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 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 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 %}}
Package Details
- Repository
- License