diff --git a/pkg/codegen/dotnet/doc.go b/pkg/codegen/dotnet/doc.go index a3bbe8d7a705..6a2a727e308b 100644 --- a/pkg/codegen/dotnet/doc.go +++ b/pkg/codegen/dotnet/doc.go @@ -110,26 +110,36 @@ func (d DocLanguageHelper) GetMethodName(m *schema.Method) string { func (d DocLanguageHelper) GetMethodResultName(pkg *schema.Package, modName string, r *schema.Resource, m *schema.Method) string { - if m.Function.ReturnType == nil { - //nolint - return "void" - } - - // if the return type is an object, assume we generated a Result Type for it - if _, isObject := m.Function.ReturnType.(*schema.ObjectType); isObject { - return fmt.Sprintf("%s.%sResult", resourceName(r), d.GetMethodName(m)) + var returnType *schema.ObjectType + if m.Function.ReturnType != nil { + if objectType, ok := m.Function.ReturnType.(*schema.ObjectType); ok { + returnType = objectType + } else { + typeDetails := map[*schema.ObjectType]*typeDetails{} + mod := &modContext{ + pkg: pkg, + mod: modName, + typeDetails: typeDetails, + namespaces: d.Namespaces, + } + return mod.typeString(m.Function.ReturnType, "", false, false, false) + } } - // otherwise just generate the non-object type - typeDetails := map[*schema.ObjectType]*typeDetails{} - mod := &modContext{ - pkg: pkg, - mod: modName, - typeDetails: typeDetails, - namespaces: d.Namespaces, + if info, ok := pkg.Language["csharp"].(CSharpPackageInfo); ok { + if info.LiftSingleValueMethodReturns && returnType != nil && len(returnType.Properties) == 1 { + typeDetails := map[*schema.ObjectType]*typeDetails{} + mod := &modContext{ + pkg: pkg, + mod: modName, + typeDetails: typeDetails, + namespaces: d.Namespaces, + rootNamespace: info.GetRootNamespace(), + } + return mod.typeString(returnType.Properties[0].Type, "", false, false, false) + } } - - return mod.typeString(m.Function.ReturnType, "", false, false, false) + return fmt.Sprintf("%s.%sResult", resourceName(r), d.GetMethodName(m)) } // GetPropertyName uses the property's csharp-specific language info, if available, to generate diff --git a/pkg/codegen/testing/test/testdata/output-funcs/docs/funcwithemptyoutputs/_index.md b/pkg/codegen/testing/test/testdata/output-funcs/docs/funcwithemptyoutputs/_index.md index 58d6c6102acf..1fb0e5cb482a 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/docs/funcwithemptyoutputs/_index.md +++ b/pkg/codegen/testing/test/testdata/output-funcs/docs/funcwithemptyoutputs/_index.md @@ -19,11 +19,6 @@ n/a ## Using funcWithEmptyOutputs {#using} -Two invocation forms are available. The direct form accepts plain -arguments and either blocks until the result value is available, or -returns a Promise-wrapped result. The output form accepts -Input-wrapped arguments and returns an Output-wrapped result. -
@@ -34,8 +29,6 @@ Input-wrapped arguments and returns an Output-wrapped result.
function funcWithEmptyOutputs(args: FuncWithEmptyOutputsArgs, opts?: InvokeOptions): Promise<FuncWithEmptyOutputsResult>
-function funcWithEmptyOutputsOutput(args: FuncWithEmptyOutputsOutputArgs, opts?: InvokeOptions): Output<FuncWithEmptyOutputsResult>
@@ -46,9 +39,6 @@ function funcWithEmptyOutputsOutput(
def func_with_empty_outputs(name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> FuncWithEmptyOutputsResult
-def func_with_empty_outputs_output(name: Optional[pulumi.Input[str]] = None,
-                            opts: Optional[InvokeOptions] = None) -> Output[FuncWithEmptyOutputsResult]
@@ -58,8 +48,6 @@ def
func_with_empty_outputs_output(
func FuncWithEmptyOutputs(ctx *Context, args *FuncWithEmptyOutputsArgs, opts ...InvokeOption) (*FuncWithEmptyOutputsResult, error)
-func FuncWithEmptyOutputsOutput(ctx *Context, args *FuncWithEmptyOutputsOutputArgs, opts ...InvokeOption) FuncWithEmptyOutputsResultOutput
> Note: This function is named `FuncWithEmptyOutputs` in the Go SDK. @@ -72,8 +60,7 @@ func
FuncWithEmptyOutputsOutput(c
public static class FuncWithEmptyOutputs 
 {
-    public static Task<FuncWithEmptyOutputsResult> InvokeAsync(FuncWithEmptyOutputsArgs args, InvokeOptions? opts = null)
-    public static Output<FuncWithEmptyOutputsResult> Invoke(FuncWithEmptyOutputsInvokeArgs args, InvokeOptions? opts = null)
+    public static Task<FuncWithEmptyOutputsResult> InvokeAsync(FuncWithEmptyOutputsArgs args, InvokeOptions? opts = null)
 }
@@ -201,42 +188,6 @@ The following output properties are available: -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/_index.md b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/_index.md new file mode 100644 index 000000000000..f1471b18ff65 --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/_index.md @@ -0,0 +1,37 @@ +--- +title: "StandardLibrary" +title_tag: "std.StandardLibrary" +meta_desc: "Standard library functions" +layout: api +no_edit_this_page: true +--- + + + + +Standard library functions + +

Resources

+ + +

Functions

+ + +

Package Details

+
+
Repository
+
https://github.com/pulumi/pulumi-std
+
License
+
+
Version
+
1.0.0
+
+ diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/abs/_index.md b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/abs/_index.md new file mode 100644 index 000000000000..8ab2772c7129 --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/abs/_index.md @@ -0,0 +1,342 @@ + +--- +title: "Abs" +title_tag: "std.Abs" +meta_desc: "Documentation for the std.Abs function with examples, input properties, output properties, and supporting types." +layout: api +no_edit_this_page: true +--- + + + + + + +Returns the absolute value of a given float. +Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. + + + + +## Using Abs {#using} + +Two invocation forms are available. The direct form accepts plain +arguments and either blocks until the result value is available, or +returns a Promise-wrapped result. The output form accepts +Input-wrapped arguments and returns an Output-wrapped result. + +
+ +
+ + +
+ +
function abs(args: AbsArgs, opts?: InvokeOptions): Promise<AbsResult>
+function absOutput(args: AbsOutputArgs, opts?: InvokeOptions): Output<AbsResult>
+
+
+ + +
+ +
def abs(a: Optional[float] = None,
+        b: Optional[float] = None,
+        opts: Optional[InvokeOptions] = None) -> AbsResult
+def abs_output(a: Optional[pulumi.Input[float]] = None,
+        b: Optional[pulumi.Input[float]] = None,
+        opts: Optional[InvokeOptions] = None) -> Output[AbsResult]
+
+
+ + +
+ +
func Abs(ctx *Context, args *AbsArgs, opts ...InvokeOption) (*AbsResult, error)
+func AbsOutput(ctx *Context, args *AbsOutputArgs, opts ...InvokeOption) AbsResultOutput
+ +
+
+ + +
+ +
public static class Abs 
+{
+    public static Task<AbsResult> InvokeAsync(AbsArgs args, InvokeOptions? opts = null)
+    public static Output<AbsResult> Invoke(AbsInvokeArgs args, InvokeOptions? opts = null)
+}
+
+
+ + +
+ +
public static CompletableFuture<AbsResult> abs(AbsArgs args, InvokeOptions options)
+// Output-based functions aren't available in Java yet
+
+
+
+ + +
+ +
fn::invoke:
+  function: std:Abs
+  arguments:
+    # arguments dictionary
+
+
+ + + +The following arguments are supported: + + +
+ +
+ +A + + + double +
+
+ +B + + + double +
+
+
+
+ +
+ +
+ +A + + + float64 +
+
+ +B + + + float64 +
+
+
+
+ +
+ +
+ +a + + + Double +
+
+ +b + + + Double +
+
+
+
+ +
+ +
+ +a + + + number +
+
+ +b + + + number +
+
+
+
+ +
+ +
+ +a + + + float +
+
+ +b + + + float +
+
+
+
+ +
+ +
+ +a + + + Number +
+
+ +b + + + Number +
+
+
+
+ + + + +## Abs Result {#result} + +The following output properties are available: + + + +
+ +
+ +Result + + + double +
+
+
+
+ +
+ +
+ +Result + + + float64 +
+
+
+
+ +
+ +
+ +result + + + Double +
+
+
+
+ +
+ +
+ +result + + + number +
+
+
+
+ +
+ +
+ +result + + + float +
+
+
+
+ +
+ +
+ +result + + + Number +
+
+
+
+ + + + + +

Package Details

+
+
Repository
+
https://github.com/pulumi/pulumi-std
+
License
+
+
+ diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargs/_index.md b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargs/_index.md new file mode 100644 index 000000000000..c0befa297523 --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargs/_index.md @@ -0,0 +1,342 @@ + +--- +title: "AbsMultiArgs" +title_tag: "std.AbsMultiArgs" +meta_desc: "Documentation for the std.AbsMultiArgs function with examples, input properties, output properties, and supporting types." +layout: api +no_edit_this_page: true +--- + + + + + + +Returns the absolute value of a given float. +Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. + + + + +## Using AbsMultiArgs {#using} + +Two invocation forms are available. The direct form accepts plain +arguments and either blocks until the result value is available, or +returns a Promise-wrapped result. The output form accepts +Input-wrapped arguments and returns an Output-wrapped result. + +
+ +
+ + +
+ +
function absMultiArgs(args: AbsMultiArgsArgs, opts?: InvokeOptions): Promise<AbsMultiArgsResult>
+function absMultiArgsOutput(args: AbsMultiArgsOutputArgs, opts?: InvokeOptions): Output<AbsMultiArgsResult>
+
+
+ + +
+ +
def abs_multi_args(a: Optional[float] = None,
+                   b: Optional[float] = None,
+                   opts: Optional[InvokeOptions] = None) -> AbsMultiArgsResult
+def abs_multi_args_output(a: Optional[pulumi.Input[float]] = None,
+                   b: Optional[pulumi.Input[float]] = None,
+                   opts: Optional[InvokeOptions] = None) -> Output[AbsMultiArgsResult]
+
+
+ + +
+ +
func AbsMultiArgs(ctx *Context, args *AbsMultiArgsArgs, opts ...InvokeOption) (*AbsMultiArgsResult, error)
+func AbsMultiArgsOutput(ctx *Context, args *AbsMultiArgsOutputArgs, opts ...InvokeOption) AbsMultiArgsResultOutput
+ +
+
+ + +
+ +
public static class AbsMultiArgs 
+{
+    public static Task<AbsMultiArgsResult> InvokeAsync(AbsMultiArgsArgs args, InvokeOptions? opts = null)
+    public static Output<AbsMultiArgsResult> Invoke(AbsMultiArgsInvokeArgs args, InvokeOptions? opts = null)
+}
+
+
+ + +
+ +
public static CompletableFuture<AbsMultiArgsResult> absMultiArgs(AbsMultiArgsArgs args, InvokeOptions options)
+// Output-based functions aren't available in Java yet
+
+
+
+ + +
+ +
fn::invoke:
+  function: std:AbsMultiArgs
+  arguments:
+    # arguments dictionary
+
+
+ + + +The following arguments are supported: + + +
+ +
+ +A + + + double +
+
+ +B + + + double +
+
+
+
+ +
+ +
+ +A + + + float64 +
+
+ +B + + + float64 +
+
+
+
+ +
+ +
+ +a + + + Double +
+
+ +b + + + Double +
+
+
+
+ +
+ +
+ +a + + + number +
+
+ +b + + + number +
+
+
+
+ +
+ +
+ +a + + + float +
+
+ +b + + + float +
+
+
+
+ +
+ +
+ +a + + + Number +
+
+ +b + + + Number +
+
+
+
+ + + + +## AbsMultiArgs Result {#result} + +The following output properties are available: + + + +
+ +
+ +Result + + + double +
+
+
+
+ +
+ +
+ +Result + + + float64 +
+
+
+
+ +
+ +
+ +result + + + Double +
+
+
+
+ +
+ +
+ +result + + + number +
+
+
+
+ +
+ +
+ +result + + + float +
+
+
+
+ +
+ +
+ +result + + + Number +
+
+
+
+ + + + + +

Package Details

+
+
Repository
+
https://github.com/pulumi/pulumi-std
+
License
+
+
+ diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargsreducedoutput/_index.md b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargsreducedoutput/_index.md new file mode 100644 index 000000000000..ca31850fa4f2 --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargsreducedoutput/_index.md @@ -0,0 +1,258 @@ + +--- +title: "AbsMultiArgsReducedOutput" +title_tag: "std.AbsMultiArgsReducedOutput" +meta_desc: "Documentation for the std.AbsMultiArgsReducedOutput function with examples, input properties, output properties, and supporting types." +layout: api +no_edit_this_page: true +--- + + + + + + +Returns the absolute value of a given float. +Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. + + + + +## Using AbsMultiArgsReducedOutput {#using} + +Two invocation forms are available. The direct form accepts plain +arguments and either blocks until the result value is available, or +returns a Promise-wrapped result. The output form accepts +Input-wrapped arguments and returns an Output-wrapped result. + +
+ +
+ + +
+ +
function absMultiArgsReducedOutput(args: AbsMultiArgsReducedOutputArgs, opts?: InvokeOptions): Promise<AbsMultiArgsReducedOutputResult>
+function absMultiArgsReducedOutputOutput(args: AbsMultiArgsReducedOutputOutputArgs, opts?: InvokeOptions): Output<AbsMultiArgsReducedOutputResult>
+
+
+ + +
+ +
def abs_multi_args_reduced_output(a: Optional[float] = None,
+                                  b: Optional[float] = None,
+                                  opts: Optional[InvokeOptions] = None) -> AbsMultiArgsReducedOutputResult
+def abs_multi_args_reduced_output_output(a: Optional[pulumi.Input[float]] = None,
+                                  b: Optional[pulumi.Input[float]] = None,
+                                  opts: Optional[InvokeOptions] = None) -> Output[AbsMultiArgsReducedOutputResult]
+
+
+ + +
+ +
func AbsMultiArgsReducedOutput(ctx *Context, args *AbsMultiArgsReducedOutputArgs, opts ...InvokeOption) (*AbsMultiArgsReducedOutputResult, error)
+func AbsMultiArgsReducedOutputOutput(ctx *Context, args *AbsMultiArgsReducedOutputOutputArgs, opts ...InvokeOption) AbsMultiArgsReducedOutputResultOutput
+ +
+
+ + +
+ +
public static class AbsMultiArgsReducedOutput 
+{
+    public static Task<AbsMultiArgsReducedOutputResult> InvokeAsync(AbsMultiArgsReducedOutputArgs args, InvokeOptions? opts = null)
+    public static Output<AbsMultiArgsReducedOutputResult> Invoke(AbsMultiArgsReducedOutputInvokeArgs args, InvokeOptions? opts = null)
+}
+
+
+ + +
+ +
public static CompletableFuture<AbsMultiArgsReducedOutputResult> absMultiArgsReducedOutput(AbsMultiArgsReducedOutputArgs args, InvokeOptions options)
+// Output-based functions aren't available in Java yet
+
+
+
+ + +
+ +
fn::invoke:
+  function: std:AbsMultiArgsReducedOutput
+  arguments:
+    # arguments dictionary
+
+
+ + + +The following arguments are supported: + + +
+ +
+ +A + + + double +
+
+ +B + + + double +
+
+
+
+ +
+ +
+ +A + + + float64 +
+
+ +B + + + float64 +
+
+
+
+ +
+ +
+ +a + + + Double +
+
+ +b + + + Double +
+
+
+
+ +
+ +
+ +a + + + number +
+
+ +b + + + number +
+
+
+
+ +
+ +
+ +a + + + float +
+
+ +b + + + float +
+
+
+
+ +
+ +
+ +a + + + Number +
+
+ +b + + + Number +
+
+
+
+ + + + +## AbsMultiArgsReducedOutput Result {#result} + +The following output properties are available: + + + + + + + +

Package Details

+
+
Repository
+
https://github.com/pulumi/pulumi-std
+
License
+
+
+ diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargsreducedoutputswapped/_index.md b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargsreducedoutputswapped/_index.md new file mode 100644 index 000000000000..6694b1b61ae6 --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absmultiargsreducedoutputswapped/_index.md @@ -0,0 +1,258 @@ + +--- +title: "AbsMultiArgsReducedOutputSwapped" +title_tag: "std.AbsMultiArgsReducedOutputSwapped" +meta_desc: "Documentation for the std.AbsMultiArgsReducedOutputSwapped function with examples, input properties, output properties, and supporting types." +layout: api +no_edit_this_page: true +--- + + + + + + +Returns the absolute value of a given float. +Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. + + + + +## Using AbsMultiArgsReducedOutputSwapped {#using} + +Two invocation forms are available. The direct form accepts plain +arguments and either blocks until the result value is available, or +returns a Promise-wrapped result. The output form accepts +Input-wrapped arguments and returns an Output-wrapped result. + +
+ +
+ + +
+ +
function absMultiArgsReducedOutputSwapped(args: AbsMultiArgsReducedOutputSwappedArgs, opts?: InvokeOptions): Promise<AbsMultiArgsReducedOutputSwappedResult>
+function absMultiArgsReducedOutputSwappedOutput(args: AbsMultiArgsReducedOutputSwappedOutputArgs, opts?: InvokeOptions): Output<AbsMultiArgsReducedOutputSwappedResult>
+
+
+ + +
+ +
def abs_multi_args_reduced_output_swapped(b: Optional[float] = None,
+                                          a: Optional[float] = None,
+                                          opts: Optional[InvokeOptions] = None) -> AbsMultiArgsReducedOutputSwappedResult
+def abs_multi_args_reduced_output_swapped_output(b: Optional[pulumi.Input[float]] = None,
+                                          a: Optional[pulumi.Input[float]] = None,
+                                          opts: Optional[InvokeOptions] = None) -> Output[AbsMultiArgsReducedOutputSwappedResult]
+
+
+ + +
+ +
func AbsMultiArgsReducedOutputSwapped(ctx *Context, args *AbsMultiArgsReducedOutputSwappedArgs, opts ...InvokeOption) (*AbsMultiArgsReducedOutputSwappedResult, error)
+func AbsMultiArgsReducedOutputSwappedOutput(ctx *Context, args *AbsMultiArgsReducedOutputSwappedOutputArgs, opts ...InvokeOption) AbsMultiArgsReducedOutputSwappedResultOutput
+ +
+
+ + +
+ +
public static class AbsMultiArgsReducedOutputSwapped 
+{
+    public static Task<AbsMultiArgsReducedOutputSwappedResult> InvokeAsync(AbsMultiArgsReducedOutputSwappedArgs args, InvokeOptions? opts = null)
+    public static Output<AbsMultiArgsReducedOutputSwappedResult> Invoke(AbsMultiArgsReducedOutputSwappedInvokeArgs args, InvokeOptions? opts = null)
+}
+
+
+ + +
+ +
public static CompletableFuture<AbsMultiArgsReducedOutputSwappedResult> absMultiArgsReducedOutputSwapped(AbsMultiArgsReducedOutputSwappedArgs args, InvokeOptions options)
+// Output-based functions aren't available in Java yet
+
+
+
+ + +
+ +
fn::invoke:
+  function: std:AbsMultiArgsReducedOutputSwapped
+  arguments:
+    # arguments dictionary
+
+
+ + + +The following arguments are supported: + + +
+ +
+ +A + + + double +
+
+ +B + + + double +
+
+
+
+ +
+ +
+ +A + + + float64 +
+
+ +B + + + float64 +
+
+
+
+ +
+ +
+ +a + + + Double +
+
+ +b + + + Double +
+
+
+
+ +
+ +
+ +a + + + number +
+
+ +b + + + number +
+
+
+
+ +
+ +
+ +a + + + float +
+
+ +b + + + float +
+
+
+
+ +
+ +
+ +a + + + Number +
+
+ +b + + + Number +
+
+
+
+ + + + +## AbsMultiArgsReducedOutputSwapped Result {#result} + +The following output properties are available: + + + + + + + +

Package Details

+
+
Repository
+
https://github.com/pulumi/pulumi-std
+
License
+
+
+ diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absreducedoutput/_index.md b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absreducedoutput/_index.md new file mode 100644 index 000000000000..dd4cecb9e426 --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/absreducedoutput/_index.md @@ -0,0 +1,258 @@ + +--- +title: "AbsReducedOutput" +title_tag: "std.AbsReducedOutput" +meta_desc: "Documentation for the std.AbsReducedOutput function with examples, input properties, output properties, and supporting types." +layout: api +no_edit_this_page: true +--- + + + + + + +Returns the absolute value of a given float. +Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. + + + + +## Using AbsReducedOutput {#using} + +Two invocation forms are available. The direct form accepts plain +arguments and either blocks until the result value is available, or +returns a Promise-wrapped result. The output form accepts +Input-wrapped arguments and returns an Output-wrapped result. + +
+ +
+ + +
+ +
function absReducedOutput(args: AbsReducedOutputArgs, opts?: InvokeOptions): Promise<AbsReducedOutputResult>
+function absReducedOutputOutput(args: AbsReducedOutputOutputArgs, opts?: InvokeOptions): Output<AbsReducedOutputResult>
+
+
+ + +
+ +
def abs_reduced_output(a: Optional[float] = None,
+                       b: Optional[float] = None,
+                       opts: Optional[InvokeOptions] = None) -> AbsReducedOutputResult
+def abs_reduced_output_output(a: Optional[pulumi.Input[float]] = None,
+                       b: Optional[pulumi.Input[float]] = None,
+                       opts: Optional[InvokeOptions] = None) -> Output[AbsReducedOutputResult]
+
+
+ + +
+ +
func AbsReducedOutput(ctx *Context, args *AbsReducedOutputArgs, opts ...InvokeOption) (*AbsReducedOutputResult, error)
+func AbsReducedOutputOutput(ctx *Context, args *AbsReducedOutputOutputArgs, opts ...InvokeOption) AbsReducedOutputResultOutput
+ +
+
+ + +
+ +
public static class AbsReducedOutput 
+{
+    public static Task<AbsReducedOutputResult> InvokeAsync(AbsReducedOutputArgs args, InvokeOptions? opts = null)
+    public static Output<AbsReducedOutputResult> Invoke(AbsReducedOutputInvokeArgs args, InvokeOptions? opts = null)
+}
+
+
+ + +
+ +
public static CompletableFuture<AbsReducedOutputResult> absReducedOutput(AbsReducedOutputArgs args, InvokeOptions options)
+// Output-based functions aren't available in Java yet
+
+
+
+ + +
+ +
fn::invoke:
+  function: std:AbsReducedOutput
+  arguments:
+    # arguments dictionary
+
+
+ + + +The following arguments are supported: + + +
+ +
+ +A + + + double +
+
+ +B + + + double +
+
+
+
+ +
+ +
+ +A + + + float64 +
+
+ +B + + + float64 +
+
+
+
+ +
+ +
+ +a + + + Double +
+
+ +b + + + Double +
+
+
+
+ +
+ +
+ +a + + + number +
+
+ +b + + + number +
+
+
+
+ +
+ +
+ +a + + + float +
+
+ +b + + + float +
+
+
+
+ +
+ +
+ +a + + + Number +
+
+ +b + + + Number +
+
+
+
+ + + + +## AbsReducedOutput Result {#result} + +The following output properties are available: + + + + + + + +

Package Details

+
+
Repository
+
https://github.com/pulumi/pulumi-std
+
License
+
+
+ diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/codegen-manifest.json b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/codegen-manifest.json new file mode 100644 index 000000000000..97954fe31ac6 --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/codegen-manifest.json @@ -0,0 +1,11 @@ +{ + "emittedFiles": [ + "_index.md", + "abs/_index.md", + "absmultiargs/_index.md", + "absmultiargsreducedoutput/_index.md", + "absmultiargsreducedoutputswapped/_index.md", + "absreducedoutput/_index.md", + "provider/_index.md" + ] +} diff --git a/pkg/codegen/testing/test/testdata/simplified-invokes/docs/provider/_index.md b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/provider/_index.md new file mode 100644 index 000000000000..a0d59b9442ae --- /dev/null +++ b/pkg/codegen/testing/test/testdata/simplified-invokes/docs/provider/_index.md @@ -0,0 +1,366 @@ + +--- +title: "Provider" +title_tag: "std.Provider" +meta_desc: "Documentation for the std.Provider resource with examples, input properties, output properties, lookup functions, and supporting types." +layout: api +no_edit_this_page: true +--- + + + + + + + + + +## Create Provider Resource {#create} +
+ +
+ + +
+ +
new Provider(name: string, args?: ProviderArgs, opts?: CustomResourceOptions);
+
+
+ +
+ +
@overload
+def Provider(resource_name: str,
+             opts: Optional[ResourceOptions] = None)
+@overload
+def Provider(resource_name: str,
+             args: Optional[ProviderArgs] = None,
+             opts: Optional[ResourceOptions] = None)
+
+
+ +
+ +
func NewProvider(ctx *Context, name string, args *ProviderArgs, opts ...ResourceOption) (*Provider, error)
+
+
+ +
+ +
public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? opts = null)
+
+
+ +
+ +
+public Provider(String name, ProviderArgs args)
+public Provider(String name, ProviderArgs args, CustomResourceOptions options)
+
+
+
+ +
+ +
type: pulumi:providers:std
+properties: # The arguments to resource properties.
+options: # Bag of options to control resource's behavior.
+
+
+
+
+ +
+ + +
+ name + + string +
+
The unique name of the resource.
+ args + + ProviderArgs +
+
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 + + ProviderArgs +
+
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 + + ProviderArgs +
+
The arguments to resource properties.
+ opts + + ResourceOption +
+
Bag of options to control resource's behavior.
+ +
+
+ +
+ + +
+ name + + string +
+
The unique name of the resource.
+ args + + ProviderArgs +
+
The arguments to resource properties.
+ opts + + CustomResourceOptions +
+
Bag of options to control resource's behavior.
+ +
+
+ +
+ + +
+ name + + String +
+
The unique name of the resource.
+ args + + ProviderArgs +
+
The arguments to resource properties.
+ options + + CustomResourceOptions +
+
Bag of options to control resource's behavior.
+ +
+
+ +## Provider Resource Properties {#properties} + +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. + +### Inputs + +The Provider resource accepts the following [input](/docs/intro/concepts/inputs-outputs) properties: + + + +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +### Outputs + +All [input](#inputs) properties are implicitly available as output properties. Additionally, the Provider resource produces the following output properties: + + + +
+ +
+ +Id + + + string +
+

The provider-assigned unique ID for this managed resource.

+
+
+
+ +
+ +
+ +Id + + + string +
+

The provider-assigned unique ID for this managed resource.

+
+
+
+ +
+ +
+ +id + + + String +
+

The provider-assigned unique ID for this managed resource.

+
+
+
+ +
+ +
+ +id + + + string +
+

The provider-assigned unique ID for this managed resource.

+
+
+
+ +
+ +
+ +id + + + str +
+

The provider-assigned unique ID for this managed resource.

+
+
+
+ +
+ +
+ +id + + + String +
+

The provider-assigned unique ID for this managed resource.

+
+
+
+ + + + + + + + +

Package Details

+
+
Repository
+
https://github.com/pulumi/pulumi-std
+
License
+
+
+