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)
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:
-
Baz
Required Pulumi.Example. Nested. Inputs. Baz -
Bool
Value boolRequired -
Name
Required Pulumi.Random. Random Pet - This type is defined in the random package.
-
String
Value stringRequired -
Baz
Pulumi.
Example. Nested. Inputs. Baz -
Baz
Plain Pulumi.Example. Nested. Inputs. Baz -
Bool
Value bool -
Bool
Value boolPlain -
Name
Pulumi.
Random. Random Pet - This type is defined in the random package.
-
Name
Plain Pulumi.Random. Random Pet - This type is defined in the random package.
-
String
Value string -
String
Value stringPlain
-
Baz
Required Baz -
Bool
Value boolRequired -
Name
Required RandomPet - This type is defined in the random package.
-
String
Value stringRequired - Baz Baz
-
Baz
Plain Baz -
Bool
Value bool -
Bool
Value boolPlain -
Name
Random
Pet - This type is defined in the random package.
-
Name
Plain RandomPet - This type is defined in the random package.
-
String
Value string -
String
Value stringPlain
-
baz
Required Baz -
bool
Value BooleanRequired -
name
Required RandomPet - This type is defined in the random package.
-
string
Value StringRequired - baz Baz
-
baz
Plain Baz -
bool
Value Boolean -
bool
Value BooleanPlain -
name
Random
Pet - This type is defined in the random package.
-
name
Plain RandomPet - This type is defined in the random package.
-
string
Value String -
string
Value StringPlain
-
baz
Required nestedBaz -
bool
Value booleanRequired -
name
Required pulumiRandom Random Pet - This type is defined in the random package.
-
string
Value stringRequired -
baz
nested
Baz -
baz
Plain nestedBaz -
bool
Value boolean -
bool
Value booleanPlain -
name
pulumi
Random Random Pet - This type is defined in the random package.
-
name
Plain pulumiRandom Random Pet - This type is defined in the random package.
-
string
Value string -
string
Value stringPlain
-
baz_
required nested.Baz -
bool_
value_ boolrequired -
name_
required pulumi_random. Random Pet - This type is defined in the random package.
-
string_
value_ strrequired -
baz
nested.
Baz -
baz_
plain nested.Baz -
bool_
value bool -
bool_
value_ boolplain -
name
pulumi_
random. Random Pet - This type is defined in the random package.
-
name_
plain pulumi_random. Random Pet - This type is defined in the random package.
-
string_
value str -
string_
value_ strplain
-
baz
Required Property Map -
bool
Value BooleanRequired -
name
Required random:RandomPet - This type is defined in the random package.
-
string
Value StringRequired - baz Property Map
-
baz
Plain Property Map -
bool
Value Boolean -
bool
Value BooleanPlain -
name
random:Random
Pet - This type is defined in the random package.
-
name
Plain random:RandomPet - This type is defined in the random package.
-
string
Value String -
string
Value StringPlain
Bar Result
-
Some
Value string
-
Some
Value string
-
some
Value String
-
some
Value string
-
some_
value str
-
some
Value 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:
-
Bool
Value bool
-
Bool
Value bool
-
bool
Value Boolean
-
bool
Value boolean
-
bool_
value bool
-
bool
Value Boolean
GenerateKubeconfig Result
- Kubeconfig string
- Kubeconfig string
- kubeconfig String
- kubeconfig string
- kubeconfig str
- kubeconfig String
Supporting Types
Baz, BazArgs
Package Details
- Repository
- example
- License