mirror of https://github.com/pulumi/pulumi.git
68 KiB
68 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
test new feature with resoruces
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?: CustomResourceOptions);
@overload
def Foo(resource_name: str,
args: FooArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Foo(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_kube_client_settings: Optional[KubeClientSettingsArgs] = None,
argument: Optional[str] = None,
kube_client_settings: Optional[KubeClientSettingsArgs] = None,
settings: Optional[LayeredTypeArgs] = None)
func NewFoo(ctx *Context, name string, args FooArgs, opts ...ResourceOption) (*Foo, error)
public Foo(string name, FooArgs args, CustomResourceOptions? 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 CustomResourceOptions
- 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 CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FooArgs
- The arguments to resource properties.
- options CustomResourceOptions
- 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", new()
{
BackupKubeClientSettings = new Example.Inputs.KubeClientSettingsArgs
{
Burst = 0,
Qps = 0,
RecTest = kubeClientSettings,
},
Argument = "string",
KubeClientSettings = kubeClientSettings,
Settings = new Example.Inputs.LayeredTypeArgs
{
Other = new Example.Inputs.HelmReleaseSettingsArgs
{
RequiredArg = "string",
Driver = "string",
PluginsPath = "string",
},
Thinker = "string",
Answer = 0,
PlainOther =
{
{ "requiredArg", "string" },
{ "driver", "string" },
{ "pluginsPath", "string" },
},
Question = "string",
Recursive = layeredType,
},
});
example, err := example.NewFoo(ctx, "fooResource", &example.FooArgs{
BackupKubeClientSettings: &example.KubeClientSettingsArgs{
Burst: pulumi.Int(0),
Qps: pulumi.Float64(0),
RecTest: pulumi.Any(kubeClientSettings),
},
Argument: "string",
KubeClientSettings: pulumi.Any(kubeClientSettings),
Settings: &example.LayeredTypeArgs{
Other: &example.HelmReleaseSettingsArgs{
RequiredArg: pulumi.String("string"),
Driver: pulumi.String("string"),
PluginsPath: pulumi.String("string"),
},
Thinker: pulumi.String("string"),
Answer: pulumi.Float64(0),
PlainOther: interface{}{
RequiredArg: pulumi.String("string"),
Driver: pulumi.String("string"),
PluginsPath: pulumi.String("string"),
},
Question: pulumi.String("string"),
Recursive: pulumi.Any(layeredType),
},
})
var fooResource = new Foo("fooResource", FooArgs.builder()
.backupKubeClientSettings(KubeClientSettingsArgs.builder()
.burst(0)
.qps(0)
.recTest(kubeClientSettings)
.build())
.argument("string")
.kubeClientSettings(kubeClientSettings)
.settings(LayeredTypeArgs.builder()
.other(HelmReleaseSettingsArgs.builder()
.requiredArg("string")
.driver("string")
.pluginsPath("string")
.build())
.thinker("string")
.answer(0)
.plainOther(HelmReleaseSettingsArgs.builder()
.requiredArg("string")
.driver("string")
.pluginsPath("string")
.build())
.question("string")
.recursive(layeredType)
.build())
.build());
foo_resource = example.Foo("fooResource",
backup_kube_client_settings={
"burst": 0,
"qps": 0,
"rec_test": kube_client_settings,
},
argument="string",
kube_client_settings=kube_client_settings,
settings={
"other": {
"required_arg": "string",
"driver": "string",
"plugins_path": "string",
},
"thinker": "string",
"answer": 0,
"plain_other": {
"required_arg": "string",
"driver": "string",
"plugins_path": "string",
},
"question": "string",
"recursive": layered_type,
})
const fooResource = new example.Foo("fooResource", {
backupKubeClientSettings: {
burst: 0,
qps: 0,
recTest: kubeClientSettings,
},
argument: "string",
kubeClientSettings: kubeClientSettings,
settings: {
other: {
requiredArg: "string",
driver: "string",
pluginsPath: "string",
},
thinker: "string",
answer: 0,
plainOther: {
requiredArg: "string",
driver: "string",
pluginsPath: "string",
},
question: "string",
recursive: layeredType,
},
});
type: example:Foo
properties:
argument: string
backupKubeClientSettings:
burst: 0
qps: 0
recTest: ${kubeClientSettings}
kubeClientSettings: ${kubeClientSettings}
settings:
answer: 0
other:
driver: string
pluginsPath: string
requiredArg: string
plainOther:
driver: string
pluginsPath: string
requiredArg: string
question: string
recursive: ${layeredType}
thinker: string
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:
-
Backup
Kube KubeClient Settings Client Settings - Options for tuning the Kubernetes client used by a Provider.
- Argument string
-
Kube
Client KubeSettings Client Settings - Options for tuning the Kubernetes client used by a Provider.
-
Settings
Layered
Type - describing things
-
Backup
Kube KubeClient Settings Client Settings Args - Options for tuning the Kubernetes client used by a Provider.
- Argument string
-
Kube
Client KubeSettings Client Settings Args - Options for tuning the Kubernetes client used by a Provider.
-
Settings
Layered
Type Args - describing things
-
backup
Kube KubeClient Settings Client Settings - Options for tuning the Kubernetes client used by a Provider.
- argument String
-
kube
Client KubeSettings Client Settings - Options for tuning the Kubernetes client used by a Provider.
-
settings
Layered
Type - describing things
-
backup
Kube KubeClient Settings Client Settings - Options for tuning the Kubernetes client used by a Provider.
- argument string
-
kube
Client KubeSettings Client Settings - Options for tuning the Kubernetes client used by a Provider.
-
settings
Layered
Type - describing things
-
backup_
kube_ Kubeclient_ settings Client Settings Args - Options for tuning the Kubernetes client used by a Provider.
- argument str
-
kube_
client_ Kubesettings Client Settings Args - Options for tuning the Kubernetes client used by a Provider.
-
settings
Layered
Type Args - describing things
-
backup
Kube Property MapClient Settings - Options for tuning the Kubernetes client used by a Provider.
- argument String
-
kube
Client Property MapSettings - Options for tuning the Kubernetes client used by a Provider.
- settings Property Map
- describing things
Outputs
All input properties are implicitly available as output properties. Additionally, the Foo resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
-
Default
Kube KubeClient Settings Client Settings - A test for plain types
- Id string
- The provider-assigned unique ID for this managed resource.
-
Default
Kube KubeClient Settings Client Settings - A test for plain types
- id String
- The provider-assigned unique ID for this managed resource.
-
default
Kube KubeClient Settings Client Settings - A test for plain types
- id string
- The provider-assigned unique ID for this managed resource.
-
default
Kube KubeClient Settings Client Settings - A test for plain types
- id str
- The provider-assigned unique ID for this managed resource.
-
default_
kube_ Kubeclient_ settings Client Settings - A test for plain types
- id String
- The provider-assigned unique ID for this managed resource.
-
default
Kube Property MapClient Settings - A test for plain types
Supporting Types
HelmReleaseSettings, HelmReleaseSettingsArgs
-
Required
Arg string - to test required args
- Driver string
- The backend storage driver for Helm. Values are: configmap, secret, memory, sql.
-
Plugins
Path string - The path to the helm plugins directory.
-
Required
Arg string - to test required args
- Driver string
- The backend storage driver for Helm. Values are: configmap, secret, memory, sql.
-
Plugins
Path string - The path to the helm plugins directory.
-
required
Arg String - to test required args
- driver String
- The backend storage driver for Helm. Values are: configmap, secret, memory, sql.
-
plugins
Path String - The path to the helm plugins directory.
-
required
Arg string - to test required args
- driver string
- The backend storage driver for Helm. Values are: configmap, secret, memory, sql.
-
plugins
Path string - The path to the helm plugins directory.
-
required_
arg str - to test required args
- driver str
- The backend storage driver for Helm. Values are: configmap, secret, memory, sql.
-
plugins_
path str - The path to the helm plugins directory.
-
required
Arg String - to test required args
- driver String
- The backend storage driver for Helm. Values are: configmap, secret, memory, sql.
-
plugins
Path String - The path to the helm plugins directory.
KubeClientSettings, KubeClientSettingsArgs
- Burst int
- Maximum burst for throttle. Default value is 10.
- Qps double
- Maximum queries per second (QPS) to the API server from this client. Default value is 5.
-
Rec
Test KubeClient Settings
- Burst int
- Maximum burst for throttle. Default value is 10.
- Qps float64
- Maximum queries per second (QPS) to the API server from this client. Default value is 5.
-
Rec
Test KubeClient Settings
- burst Integer
- Maximum burst for throttle. Default value is 10.
- qps Double
- Maximum queries per second (QPS) to the API server from this client. Default value is 5.
-
rec
Test KubeClient Settings
- burst number
- Maximum burst for throttle. Default value is 10.
- qps number
- Maximum queries per second (QPS) to the API server from this client. Default value is 5.
-
rec
Test KubeClient Settings
- burst int
- Maximum burst for throttle. Default value is 10.
- qps float
- Maximum queries per second (QPS) to the API server from this client. Default value is 5.
-
rec_
test KubeClient Settings
- burst Number
- Maximum burst for throttle. Default value is 10.
- qps Number
- Maximum queries per second (QPS) to the API server from this client. Default value is 5.
-
rec
Test Property Map
LayeredType, LayeredTypeArgs
-
Other
Helm
Release Settings - Thinker string
- To ask and answer
- Answer double
- The answer to the question
-
Plain
Other HelmRelease Settings - Test how plain types interact
- Question string
- The question already answered
-
Recursive
Layered
Type
-
Other
Helm
Release Settings - Thinker string
- To ask and answer
- Answer float64
- The answer to the question
-
Plain
Other HelmRelease Settings - Test how plain types interact
- Question string
- The question already answered
-
Recursive
Layered
Type
-
other
Helm
Release Settings - thinker String
- To ask and answer
- answer Double
- The answer to the question
-
plain
Other HelmRelease Settings - Test how plain types interact
- question String
- The question already answered
-
recursive
Layered
Type
-
other
Helm
Release Settings - thinker string
- To ask and answer
- answer number
- The answer to the question
-
plain
Other HelmRelease Settings - Test how plain types interact
- question string
- The question already answered
-
recursive
Layered
Type
-
other
Helm
Release Settings - thinker str
- To ask and answer
- answer float
- The answer to the question
-
plain_
other HelmRelease Settings - Test how plain types interact
- question str
- The question already answered
-
recursive
Layered
Type
- other Property Map
- thinker String
- To ask and answer
- answer Number
- The answer to the question
-
plain
Other Property Map - Test how plain types interact
- question String
- The question already answered
- recursive Property Map
Package Details
- Repository
- example
- License