2021-09-15 16:49:36 +00:00
---
title: "Rec"
title_tag: "example.Rec"
meta_desc: "Documentation for the example.Rec resource with examples, input properties, output properties, lookup functions, and supporting types."
2021-10-18 05:36:31 +00:00
layout: api
no_edit_this_page: true
2021-09-15 16:49:36 +00:00
---
<!-- WARNING: this file was generated by test. -->
<!-- Do not edit by hand unless you're certain you know what you are doing! -->
2024-04-02 15:47:32 +00:00
## Create Rec Resource {#create}
2024-03-21 13:41:07 +00:00
2024-04-02 15:47:32 +00:00
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see [Resources ](/docs/concepts/resources/ ).
2024-03-21 13:41:07 +00:00
2024-04-02 15:47:32 +00:00
### Constructor syntax
2022-05-04 07:05:39 +00:00
< div >
2024-07-09 14:54:50 +00:00
< pulumi-chooser type = "language" options = "csharp,go,typescript,python,yaml,java" > < / pulumi-chooser >
2022-05-04 07:05:39 +00:00
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "javascript,typescript" >
2024-04-02 15:47:32 +00:00
< div class = "no-copy" > < div class = "highlight" > < pre class = "chroma" > < code class = "language-typescript" data-lang = "typescript" > < span class = "k" > new < / span > < span class = "nx" > Rec< / span > < span class = "p" > (< / span > < span class = "nx" > name< / span > < span class = "p" > :< / span > < span class = "nx" > string< / span > < span class = "p" > ,< / span > < span class = "nx" > args< / span > < span class = "p" > ?:< / span > < span class = "nx" > < a href = "#inputs" > RecArgs< / a > < / span > < span class = "p" > ,< / span > < span class = "nx" > opts< / span > < span class = "p" > ?:< / span > < span class = "nx" > < a href = "/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions" > CustomResourceOptions< / a > < / span > < span class = "p" > );< / span > < / code > < / pre > < / div >
< / div > < / pulumi-choosable >
2022-04-29 22:04:15 +00:00
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "python" >
2024-04-02 15:47:32 +00:00
< div class = "no-copy" > < div class = "highlight" > < pre class = "chroma" > < code class = "language-python" data-lang = "python" > < span class = nd > @overload< / span >
2021-09-15 16:49:36 +00:00
< span class = "k" > def < / span > < span class = "nx" > Rec< / span > < span class = "p" > (< / span > < span class = "nx" > resource_name< / span > < span class = "p" > :< / span > < span class = "nx" > str< / span > < span class = "p" > ,< / span >
2024-04-02 15:47:32 +00:00
< span class = "nx" > args< / span > < span class = "p" > :< / span > < span class = "nx" > < a href = "#inputs" > Optional[RecArgs]< / a > < / span > = None< span class = "p" > ,< / span >
2021-09-15 16:49:36 +00:00
< span class = "nx" > opts< / span > < span class = "p" > :< / span > < span class = "nx" > < a href = "/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions" > Optional[ResourceOptions]< / a > < / span > = None< span class = "p" > )< / span >
2024-04-02 15:47:32 +00:00
< span > < / span >
2021-09-15 16:49:36 +00:00
< span class = nd > @overload< / span >
< span class = "k" > def < / span > < span class = "nx" > Rec< / span > < span class = "p" > (< / span > < span class = "nx" > resource_name< / span > < span class = "p" > :< / span > < span class = "nx" > str< / span > < span class = "p" > ,< / span >
< span class = "nx" > opts< / span > < span class = "p" > :< / span > < span class = "nx" > < a href = "/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions" > Optional[ResourceOptions]< / a > < / span > = None< span class = "p" > )< / span > < / code > < / pre > < / div >
2024-04-02 15:47:32 +00:00
< / div > < / pulumi-choosable >
2022-04-29 22:04:15 +00:00
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "go" >
2024-04-02 15:47:32 +00:00
< div class = "no-copy" >< div class = "highlight" >< pre class = "chroma" >< code class = "language-go" data-lang = "go" >< span class = "k" > func </ span >< span class = "nx" > NewRec</ span >< span class = "p" > (</ span >< span class = "nx" > ctx</ span >< span class = "p" > *</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span><span class="p">,</span> <span class="nx">name</span><span class="p"> </span><span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p"> * </ span >< span class = "nx" >< a href = "#inputs" > RecArgs</ a ></ span >< span class = "p" > ,</ span > < span class = "nx" > opts</ span >< span class = "p" > ...</ span >< span class = "nx" >< a href = "https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption" > ResourceOption</ a ></ span >< span class = "p" > ) (*< span class = "nx" > Rec</ span > , error)</ span ></ code ></ pre ></ div >
< / div > < / pulumi-choosable >
2022-04-29 22:04:15 +00:00
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "csharp" >
2024-04-02 15:47:32 +00:00
< div class = "no-copy" > < div class = "highlight" > < pre class = "chroma" > < code class = "language-csharp" data-lang = "csharp" > < span class = "k" > public < / span > < span class = "nx" > Rec< / span > < span class = "p" > (< / span > < span class = "nx" > string< / span > < span class = "p" > < / span > < span class = "nx" > name< span class = "p" > ,< / span > < span class = "nx" > < a href = "#inputs" > RecArgs< / a > < / span > < span class = "p" > ? < / span > < span class = "nx" > args = null< span class = "p" > ,< / span > < span class = "nx" > < a href = "/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html" > CustomResourceOptions< / a > < / span > < span class = "p" > ? < / span > < span class = "nx" > opts = null< span class = "p" > )< / span > < / code > < / pre > < / div >
< / div > < / pulumi-choosable >
2022-04-29 22:04:15 +00:00
< / div >
2021-09-15 16:49:36 +00:00
2022-05-04 07:05:39 +00:00
< div >
< pulumi-choosable type = "language" values = "java" >
2024-04-02 15:47:32 +00:00
< div class = "no-copy" > < div class = "highlight" > < pre class = "chroma" >
2022-05-04 07:05:39 +00:00
< code class = "language-java" data-lang = "java" > < span class = "k" > public < / span > < span class = "nx" > Rec< / span > < span class = "p" > (< / span > < span class = "nx" > String< / span > < span class = "p" > < / span > < span class = "nx" > name< span class = "p" > ,< / span > < span class = "nx" > < a href = "#inputs" > RecArgs< / a > < / span > < span class = "p" > < / span > < span class = "nx" > args< span class = "p" > )< / span >
< span class = "k" > public < / span > < span class = "nx" > Rec< / span > < span class = "p" > (< / span > < span class = "nx" > String< / span > < span class = "p" > < / span > < span class = "nx" > name< span class = "p" > ,< / span > < span class = "nx" > < a href = "#inputs" > RecArgs< / a > < / span > < span class = "p" > < / span > < span class = "nx" > args< span class = "p" > ,< / span > < span class = "nx" > CustomResourceOptions< / span > < span class = "p" > < / span > < span class = "nx" > options< span class = "p" > )< / span >
2024-04-02 15:47:32 +00:00
< / code > < / pre > < / div > < / div >
2022-05-04 07:05:39 +00:00
< / pulumi-choosable >
< / div >
< div >
< pulumi-choosable type = "language" values = "yaml" >
2024-04-02 15:47:32 +00:00
< div class = "no-copy" > < div class = "highlight" > < pre class = "chroma" > < code class = "language-yaml" data-lang = "yaml" > type: < span class = "nx" > example:Rec< / span > < span class = "p" > < / span >
2022-05-04 07:05:39 +00:00
< span class = "p" > properties< / span > < span class = "p" > : < / span > < span class = "c" > # The arguments to resource properties.< / span >
< span class = "p" > < / span > < span class = "p" > options< / span > < span class = "p" > : < / span > < span class = "c" > # Bag of options to control resource' s behavior.< / span >
< span class = "p" > < / span >
2024-04-02 15:47:32 +00:00
< / code > < / pre > < / div > < / div >
2022-05-04 07:05:39 +00:00
< / pulumi-choosable >
< / div >
2024-04-02 15:47:32 +00:00
#### Parameters
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "javascript,typescript" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt
class="property-required" title="Required">
< span > name< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > string< / span >
< / dt >
< dd > The unique name of the resource.< / dd > < dt
class="property-optional" title="Optional">
< span > args< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "#inputs" > RecArgs< / a > < / span >
< / dt >
< dd > The arguments to resource properties.< / dd > < dt
class="property-optional" title="Optional">
< span > opts< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions" > CustomResourceOptions< / a > < / span >
< / dt >
< dd > Bag of options to control resource' s behavior.< / dd > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "python" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt
class="property-required" title="Required">
< span > resource_name< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > str< / span >
< / dt >
< dd > The unique name of the resource.< / dd > < dt
class="property-optional" title="Optional">
< span > args< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "#inputs" > RecArgs< / a > < / span >
< / dt >
< dd > The arguments to resource properties.< / dd > < dt
class="property-optional" title="Optional">
< span > opts< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions" > ResourceOptions< / a > < / span >
< / dt >
< dd > Bag of options to control resource' s behavior.< / dd > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "go" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt
class="property-optional" title="Optional">
< span > ctx< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context" > Context< / a > < / span >
< / dt >
< dd > Context object for the current deployment.< / dd > < dt
class="property-required" title="Required">
< span > name< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > string< / span >
< / dt >
< dd > The unique name of the resource.< / dd > < dt
class="property-optional" title="Optional">
< span > args< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "#inputs" > RecArgs< / a > < / span >
< / dt >
< dd > The arguments to resource properties.< / dd > < dt
class="property-optional" title="Optional">
< span > opts< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption" > ResourceOption< / a > < / span >
< / dt >
< dd > Bag of options to control resource' s behavior.< / dd > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "csharp" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt
class="property-required" title="Required">
< span > name< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > string< / span >
< / dt >
< dd > The unique name of the resource.< / dd > < dt
class="property-optional" title="Optional">
< span > args< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "#inputs" > RecArgs< / a > < / span >
< / dt >
< dd > The arguments to resource properties.< / dd > < dt
class="property-optional" title="Optional">
< span > opts< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html" > CustomResourceOptions< / a > < / span >
< / dt >
< dd > Bag of options to control resource' s behavior.< / dd > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-05-04 07:05:39 +00:00
< div >
< pulumi-choosable type = "language" values = "java" >
< dl class = "resources-properties" > < dt
class="property-required" title="Required">
< span > name< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > String< / span >
< / dt >
< dd > The unique name of the resource.< / dd > < dt
class="property-required" title="Required">
< span > args< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > < a href = "#inputs" > RecArgs< / a > < / span >
< / dt >
< dd > The arguments to resource properties.< / dd > < dt
class="property-optional" title="Optional">
< span > options< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > CustomResourceOptions< / span >
< / dt >
< dd > Bag of options to control resource' s behavior.< / dd > < / dl >
< / pulumi-choosable >
< / div >
2024-04-02 15:47:32 +00:00
2024-06-25 22:41:47 +00:00
### Constructor example
2024-04-02 15:47:32 +00:00
The following reference example uses placeholder values for all [input properties ](#inputs ).
< div >
2024-07-09 14:54:50 +00:00
< pulumi-chooser type = "language" options = "csharp,go,typescript,python,yaml,java" > < / pulumi-chooser >
2024-04-02 15:47:32 +00:00
< / div >
< div >
< pulumi-choosable type = "language" values = "csharp" >
```csharp
var recResource = new Example.Rec("recResource");
```
< / pulumi-choosable >
< / div >
< div >
< pulumi-choosable type = "language" values = "go" >
```go
example, err := example.NewRec(ctx, "recResource", nil)
```
< / pulumi-choosable >
< / div >
< div >
< pulumi-choosable type = "language" values = "java" >
```java
var recResource = new Rec("recResource");
```
< / pulumi-choosable >
< / div >
< div >
< pulumi-choosable type = "language" values = "python" >
```python
rec_resource = example.Rec("recResource")
```
< / pulumi-choosable >
< / div >
< div >
< pulumi-choosable type = "language" values = "typescript" >
```typescript
const recResource = new example.Rec("recResource", {});
```
< / pulumi-choosable >
< / div >
< div >
< pulumi-choosable type = "language" values = "yaml" >
```yaml
type: example:Rec
properties: {}
```
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
## Rec Resource Properties {#properties}
2022-05-04 07:05:39 +00:00
To learn more about resource properties and how to use them, see [Inputs and Outputs ](/docs/intro/concepts/inputs-outputs ) in the Architecture and Concepts docs.
2021-09-15 16:49:36 +00:00
### Inputs
2024-07-31 08:46:04 +00:00
< pulumi-choosable type = "language" values = "python" >
< p >
In Python, inputs that are objects can be passed either as < a href = "/docs/languages-sdks/python/#inputs-and-outputs" > argument classes or as dictionary literals< / a > .
< / p >
< / pulumi-choosable >
2022-05-04 07:05:39 +00:00
The Rec resource accepts the following [input ](/docs/intro/concepts/inputs-outputs ) properties:
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "csharp" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "go" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-05-04 07:05:39 +00:00
< div >
< pulumi-choosable type = "language" values = "java" >
< dl class = "resources-properties" > < / dl >
< / pulumi-choosable >
< / div >
2022-04-29 22:04:15 +00:00
< div >
2022-05-01 17:25:12 +00:00
< pulumi-choosable type = "language" values = "javascript,typescript" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "python" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < / dl >
2022-04-29 22:04:15 +00:00
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-05-04 07:05:39 +00:00
< div >
< pulumi-choosable type = "language" values = "yaml" >
< dl class = "resources-properties" > < / dl >
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
### Outputs
All [input ](#inputs ) properties are implicitly available as output properties. Additionally, the Rec resource produces the following output properties:
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "csharp" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt class = "property-"
title="">
< span id = "id_csharp" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#id_csharp" style = "color: inherit; text-decoration: inherit;" > Id< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > string< / span >
< / dt >
2023-08-26 17:36:28 +00:00
< dd > The provider-assigned unique ID for this managed resource.< / dd > < dt class = "property-"
2021-09-15 16:49:36 +00:00
title="">
< span id = "rec_csharp" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#rec_csharp" style = "color: inherit; text-decoration: inherit;" > Rec< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
[codegen/go] Remove ResourcePtr input/output types (#8449)
These changes remove the `Ptr` variants of input/ouptut types for
resources. A `TPtr` input or output is normally generated for `T` if `T`
is present in an `optional(input(T))` or `optional(output(T))` and if
the Go representation for `T` is not nilable. The generation of `Ptr`
variants for resource types breaks the latter rule: the canonical
representation of a resource type named `Foo` is a pointer to a struct
type named `Foo` (i.e. `*Foo`). `Foo` itself is not a resource, as it
does not implement the Go `Resource` interface. Because this
representation already accommodates `nil` to indicate the lack of a
value, we need not generate `FooPtr{Input,Output}` types.
Besides being unnecessary, the implementation of `Ptr` types for
resources was incorrect. Rather than using `**Foo` as their element
type, these types use `*Foo`--identical to the element type used for
the normal input/output types. Furthermore, the generated code for
at least `FooOutput.ToFooPtrOutputWithContext` and `FooPtrOutput.Elem`
was incorrect, making these types virtually unusable in practice.
Finally, these `Ptr` types should never appear on input/output
properties in practice, as the logic we use to generate input and output
type references never generates them for `optional({input,output}(T)).
Instead, it generates references to the standard input/output types.
Though this is _technically_ a breaking change--it changes the set of
exported types for any package that defines resources--I believe that in
practice it will be invisible to users for the reasons stated above.
These types are not usable, and were never referenced.
This is preparatory work for #7943.
2021-11-23 18:24:56 +00:00
< span class = "property-type" > Pulumi.< wbr > Example.< wbr > Rec< / span >
2021-09-15 16:49:36 +00:00
< / dt >
2022-04-29 22:04:15 +00:00
< dd > < / dd > < / dl >
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "go" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt class = "property-"
title="">
< span id = "id_go" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#id_go" style = "color: inherit; text-decoration: inherit;" > Id< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > string< / span >
< / dt >
2023-08-26 17:36:28 +00:00
< dd > The provider-assigned unique ID for this managed resource.< / dd > < dt class = "property-"
2021-09-15 16:49:36 +00:00
title="">
< span id = "rec_go" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#rec_go" style = "color: inherit; text-decoration: inherit;" > Rec< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > Rec< / span >
< / dt >
2022-04-29 22:04:15 +00:00
< dd > < / dd > < / dl >
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-05-04 07:05:39 +00:00
< div >
< pulumi-choosable type = "language" values = "java" >
< dl class = "resources-properties" > < dt class = "property-"
title="">
< span id = "id_java" >
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#id_java" style = "color: inherit; text-decoration: inherit;" > id< / a >
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > String< / span >
< / dt >
2023-08-26 17:36:28 +00:00
< dd > The provider-assigned unique ID for this managed resource.< / dd > < dt class = "property-"
2022-05-04 07:05:39 +00:00
title="">
< span id = "rec_java" >
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#rec_java" style = "color: inherit; text-decoration: inherit;" > rec< / a >
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > Rec< / span >
< / dt >
< dd > < / dd > < / dl >
< / pulumi-choosable >
< / div >
2022-04-29 22:04:15 +00:00
< div >
2022-05-01 17:25:12 +00:00
< pulumi-choosable type = "language" values = "javascript,typescript" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt class = "property-"
title="">
< span id = "id_nodejs" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#id_nodejs" style = "color: inherit; text-decoration: inherit;" > id< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > string< / span >
< / dt >
2023-08-26 17:36:28 +00:00
< dd > The provider-assigned unique ID for this managed resource.< / dd > < dt class = "property-"
2021-09-15 16:49:36 +00:00
title="">
< span id = "rec_nodejs" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#rec_nodejs" style = "color: inherit; text-decoration: inherit;" > rec< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > Rec< / span >
< / dt >
2022-04-29 22:04:15 +00:00
< dd > < / dd > < / dl >
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-04-29 22:04:15 +00:00
< div >
< pulumi-choosable type = "language" values = "python" >
2021-09-15 16:49:36 +00:00
< dl class = "resources-properties" > < dt class = "property-"
title="">
< span id = "id_python" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#id_python" style = "color: inherit; text-decoration: inherit;" > id< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > str< / span >
< / dt >
2023-08-26 17:36:28 +00:00
< dd > The provider-assigned unique ID for this managed resource.< / dd > < dt class = "property-"
2021-09-15 16:49:36 +00:00
title="">
< span id = "rec_python" >
2022-03-21 17:36:04 +00:00
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#rec_python" style = "color: inherit; text-decoration: inherit;" > rec< / a >
2021-09-15 16:49:36 +00:00
< / span >
< span class = "property-indicator" > < / span >
[codegen/go] Remove ResourcePtr input/output types (#8449)
These changes remove the `Ptr` variants of input/ouptut types for
resources. A `TPtr` input or output is normally generated for `T` if `T`
is present in an `optional(input(T))` or `optional(output(T))` and if
the Go representation for `T` is not nilable. The generation of `Ptr`
variants for resource types breaks the latter rule: the canonical
representation of a resource type named `Foo` is a pointer to a struct
type named `Foo` (i.e. `*Foo`). `Foo` itself is not a resource, as it
does not implement the Go `Resource` interface. Because this
representation already accommodates `nil` to indicate the lack of a
value, we need not generate `FooPtr{Input,Output}` types.
Besides being unnecessary, the implementation of `Ptr` types for
resources was incorrect. Rather than using `**Foo` as their element
type, these types use `*Foo`--identical to the element type used for
the normal input/output types. Furthermore, the generated code for
at least `FooOutput.ToFooPtrOutputWithContext` and `FooPtrOutput.Elem`
was incorrect, making these types virtually unusable in practice.
Finally, these `Ptr` types should never appear on input/output
properties in practice, as the logic we use to generate input and output
type references never generates them for `optional({input,output}(T)).
Instead, it generates references to the standard input/output types.
Though this is _technically_ a breaking change--it changes the set of
exported types for any package that defines resources--I believe that in
practice it will be invisible to users for the reasons stated above.
These types are not usable, and were never referenced.
This is preparatory work for #7943.
2021-11-23 18:24:56 +00:00
< span class = "property-type" > Rec< / span >
2021-09-15 16:49:36 +00:00
< / dt >
2022-04-29 22:04:15 +00:00
< dd > < / dd > < / dl >
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
2022-05-04 07:05:39 +00:00
< div >
< pulumi-choosable type = "language" values = "yaml" >
< dl class = "resources-properties" > < dt class = "property-"
title="">
< span id = "id_yaml" >
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#id_yaml" style = "color: inherit; text-decoration: inherit;" > id< / a >
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > String< / span >
< / dt >
2023-08-26 17:36:28 +00:00
< dd > The provider-assigned unique ID for this managed resource.< / dd > < dt class = "property-"
2022-05-04 07:05:39 +00:00
title="">
< span id = "rec_yaml" >
< a data-swiftype-name = "resource-property" data-swiftype-type = "text" href = "#rec_yaml" style = "color: inherit; text-decoration: inherit;" > rec< / a >
< / span >
< span class = "property-indicator" > < / span >
< span class = "property-type" > example:Rec< / span >
< / dt >
< dd > < / dd > < / dl >
< / pulumi-choosable >
< / div >
2021-09-15 16:49:36 +00:00
< h2 id = "package-details" > Package Details< / h2 >
< dl class = "package-details" >
< dt > Repository< / dt >
2023-01-17 18:22:12 +00:00
< dd > < a href = "" > example < / a > < / dd >
2021-09-15 16:49:36 +00:00
< dt > License< / dt >
< dd > < / dd >
< / dl >