github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/functions-secrets/docs/funcwithsecrets/_index.md (about) 1 2 --- 3 title: "funcWithSecrets" 4 title_tag: "mypkg.funcWithSecrets" 5 meta_desc: "Documentation for the mypkg.funcWithSecrets 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 16 17 18 ## Using funcWithSecrets {#using} 19 20 Two invocation forms are available. The direct form accepts plain 21 arguments and either blocks until the result value is available, or 22 returns a Promise-wrapped result. The output form accepts 23 Input-wrapped arguments and returns an Output-wrapped result. 24 25 <div> 26 <pulumi-chooser type="language" options="typescript,python,go,csharp,java,yaml"></pulumi-chooser> 27 </div> 28 29 30 <div> 31 <pulumi-choosable type="language" values="javascript,typescript"> 32 <div class="highlight" 33 ><pre class="chroma"><code class="language-typescript" data-lang="typescript" 34 ><span class="k">function </span>funcWithSecrets<span class="p">(</span><span class="nx">args</span><span class="p">:</span> <span class="nx">FuncWithSecretsArgs</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">FuncWithSecretsResult</a></span>></span 35 ><span class="k"> 36 function </span>funcWithSecretsOutput<span class="p">(</span><span class="nx">args</span><span class="p">:</span> <span class="nx">FuncWithSecretsOutputArgs</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">FuncWithSecretsResult</a></span>></span 37 ></code></pre></div> 38 </pulumi-choosable> 39 </div> 40 41 42 <div> 43 <pulumi-choosable type="language" values="python"> 44 <div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python" 45 ><span class="k">def </span>func_with_secrets<span class="p">(</span><span class="nx">crypto_key</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span> 46 <span class="nx">plaintext</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span> 47 <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>FuncWithSecretsResult</span 48 ><span class="k"> 49 def </span>func_with_secrets_output<span class="p">(</span><span class="nx">crypto_key</span><span class="p">:</span> <span class="nx">Optional[pulumi.Input[str]]</span> = None<span class="p">,</span> 50 <span class="nx">plaintext</span><span class="p">:</span> <span class="nx">Optional[pulumi.Input[str]]</span> = None<span class="p">,</span> 51 <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[FuncWithSecretsResult]</span 52 ></code></pre></div> 53 </pulumi-choosable> 54 </div> 55 56 57 <div> 58 <pulumi-choosable type="language" values="go"> 59 <div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go" 60 ><span class="k">func </span>FuncWithSecrets<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">FuncWithSecretsArgs</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">FuncWithSecretsResult</a></span>, error)</span 61 ><span class="k"> 62 func </span>FuncWithSecretsOutput<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">FuncWithSecretsOutputArgs</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">) FuncWithSecretsResultOutput</span 63 ></code></pre></div> 64 65 > Note: This function is named `FuncWithSecrets` in the Go SDK. 66 67 </pulumi-choosable> 68 </div> 69 70 71 <div> 72 <pulumi-choosable type="language" values="csharp"> 73 <div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public static class </span><span class="nx">FuncWithSecrets </span><span class="p"> 74 {</span><span class="k"> 75 public static </span>Task<<span class="nx"><a href="#result">FuncWithSecretsResult</a></span>> <span class="p">InvokeAsync(</span><span class="nx">FuncWithSecretsArgs</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"> 76 public static </span>Output<<span class="nx"><a href="#result">FuncWithSecretsResult</a></span>> <span class="p">Invoke(</span><span class="nx">FuncWithSecretsInvokeArgs</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"> 77 }</span></code></pre></div> 78 </pulumi-choosable> 79 </div> 80 81 82 <div> 83 <pulumi-choosable type="language" values="java"> 84 <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">FuncWithSecretsResult</a></span>> </span>funcWithSecrets<span class="p">(</span><span class="nx">FuncWithSecretsArgs</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> 85 <span class="c">// Output-based functions aren't available in Java yet</span> 86 </code></pre></div> 87 </pulumi-choosable> 88 </div> 89 90 91 <div> 92 <pulumi-choosable type="language" values="yaml"> 93 <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="k">fn::invoke:</span> 94 <span class="k"> function:</span> mypkg:funcWithSecrets 95 <span class="k"> arguments:</span> 96 <span class="c"> # arguments dictionary</span></code></pre></div> 97 </pulumi-choosable> 98 </div> 99 100 101 102 The following arguments are supported: 103 104 105 <div> 106 <pulumi-choosable type="language" values="csharp"> 107 <dl class="resources-properties"><dt class="property-required" 108 title="Required"> 109 <span id="cryptokey_csharp"> 110 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_csharp" style="color: inherit; text-decoration: inherit;">Crypto<wbr>Key</a> 111 </span> 112 <span class="property-indicator"></span> 113 <span class="property-type">string</span> 114 </dt> 115 <dd></dd><dt class="property-required" 116 title="Required"> 117 <span id="plaintext_csharp"> 118 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_csharp" style="color: inherit; text-decoration: inherit;">Plaintext</a> 119 </span> 120 <span class="property-indicator"></span> 121 <span class="property-type">string</span> 122 </dt> 123 <dd></dd></dl> 124 </pulumi-choosable> 125 </div> 126 127 <div> 128 <pulumi-choosable type="language" values="go"> 129 <dl class="resources-properties"><dt class="property-required" 130 title="Required"> 131 <span id="cryptokey_go"> 132 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_go" style="color: inherit; text-decoration: inherit;">Crypto<wbr>Key</a> 133 </span> 134 <span class="property-indicator"></span> 135 <span class="property-type">string</span> 136 </dt> 137 <dd></dd><dt class="property-required" 138 title="Required"> 139 <span id="plaintext_go"> 140 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_go" style="color: inherit; text-decoration: inherit;">Plaintext</a> 141 </span> 142 <span class="property-indicator"></span> 143 <span class="property-type">string</span> 144 </dt> 145 <dd></dd></dl> 146 </pulumi-choosable> 147 </div> 148 149 <div> 150 <pulumi-choosable type="language" values="java"> 151 <dl class="resources-properties"><dt class="property-required" 152 title="Required"> 153 <span id="cryptokey_java"> 154 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_java" style="color: inherit; text-decoration: inherit;">crypto<wbr>Key</a> 155 </span> 156 <span class="property-indicator"></span> 157 <span class="property-type">String</span> 158 </dt> 159 <dd></dd><dt class="property-required" 160 title="Required"> 161 <span id="plaintext_java"> 162 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_java" style="color: inherit; text-decoration: inherit;">plaintext</a> 163 </span> 164 <span class="property-indicator"></span> 165 <span class="property-type">String</span> 166 </dt> 167 <dd></dd></dl> 168 </pulumi-choosable> 169 </div> 170 171 <div> 172 <pulumi-choosable type="language" values="javascript,typescript"> 173 <dl class="resources-properties"><dt class="property-required" 174 title="Required"> 175 <span id="cryptokey_nodejs"> 176 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_nodejs" style="color: inherit; text-decoration: inherit;">crypto<wbr>Key</a> 177 </span> 178 <span class="property-indicator"></span> 179 <span class="property-type">string</span> 180 </dt> 181 <dd></dd><dt class="property-required" 182 title="Required"> 183 <span id="plaintext_nodejs"> 184 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_nodejs" style="color: inherit; text-decoration: inherit;">plaintext</a> 185 </span> 186 <span class="property-indicator"></span> 187 <span class="property-type">string</span> 188 </dt> 189 <dd></dd></dl> 190 </pulumi-choosable> 191 </div> 192 193 <div> 194 <pulumi-choosable type="language" values="python"> 195 <dl class="resources-properties"><dt class="property-required" 196 title="Required"> 197 <span id="crypto_key_python"> 198 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#crypto_key_python" style="color: inherit; text-decoration: inherit;">crypto_<wbr>key</a> 199 </span> 200 <span class="property-indicator"></span> 201 <span class="property-type">str</span> 202 </dt> 203 <dd></dd><dt class="property-required" 204 title="Required"> 205 <span id="plaintext_python"> 206 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_python" style="color: inherit; text-decoration: inherit;">plaintext</a> 207 </span> 208 <span class="property-indicator"></span> 209 <span class="property-type">str</span> 210 </dt> 211 <dd></dd></dl> 212 </pulumi-choosable> 213 </div> 214 215 <div> 216 <pulumi-choosable type="language" values="yaml"> 217 <dl class="resources-properties"><dt class="property-required" 218 title="Required"> 219 <span id="cryptokey_yaml"> 220 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_yaml" style="color: inherit; text-decoration: inherit;">crypto<wbr>Key</a> 221 </span> 222 <span class="property-indicator"></span> 223 <span class="property-type">String</span> 224 </dt> 225 <dd></dd><dt class="property-required" 226 title="Required"> 227 <span id="plaintext_yaml"> 228 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_yaml" style="color: inherit; text-decoration: inherit;">plaintext</a> 229 </span> 230 <span class="property-indicator"></span> 231 <span class="property-type">String</span> 232 </dt> 233 <dd></dd></dl> 234 </pulumi-choosable> 235 </div> 236 237 238 239 240 ## funcWithSecrets Result {#result} 241 242 The following output properties are available: 243 244 245 246 <div> 247 <pulumi-choosable type="language" values="csharp"> 248 <dl class="resources-properties"><dt class="property-" 249 title=""> 250 <span id="ciphertext_csharp"> 251 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#ciphertext_csharp" style="color: inherit; text-decoration: inherit;">Ciphertext</a> 252 </span> 253 <span class="property-indicator"></span> 254 <span class="property-type">string</span> 255 </dt> 256 <dd></dd><dt class="property-" 257 title=""> 258 <span id="cryptokey_csharp"> 259 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_csharp" style="color: inherit; text-decoration: inherit;">Crypto<wbr>Key</a> 260 </span> 261 <span class="property-indicator"></span> 262 <span class="property-type">string</span> 263 </dt> 264 <dd></dd><dt class="property-" 265 title=""> 266 <span id="id_csharp"> 267 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_csharp" style="color: inherit; text-decoration: inherit;">Id</a> 268 </span> 269 <span class="property-indicator"></span> 270 <span class="property-type">string</span> 271 </dt> 272 <dd></dd><dt class="property-" 273 title=""> 274 <span id="plaintext_csharp"> 275 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_csharp" style="color: inherit; text-decoration: inherit;">Plaintext</a> 276 </span> 277 <span class="property-indicator"></span> 278 <span class="property-type">string</span> 279 </dt> 280 <dd></dd></dl> 281 </pulumi-choosable> 282 </div> 283 284 <div> 285 <pulumi-choosable type="language" values="go"> 286 <dl class="resources-properties"><dt class="property-" 287 title=""> 288 <span id="ciphertext_go"> 289 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#ciphertext_go" style="color: inherit; text-decoration: inherit;">Ciphertext</a> 290 </span> 291 <span class="property-indicator"></span> 292 <span class="property-type">string</span> 293 </dt> 294 <dd></dd><dt class="property-" 295 title=""> 296 <span id="cryptokey_go"> 297 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_go" style="color: inherit; text-decoration: inherit;">Crypto<wbr>Key</a> 298 </span> 299 <span class="property-indicator"></span> 300 <span class="property-type">string</span> 301 </dt> 302 <dd></dd><dt class="property-" 303 title=""> 304 <span id="id_go"> 305 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_go" style="color: inherit; text-decoration: inherit;">Id</a> 306 </span> 307 <span class="property-indicator"></span> 308 <span class="property-type">string</span> 309 </dt> 310 <dd></dd><dt class="property-" 311 title=""> 312 <span id="plaintext_go"> 313 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_go" style="color: inherit; text-decoration: inherit;">Plaintext</a> 314 </span> 315 <span class="property-indicator"></span> 316 <span class="property-type">string</span> 317 </dt> 318 <dd></dd></dl> 319 </pulumi-choosable> 320 </div> 321 322 <div> 323 <pulumi-choosable type="language" values="java"> 324 <dl class="resources-properties"><dt class="property-" 325 title=""> 326 <span id="ciphertext_java"> 327 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#ciphertext_java" style="color: inherit; text-decoration: inherit;">ciphertext</a> 328 </span> 329 <span class="property-indicator"></span> 330 <span class="property-type">String</span> 331 </dt> 332 <dd></dd><dt class="property-" 333 title=""> 334 <span id="cryptokey_java"> 335 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_java" style="color: inherit; text-decoration: inherit;">crypto<wbr>Key</a> 336 </span> 337 <span class="property-indicator"></span> 338 <span class="property-type">String</span> 339 </dt> 340 <dd></dd><dt class="property-" 341 title=""> 342 <span id="id_java"> 343 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_java" style="color: inherit; text-decoration: inherit;">id</a> 344 </span> 345 <span class="property-indicator"></span> 346 <span class="property-type">String</span> 347 </dt> 348 <dd></dd><dt class="property-" 349 title=""> 350 <span id="plaintext_java"> 351 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_java" style="color: inherit; text-decoration: inherit;">plaintext</a> 352 </span> 353 <span class="property-indicator"></span> 354 <span class="property-type">String</span> 355 </dt> 356 <dd></dd></dl> 357 </pulumi-choosable> 358 </div> 359 360 <div> 361 <pulumi-choosable type="language" values="javascript,typescript"> 362 <dl class="resources-properties"><dt class="property-" 363 title=""> 364 <span id="ciphertext_nodejs"> 365 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#ciphertext_nodejs" style="color: inherit; text-decoration: inherit;">ciphertext</a> 366 </span> 367 <span class="property-indicator"></span> 368 <span class="property-type">string</span> 369 </dt> 370 <dd></dd><dt class="property-" 371 title=""> 372 <span id="cryptokey_nodejs"> 373 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_nodejs" style="color: inherit; text-decoration: inherit;">crypto<wbr>Key</a> 374 </span> 375 <span class="property-indicator"></span> 376 <span class="property-type">string</span> 377 </dt> 378 <dd></dd><dt class="property-" 379 title=""> 380 <span id="id_nodejs"> 381 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_nodejs" style="color: inherit; text-decoration: inherit;">id</a> 382 </span> 383 <span class="property-indicator"></span> 384 <span class="property-type">string</span> 385 </dt> 386 <dd></dd><dt class="property-" 387 title=""> 388 <span id="plaintext_nodejs"> 389 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_nodejs" style="color: inherit; text-decoration: inherit;">plaintext</a> 390 </span> 391 <span class="property-indicator"></span> 392 <span class="property-type">string</span> 393 </dt> 394 <dd></dd></dl> 395 </pulumi-choosable> 396 </div> 397 398 <div> 399 <pulumi-choosable type="language" values="python"> 400 <dl class="resources-properties"><dt class="property-" 401 title=""> 402 <span id="ciphertext_python"> 403 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#ciphertext_python" style="color: inherit; text-decoration: inherit;">ciphertext</a> 404 </span> 405 <span class="property-indicator"></span> 406 <span class="property-type">str</span> 407 </dt> 408 <dd></dd><dt class="property-" 409 title=""> 410 <span id="crypto_key_python"> 411 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#crypto_key_python" style="color: inherit; text-decoration: inherit;">crypto_<wbr>key</a> 412 </span> 413 <span class="property-indicator"></span> 414 <span class="property-type">str</span> 415 </dt> 416 <dd></dd><dt class="property-" 417 title=""> 418 <span id="id_python"> 419 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_python" style="color: inherit; text-decoration: inherit;">id</a> 420 </span> 421 <span class="property-indicator"></span> 422 <span class="property-type">str</span> 423 </dt> 424 <dd></dd><dt class="property-" 425 title=""> 426 <span id="plaintext_python"> 427 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_python" style="color: inherit; text-decoration: inherit;">plaintext</a> 428 </span> 429 <span class="property-indicator"></span> 430 <span class="property-type">str</span> 431 </dt> 432 <dd></dd></dl> 433 </pulumi-choosable> 434 </div> 435 436 <div> 437 <pulumi-choosable type="language" values="yaml"> 438 <dl class="resources-properties"><dt class="property-" 439 title=""> 440 <span id="ciphertext_yaml"> 441 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#ciphertext_yaml" style="color: inherit; text-decoration: inherit;">ciphertext</a> 442 </span> 443 <span class="property-indicator"></span> 444 <span class="property-type">String</span> 445 </dt> 446 <dd></dd><dt class="property-" 447 title=""> 448 <span id="cryptokey_yaml"> 449 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#cryptokey_yaml" style="color: inherit; text-decoration: inherit;">crypto<wbr>Key</a> 450 </span> 451 <span class="property-indicator"></span> 452 <span class="property-type">String</span> 453 </dt> 454 <dd></dd><dt class="property-" 455 title=""> 456 <span id="id_yaml"> 457 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#id_yaml" style="color: inherit; text-decoration: inherit;">id</a> 458 </span> 459 <span class="property-indicator"></span> 460 <span class="property-type">String</span> 461 </dt> 462 <dd></dd><dt class="property-" 463 title=""> 464 <span id="plaintext_yaml"> 465 <a data-swiftype-name="resource-property" data-swiftype-type="text" href="#plaintext_yaml" style="color: inherit; text-decoration: inherit;">plaintext</a> 466 </span> 467 <span class="property-indicator"></span> 468 <span class="property-type">String</span> 469 </dt> 470 <dd></dd></dl> 471 </pulumi-choosable> 472 </div> 473 474 475 476 477 478 <h2 id="package-details">Package Details</h2> 479 <dl class="package-details"> 480 <dt>Repository</dt> 481 <dd><a href=""></a></dd> 482 <dt>License</dt> 483 <dd></dd> 484 </dl> 485