mirror of https://github.com/pulumi/pulumi.git
132 lines
5.2 KiB
Cheetah
132 lines
5.2 KiB
Cheetah
{{ template "header" .Header }}
|
|
|
|
{{ htmlSafe "<!-- WARNING: this file was generated by" }} {{ .Tool }}. {{ htmlSafe "-->" }}
|
|
{{ htmlSafe "<!-- Do not edit by hand unless you're certain you know what you are doing! -->" }}
|
|
|
|
{{- if .DeprecationMessage }}
|
|
<div class="resource-deprecated">Deprecated: {{ markdownify .DeprecationMessage -}}</div>
|
|
{{- end }}
|
|
|
|
{{ htmlSafe .Comment }}
|
|
{{- if ne (len .ExamplesSection.Examples) 0 }}
|
|
{{ template "examples" .ExamplesSection }}
|
|
{{- end }}
|
|
|
|
<!-- Input properties -->
|
|
## Using {{ .Header.Title }} {#using}
|
|
|
|
{{- if .AnyLanguageHasOutputVersion }}
|
|
|
|
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.
|
|
|
|
{{- end }}
|
|
|
|
<div>
|
|
<pulumi-chooser type="language" options="{{ .LangChooserLanguages }}"></pulumi-chooser>
|
|
</div>
|
|
|
|
<!-- TS/JS -->
|
|
<div>
|
|
<pulumi-choosable type="language" values="javascript,typescript">
|
|
<div class="highlight"
|
|
><pre class="chroma"><code class="language-typescript" data-lang="typescript"
|
|
><span class="k">function </span>{{ .FunctionName.nodejs }}<span class="p">(</span>{{ htmlSafe .FunctionArgs.nodejs }}<span class="p">): Promise<{{ template "linkify_param" .FunctionResult.nodejs }}></span
|
|
{{- if .HasOutputVersion.nodejs }}
|
|
><span class="k">
|
|
function </span>{{ .FunctionName.nodejs }}Output<span class="p">(</span>{{ htmlSafe .FunctionArgsOutputVersion.nodejs }}<span class="p">): Output<{{ template "linkify_param" .FunctionResult.nodejs }}></span
|
|
{{- end }}
|
|
></code></pre></div>
|
|
</pulumi-choosable>
|
|
</div>
|
|
|
|
<!-- Python -->
|
|
<div>
|
|
<pulumi-choosable type="language" values="python">
|
|
<div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"
|
|
><span class="k">def </span>{{ .FunctionName.python }}<span class="p">(</span>{{ htmlSafe .FunctionArgs.python }}<span class="p">) -></span> <span>{{ .FunctionResult.python.Name }}</span
|
|
{{- if .HasOutputVersion.python }}
|
|
><span class="k">
|
|
def </span>{{ .FunctionName.python }}_output<span class="p">(</span>{{ htmlSafe .FunctionArgsOutputVersion.python }}<span class="p">) -></span> <span>Output[{{ .FunctionResult.python.Name }}]</span
|
|
{{- end }}
|
|
></code></pre></div>
|
|
</pulumi-choosable>
|
|
</div>
|
|
|
|
<!-- Go -->
|
|
<div>
|
|
<pulumi-choosable type="language" values="go">
|
|
<div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go"
|
|
><span class="k">func </span>{{ .FunctionName.go }}<span class="p">(</span>{{ htmlSafe .FunctionArgs.go }}<span class="p">) (*{{ template "linkify_param" .FunctionResult.go }}, error)</span
|
|
{{- if .HasOutputVersion.go }}
|
|
><span class="k">
|
|
func </span>{{ .FunctionName.go }}Output<span class="p">(</span>{{ htmlSafe .FunctionArgsOutputVersion.go }}<span class="p">) {{ .FunctionResultOutputVersion.go.Name }}</span
|
|
{{- end }}
|
|
></code></pre></div>
|
|
{{ if ne .FunctionName.go .Header.Title }}
|
|
> Note: This function is named `{{ .FunctionName.go }}` in the Go SDK.
|
|
{{ end }}
|
|
</pulumi-choosable>
|
|
</div>
|
|
|
|
<!-- C# -->
|
|
<div>
|
|
<pulumi-choosable type="language" values="csharp">
|
|
<div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public static class </span><span class="nx">{{ .FunctionName.csharp }} </span><span class="p">
|
|
{</span><span class="k">
|
|
public static </span>Task<{{ template "linkify_param" .FunctionResult.csharp }}> <span class="p">InvokeAsync(</span>{{ htmlSafe .FunctionArgs.csharp }}<span class="p">)</span>{{- if .HasOutputVersion.csharp }}<span class="k">
|
|
public static </span>Output<{{ template "linkify_param" .FunctionResult.csharp }}> <span class="p">Invoke(</span>{{ htmlSafe .FunctionArgsOutputVersion.csharp }}<span class="p">)</span>{{- end }}<span class="p">
|
|
}</span></code></pre></div>
|
|
</pulumi-choosable>
|
|
</div>
|
|
|
|
<!-- Java -->
|
|
<div>
|
|
<pulumi-choosable type="language" values="java">
|
|
<div class="highlight"><pre class="chroma"><code class="language-java" data-lang="java"><span class="k">public static CompletableFuture<{{ template "linkify_param" .FunctionResult.java }}> </span>{{ .FunctionName.java }}<span class="p">(</span>{{ htmlSafe .FunctionArgs.java }}<span class="p">)</span>
|
|
<span class="c">// Output-based functions aren't available in Java yet</span>
|
|
</code></pre></div>
|
|
</pulumi-choosable>
|
|
</div>
|
|
|
|
<!-- YAML -->
|
|
<div>
|
|
<pulumi-choosable type="language" values="yaml">
|
|
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="k">fn::invoke:</span>
|
|
<span class="k"> function:</span> {{ .FunctionName.yaml }}
|
|
<span class="k"> arguments:</span>
|
|
<span class="c"> # arguments dictionary</span></code></pre></div>
|
|
</pulumi-choosable>
|
|
</div>
|
|
|
|
{{ if ne (len .InputProperties) 0 }}
|
|
|
|
The following arguments are supported:
|
|
{{ template "properties" .InputProperties }}
|
|
|
|
{{ end }}
|
|
|
|
<!-- Output properties -->
|
|
## {{.Header.Title}} Result {#result}
|
|
|
|
The following output properties are available:
|
|
|
|
{{ template "properties" .OutputProperties }}
|
|
|
|
<!-- Supporting types -->
|
|
{{ if ne (len .NestedTypes) 0 }}
|
|
|
|
## Supporting Types
|
|
|
|
{{ range .NestedTypes }}
|
|
<h4 id="{{ .AnchorID }}">{{ htmlSafe .Name }}</h4>
|
|
|
|
{{ template "properties" .Properties }}
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ template "package_details" .PackageDetails }}
|