pulumi/tests/testdata/codegen/simple-methods-schema/docs/foo/_index.md

69 KiB


title: "Foo" title_tag: "example.Foo" meta_desc: "Documentation for the example.Foo resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true

Create Foo Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Foo(name: string, args?: FooArgs, opts?: ComponentResourceOptions);
@overload
def Foo(resource_name: str,
        args: Optional[FooArgs] = None,
        opts: Optional[ResourceOptions] = None)

@overload
def Foo(resource_name: str,
        opts: Optional[ResourceOptions] = None)
func NewFoo(ctx *Context, name string, args *FooArgs, opts ...ResourceOption) (*Foo, error)
public Foo(string name, FooArgs? args = null, ComponentResourceOptions? opts = null)
public Foo(String name, FooArgs args)
public Foo(String name, FooArgs args, ComponentResourceOptions options)
type: example:Foo
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 FooArgs
The arguments to resource properties.
opts ComponentResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args FooArgs
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 FooArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FooArgs
The arguments to resource properties.
opts ComponentResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FooArgs
The arguments to resource properties.
options ComponentResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var fooResource = new Example.Foo("fooResource");
example, err := example.NewFoo(ctx, "fooResource", nil)
var fooResource = new Foo("fooResource");
foo_resource = example.Foo("fooResource")
const fooResource = new example.Foo("fooResource", {});
type: example:Foo
properties: {}

Foo 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 Foo resource accepts the following input properties:

Outputs

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

Foo Resource Methods

Bar Method

A description of bar.

Using Bar

bar(args: Foo.BarArgs): Output<Foo.BarResult>
def bar(self,
        baz_required: pulumi.Input[_nested.BazArgs],
        bool_value_required: pulumi.Input[bool],
        name_required: pulumi.Input[pulumi_random.RandomPet],
        string_value_required: pulumi.Input[str],
        baz: Optional[pulumi.Input[_nested.BazArgs]] = None,
        baz_plain: Optional[_nested.BazArgs] = None,
        bool_value: Optional[pulumi.Input[bool]] = None,
        bool_value_plain: Optional[bool] = None,
        name: Optional[pulumi.Input[pulumi_random.RandomPet]] = None,
        name_plain: Optional[pulumi_random.RandomPet] = None,
        string_value: Optional[pulumi.Input[str]] = None,
        string_value_plain: Optional[str] = None) -> Output[Foo.BarResult]
func (r *Foo) Bar(ctx *Context, args FooBarArgs) (FooBarResultOutput, error)
public Output<Foo.BarResult> Bar(Foo.BarArgs args)

The following arguments are supported:

BazRequired Pulumi.Example.Nested.Inputs.Baz
BoolValueRequired bool
NameRequired Pulumi.Random.RandomPet
This type is defined in the random package.
StringValueRequired string
Baz Pulumi.Example.Nested.Inputs.Baz
BazPlain Pulumi.Example.Nested.Inputs.Baz
BoolValue bool
BoolValuePlain bool
Name Pulumi.Random.RandomPet
This type is defined in the random package.
NamePlain Pulumi.Random.RandomPet
This type is defined in the random package.
StringValue string
StringValuePlain string
BazRequired Baz
BoolValueRequired bool
NameRequired RandomPet
This type is defined in the random package.
StringValueRequired string
Baz Baz
BazPlain Baz
BoolValue bool
BoolValuePlain bool
Name RandomPet
This type is defined in the random package.
NamePlain RandomPet
This type is defined in the random package.
StringValue string
StringValuePlain string
bazRequired Baz
boolValueRequired Boolean
nameRequired RandomPet
This type is defined in the random package.
stringValueRequired String
baz Baz
bazPlain Baz
boolValue Boolean
boolValuePlain Boolean
name RandomPet
This type is defined in the random package.
namePlain RandomPet
This type is defined in the random package.
stringValue String
stringValuePlain String
bazRequired nestedBaz
boolValueRequired boolean
nameRequired pulumiRandomRandomPet
This type is defined in the random package.
stringValueRequired string
baz nestedBaz
bazPlain nestedBaz
boolValue boolean
boolValuePlain boolean
name pulumiRandomRandomPet
This type is defined in the random package.
namePlain pulumiRandomRandomPet
This type is defined in the random package.
stringValue string
stringValuePlain string
baz_required nested.Baz
bool_value_required bool
name_required pulumi_random.RandomPet
This type is defined in the random package.
string_value_required str
baz nested.Baz
baz_plain nested.Baz
bool_value bool
bool_value_plain bool
name pulumi_random.RandomPet
This type is defined in the random package.
name_plain pulumi_random.RandomPet
This type is defined in the random package.
string_value str
string_value_plain str
bazRequired Property Map
boolValueRequired Boolean
nameRequired random:RandomPet
This type is defined in the random package.
stringValueRequired String
baz Property Map
bazPlain Property Map
boolValue Boolean
boolValuePlain Boolean
name random:RandomPet
This type is defined in the random package.
namePlain random:RandomPet
This type is defined in the random package.
stringValue String
stringValuePlain String

Bar Result

SomeValue string
SomeValue string
someValue String
someValue string
someValue String

Baz Method

Using Baz

baz(): void
def baz() -> None
func (r *Foo) Baz() error
public void Baz()

GenerateKubeconfig Method

Do something with something else

Using GenerateKubeconfig

generateKubeconfig(args: Foo.GenerateKubeconfigArgs): Output<Foo.GenerateKubeconfigResult>
def generate_kubeconfig(self,
                        bool_value: bool) -> Output[Foo.Generate_kubeconfigResult]
func (r *Foo) GenerateKubeconfig(ctx *Context, args FooGenerateKubeconfigArgs) (FooGenerateKubeconfigResultOutput, error)
public Output<Foo.GenerateKubeconfigResult> GenerateKubeconfig(Foo.GenerateKubeconfigArgs args)

The following arguments are supported:

BoolValue bool
BoolValue bool
boolValue Boolean
boolValue boolean
bool_value bool
boolValue Boolean

GenerateKubeconfig Result

Kubeconfig string
Kubeconfig string
kubeconfig String
kubeconfig string
kubeconfig String

Supporting Types

Baz, BazArgs

Hello string
World string
Hello string
World string
hello String
world String
hello string
world string
hello str
world str
hello String
world String

Package Details

Repository
example
License