github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/output-funcs/docs/funcwithdictparam/_index.md (about) 1 2 --- 3 title: "funcWithDictParam" 4 title_tag: "mypkg.funcWithDictParam" 5 meta_desc: "Documentation for the mypkg.funcWithDictParam function with examples, input properties, output properties, and supporting types." 6 layout: api 7 no_edit_this_page: true 8 --- 9 10 11 12 <!-- WARNING: this file was generated by test. --> 13 <!-- Do not edit by hand unless you're certain you know what you are doing! --> 14 15 Check codegen of functions with a Dict<str,str> parameter. 16 17 18 19 20 ## Using funcWithDictParam {#using} 21 22 Two invocation forms are available. The direct form accepts plain 23 arguments and either blocks until the result value is available, or 24 returns a Promise-wrapped result. The output form accepts 25 Input-wrapped arguments and returns an Output-wrapped result. 26 27 <div> 28 <pulumi-chooser type="language" options="typescript,python,go,csharp,java,yaml"></pulumi-chooser> 29 </div> 30 31 32 <div> 33 <pulumi-choosable type="language" values="javascript,typescript"> 34 <div class="highlight" 35 ><pre class="chroma"><code class="language-typescript" data-lang="typescript" 36 ><span class="k">function </span>funcWithDictParam<span class="p">(</span><span class="nx">args</span><span class="p">:</span> <span class="nx">FuncWithDictParamArgs</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/#InvokeOptions">InvokeOptions</a></span><span class="p">): Promise<<span class="nx"><a href="#result">FuncWithDictParamResult</a></span>></span 37 ><span class="k"> 38 function </span>funcWithDictParamOutput<span class="p">(</span><span class="nx">args</span><span class="p">:</span> <span class="nx">FuncWithDictParamOutputArgs</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/#InvokeOptions">InvokeOptions</a></span><span class="p">): Output<<span class="nx"><a href="#result">FuncWithDictParamResult</a></span>></span 39 ></code></pre></div> 40 </pulumi-choosable> 41 </div> 42 43 44 <div> 45 <pulumi-choosable type="language" values="python"> 46 <div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python" 47 ><span class="k">def </span>func_with_dict_param<span class="p">(</span><span class="nx">a</span><span class="p">:</span> <span class="nx">Optional[Mapping[str, str]]</span> = None<span class="p">,</span> 48 <span class="nx">b</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span> 49 <span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.InvokeOptions">Optional[InvokeOptions]</a></span> = None<span class="p">) -></span> <span>FuncWithDictParamResult</span 50 ><span class="k"> 51 def </span>func_with_dict_param_output<span class="p">(</span><span class="nx">a</span><span class="p">:</span> <span class="nx">Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]</span> = None<span class="p">,</span> 52 <span class="nx">b</span><span class="p">:</span> <span class="nx">Optional[pulumi.Input[str]]</span> = None<span class="p">,</span> 53 <span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.InvokeOptions">Optional[InvokeOptions]</a></span> = None<span class="p">) -></span> <span>Output[FuncWithDictParamResult]</span 54 ></code></pre></div> 55 </pulumi-choosable> 56 </div> 57 58 59 <div> 60 <pulumi-choosable type="language" values="go"> 61 <div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go" 62 ><span class="k">func </span>FuncWithDictParam<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">args</span><span class="p"> *</span><span class="nx">FuncWithDictParamArgs</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#InvokeOption">InvokeOption</a></span><span class="p">) (*<span class="nx"><a href="#result">FuncWithDictParamResult</a></span>, error)</span 63 ><span class="k"> 64 func </span>FuncWithDictParamOutput<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">args</span><span class="p"> *</span><span class="nx">FuncWithDictParamOutputArgs</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#InvokeOption">InvokeOption</a></span><span class="p">) FuncWithDictParamResultOutput</span 65 ></code></pre></div> 66 67 > Note: This function is named `FuncWithDictParam` in the Go SDK. 68 69 </pulumi-choosable> 70 </div> 71 72 73 <div> 74 <pulumi-choosable type="language" values="csharp"> 75 <div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public static class </span><span class="nx">FuncWithDictParam </span><span class="p"> 76 {</span><span class="k"> 77 public static </span>Task<<span class="nx"><a href="#result">FuncWithDictParamResult</a></span>> <span class="p">InvokeAsync(</span><span class="nx">FuncWithDictParamArgs</span><span class="p"> </span><span class="nx">args<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.InvokeOptions.html">InvokeOptions</a></span><span class="p">? </span><span class="nx">opts = null<span class="p">)</span><span class="k"> 78 public static </span>Output<<span class="nx"><a href="#result">FuncWithDictParamResult</a></span>> <span class="p">Invoke(</span><span class="nx">FuncWithDictParamInvokeArgs</span><span class="p"> </span><span class="nx">args<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.InvokeOptions.html">InvokeOptions</a></span><span class="p">? </span><span class="nx">opts = null<span class="p">)</span><span class="p"> 79 }</span></code></pre></div> 80 </pulumi-choosable> 81 </div> 82 83 84 <div> 85 <pulumi-choosable type="language" values="java"> 86 <div class="highlight"><pre class="chroma"><code class="language-java" data-lang="java"><span class="k">public static CompletableFuture<<span class="nx"><a href="#result">FuncWithDictParamResult</a></span>> </span>funcWithDictParam<span class="p">(</span><span class="nx">FuncWithDictParamArgs</span><span class="p"> </span><span class="nx">args<span class="p">,</span> <span class="nx">InvokeOptions</span><span class="p"> </span><span class="nx">options<span class="p">)</span> 87 <span class="c">// Output-based functions aren't available in Java yet</span> 88 </code></pre></div> 89 </pulumi-choosable> 90 </div> 91 92 93 <div> 94 <pulumi-choosable type="language" values="yaml"> 95 <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="k">fn::invoke:</span> 96 <span class="k"> function:</span> mypkg:funcWithDictParam 97 <span class="k"> arguments:</span> 98 <span class="c"> # arguments dictionary</span></code></pre></div> 99 </pulumi-choosable> 100 </div> 101 102 103 104 The following arguments are supported: 105 106 107 <div> 108 <pulumi-choosable type="language" values="csharp"> 109 <dl class="resources-properties"><dt class="property-optional" 110 title="Optional"> 111 <span id="a_csharp"> 112 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#a_csharp" style="color: inherit; text-decoration: inherit;">A</a> 113 </span> 114 <span class="property-indicator"></span> 115 <span class="property-type">Dictionary<string, string></span> 116 </dt> 117 <dd></dd><dt class="property-optional" 118 title="Optional"> 119 <span id="b_csharp"> 120 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#b_csharp" style="color: inherit; text-decoration: inherit;">B</a> 121 </span> 122 <span class="property-indicator"></span> 123 <span class="property-type">string</span> 124 </dt> 125 <dd></dd></dl> 126 </pulumi-choosable> 127 </div> 128 129 <div> 130 <pulumi-choosable type="language" values="go"> 131 <dl class="resources-properties"><dt class="property-optional" 132 title="Optional"> 133 <span id="a_go"> 134 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#a_go" style="color: inherit; text-decoration: inherit;">A</a> 135 </span> 136 <span class="property-indicator"></span> 137 <span class="property-type">map[string]string</span> 138 </dt> 139 <dd></dd><dt class="property-optional" 140 title="Optional"> 141 <span id="b_go"> 142 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#b_go" style="color: inherit; text-decoration: inherit;">B</a> 143 </span> 144 <span class="property-indicator"></span> 145 <span class="property-type">string</span> 146 </dt> 147 <dd></dd></dl> 148 </pulumi-choosable> 149 </div> 150 151 <div> 152 <pulumi-choosable type="language" values="java"> 153 <dl class="resources-properties"><dt class="property-optional" 154 title="Optional"> 155 <span id="a_java"> 156 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#a_java" style="color: inherit; text-decoration: inherit;">a</a> 157 </span> 158 <span class="property-indicator"></span> 159 <span class="property-type">Map<String,String></span> 160 </dt> 161 <dd></dd><dt class="property-optional" 162 title="Optional"> 163 <span id="b_java"> 164 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#b_java" style="color: inherit; text-decoration: inherit;">b</a> 165 </span> 166 <span class="property-indicator"></span> 167 <span class="property-type">String</span> 168 </dt> 169 <dd></dd></dl> 170 </pulumi-choosable> 171 </div> 172 173 <div> 174 <pulumi-choosable type="language" values="javascript,typescript"> 175 <dl class="resources-properties"><dt class="property-optional" 176 title="Optional"> 177 <span id="a_nodejs"> 178 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#a_nodejs" style="color: inherit; text-decoration: inherit;">a</a> 179 </span> 180 <span class="property-indicator"></span> 181 <span class="property-type">{[key: string]: string}</span> 182 </dt> 183 <dd></dd><dt class="property-optional" 184 title="Optional"> 185 <span id="b_nodejs"> 186 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#b_nodejs" style="color: inherit; text-decoration: inherit;">b</a> 187 </span> 188 <span class="property-indicator"></span> 189 <span class="property-type">string</span> 190 </dt> 191 <dd></dd></dl> 192 </pulumi-choosable> 193 </div> 194 195 <div> 196 <pulumi-choosable type="language" values="python"> 197 <dl class="resources-properties"><dt class="property-optional" 198 title="Optional"> 199 <span id="a_python"> 200 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#a_python" style="color: inherit; text-decoration: inherit;">a</a> 201 </span> 202 <span class="property-indicator"></span> 203 <span class="property-type">Mapping[str, str]</span> 204 </dt> 205 <dd></dd><dt class="property-optional" 206 title="Optional"> 207 <span id="b_python"> 208 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#b_python" style="color: inherit; text-decoration: inherit;">b</a> 209 </span> 210 <span class="property-indicator"></span> 211 <span class="property-type">str</span> 212 </dt> 213 <dd></dd></dl> 214 </pulumi-choosable> 215 </div> 216 217 <div> 218 <pulumi-choosable type="language" values="yaml"> 219 <dl class="resources-properties"><dt class="property-optional" 220 title="Optional"> 221 <span id="a_yaml"> 222 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#a_yaml" style="color: inherit; text-decoration: inherit;">a</a> 223 </span> 224 <span class="property-indicator"></span> 225 <span class="property-type">Map<String></span> 226 </dt> 227 <dd></dd><dt class="property-optional" 228 title="Optional"> 229 <span id="b_yaml"> 230 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#b_yaml" style="color: inherit; text-decoration: inherit;">b</a> 231 </span> 232 <span class="property-indicator"></span> 233 <span class="property-type">String</span> 234 </dt> 235 <dd></dd></dl> 236 </pulumi-choosable> 237 </div> 238 239 240 241 242 ## funcWithDictParam Result {#result} 243 244 The following output properties are available: 245 246 247 248 <div> 249 <pulumi-choosable type="language" values="csharp"> 250 <dl class="resources-properties"><dt class="property-" 251 title=""> 252 <span id="r_csharp"> 253 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#r_csharp" style="color: inherit; text-decoration: inherit;">R</a> 254 </span> 255 <span class="property-indicator"></span> 256 <span class="property-type">string</span> 257 </dt> 258 <dd></dd></dl> 259 </pulumi-choosable> 260 </div> 261 262 <div> 263 <pulumi-choosable type="language" values="go"> 264 <dl class="resources-properties"><dt class="property-" 265 title=""> 266 <span id="r_go"> 267 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#r_go" style="color: inherit; text-decoration: inherit;">R</a> 268 </span> 269 <span class="property-indicator"></span> 270 <span class="property-type">string</span> 271 </dt> 272 <dd></dd></dl> 273 </pulumi-choosable> 274 </div> 275 276 <div> 277 <pulumi-choosable type="language" values="java"> 278 <dl class="resources-properties"><dt class="property-" 279 title=""> 280 <span id="r_java"> 281 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#r_java" style="color: inherit; text-decoration: inherit;">r</a> 282 </span> 283 <span class="property-indicator"></span> 284 <span class="property-type">String</span> 285 </dt> 286 <dd></dd></dl> 287 </pulumi-choosable> 288 </div> 289 290 <div> 291 <pulumi-choosable type="language" values="javascript,typescript"> 292 <dl class="resources-properties"><dt class="property-" 293 title=""> 294 <span id="r_nodejs"> 295 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#r_nodejs" style="color: inherit; text-decoration: inherit;">r</a> 296 </span> 297 <span class="property-indicator"></span> 298 <span class="property-type">string</span> 299 </dt> 300 <dd></dd></dl> 301 </pulumi-choosable> 302 </div> 303 304 <div> 305 <pulumi-choosable type="language" values="python"> 306 <dl class="resources-properties"><dt class="property-" 307 title=""> 308 <span id="r_python"> 309 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#r_python" style="color: inherit; text-decoration: inherit;">r</a> 310 </span> 311 <span class="property-indicator"></span> 312 <span class="property-type">str</span> 313 </dt> 314 <dd></dd></dl> 315 </pulumi-choosable> 316 </div> 317 318 <div> 319 <pulumi-choosable type="language" values="yaml"> 320 <dl class="resources-properties"><dt class="property-" 321 title=""> 322 <span id="r_yaml"> 323 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#r_yaml" style="color: inherit; text-decoration: inherit;">r</a> 324 </span> 325 <span class="property-indicator"></span> 326 <span class="property-type">String</span> 327 </dt> 328 <dd></dd></dl> 329 </pulumi-choosable> 330 </div> 331 332 333 334 335 336 <h2 id="package-details">Package Details</h2> 337 <dl class="package-details"> 338 <dt>Repository</dt> 339 <dd><a href=""></a></dd> 340 <dt>License</dt> 341 <dd></dd> 342 </dl> 343