com.pulumi.aws.synthetics.kotlin.SyntheticsFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.synthetics.kotlin
import com.pulumi.aws.synthetics.SyntheticsFunctions.getRuntimeVersionPlain
import com.pulumi.aws.synthetics.SyntheticsFunctions.getRuntimeVersionsPlain
import com.pulumi.aws.synthetics.kotlin.inputs.GetRuntimeVersionPlainArgs
import com.pulumi.aws.synthetics.kotlin.inputs.GetRuntimeVersionPlainArgsBuilder
import com.pulumi.aws.synthetics.kotlin.inputs.GetRuntimeVersionsPlainArgs
import com.pulumi.aws.synthetics.kotlin.inputs.GetRuntimeVersionsPlainArgsBuilder
import com.pulumi.aws.synthetics.kotlin.inputs.GetRuntimeVersionsRuntimeVersion
import com.pulumi.aws.synthetics.kotlin.outputs.GetRuntimeVersionResult
import com.pulumi.aws.synthetics.kotlin.outputs.GetRuntimeVersionsResult
import kotlinx.coroutines.future.await
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.aws.synthetics.kotlin.outputs.GetRuntimeVersionResult.Companion.toKotlin as getRuntimeVersionResultToKotlin
import com.pulumi.aws.synthetics.kotlin.outputs.GetRuntimeVersionsResult.Companion.toKotlin as getRuntimeVersionsResultToKotlin
public object SyntheticsFunctions {
/**
* Data source for managing an AWS CloudWatch Synthetics Runtime Version.
* ## Example Usage
* ### Latest Runtime Version
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = aws.synthetics.getRuntimeVersion({
* prefix: "syn-nodejs-puppeteer",
* latest: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.synthetics.get_runtime_version(prefix="syn-nodejs-puppeteer",
* latest=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = Aws.Synthetics.GetRuntimeVersion.Invoke(new()
* {
* Prefix = "syn-nodejs-puppeteer",
* Latest = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := synthetics.GetRuntimeVersion(ctx, &synthetics.GetRuntimeVersionArgs{
* Prefix: "syn-nodejs-puppeteer",
* Latest: pulumi.BoolRef(true),
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.synthetics.SyntheticsFunctions;
* import com.pulumi.aws.synthetics.inputs.GetRuntimeVersionArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* final var example = SyntheticsFunctions.getRuntimeVersion(GetRuntimeVersionArgs.builder()
* .prefix("syn-nodejs-puppeteer")
* .latest(true)
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: aws:synthetics:getRuntimeVersion
* Arguments:
* prefix: syn-nodejs-puppeteer
* latest: true
* ```
*
* ### Specific Runtime Version
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = aws.synthetics.getRuntimeVersion({
* prefix: "syn-nodejs-puppeteer",
* version: "9.0",
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.synthetics.get_runtime_version(prefix="syn-nodejs-puppeteer",
* version="9.0")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = Aws.Synthetics.GetRuntimeVersion.Invoke(new()
* {
* Prefix = "syn-nodejs-puppeteer",
* Version = "9.0",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := synthetics.GetRuntimeVersion(ctx, &synthetics.GetRuntimeVersionArgs{
* Prefix: "syn-nodejs-puppeteer",
* Version: pulumi.StringRef("9.0"),
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.synthetics.SyntheticsFunctions;
* import com.pulumi.aws.synthetics.inputs.GetRuntimeVersionArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* final var example = SyntheticsFunctions.getRuntimeVersion(GetRuntimeVersionArgs.builder()
* .prefix("syn-nodejs-puppeteer")
* .version("9.0")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: aws:synthetics:getRuntimeVersion
* Arguments:
* prefix: syn-nodejs-puppeteer
* version: '9.0'
* ```
*
* @param argument A collection of arguments for invoking getRuntimeVersion.
* @return A collection of values returned by getRuntimeVersion.
*/
public suspend fun getRuntimeVersion(argument: GetRuntimeVersionPlainArgs): GetRuntimeVersionResult =
getRuntimeVersionResultToKotlin(getRuntimeVersionPlain(argument.toJava()).await())
/**
* @see [getRuntimeVersion].
* @param latest Whether the latest version of the runtime should be fetched. Conflicts with `version`. Valid values: `true`.
* @param prefix Name prefix of the runtime version (for example, `syn-nodejs-puppeteer`).
* The following arguments are optional:
* @param version Version of the runtime to be fetched (for example, `9.0`). Conflicts with `latest`.
* @return A collection of values returned by getRuntimeVersion.
*/
public suspend fun getRuntimeVersion(
latest: Boolean? = null,
prefix: String,
version: String? = null,
): GetRuntimeVersionResult {
val argument = GetRuntimeVersionPlainArgs(
latest = latest,
prefix = prefix,
version = version,
)
return getRuntimeVersionResultToKotlin(getRuntimeVersionPlain(argument.toJava()).await())
}
/**
* @see [getRuntimeVersion].
* @param argument Builder for [com.pulumi.aws.synthetics.kotlin.inputs.GetRuntimeVersionPlainArgs].
* @return A collection of values returned by getRuntimeVersion.
*/
public suspend fun getRuntimeVersion(argument: suspend GetRuntimeVersionPlainArgsBuilder.() -> Unit): GetRuntimeVersionResult {
val builder = GetRuntimeVersionPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getRuntimeVersionResultToKotlin(getRuntimeVersionPlain(builtArgument.toJava()).await())
}
/**
* Data source for managing an AWS CloudWatch Synthetics Runtime Versions.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = aws.synthetics.getRuntimeVersions({});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.synthetics.get_runtime_versions()
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = Aws.Synthetics.GetRuntimeVersions.Invoke();
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := synthetics.GetRuntimeVersions(ctx, &synthetics.GetRuntimeVersionsArgs{}, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.synthetics.SyntheticsFunctions;
* import com.pulumi.aws.synthetics.inputs.GetRuntimeVersionsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* final var example = SyntheticsFunctions.getRuntimeVersions();
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: aws:synthetics:getRuntimeVersions
* Arguments: {}
* ```
*
* @param argument A collection of arguments for invoking getRuntimeVersions.
* @return A collection of values returned by getRuntimeVersions.
*/
public suspend fun getRuntimeVersions(argument: GetRuntimeVersionsPlainArgs): GetRuntimeVersionsResult =
getRuntimeVersionsResultToKotlin(getRuntimeVersionsPlain(argument.toJava()).await())
/**
* @see [getRuntimeVersions].
* @param runtimeVersions List of runtime versions. See `runtime_versions` attribute reference.
* @return A collection of values returned by getRuntimeVersions.
*/
public suspend fun getRuntimeVersions(
runtimeVersions: List? =
null,
): GetRuntimeVersionsResult {
val argument = GetRuntimeVersionsPlainArgs(
runtimeVersions = runtimeVersions,
)
return getRuntimeVersionsResultToKotlin(getRuntimeVersionsPlain(argument.toJava()).await())
}
/**
* @see [getRuntimeVersions].
* @param argument Builder for [com.pulumi.aws.synthetics.kotlin.inputs.GetRuntimeVersionsPlainArgs].
* @return A collection of values returned by getRuntimeVersions.
*/
public suspend fun getRuntimeVersions(argument: suspend GetRuntimeVersionsPlainArgsBuilder.() -> Unit): GetRuntimeVersionsResult {
val builder = GetRuntimeVersionsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getRuntimeVersionsResultToKotlin(getRuntimeVersionsPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy