com.pulumi.aws.medialive.kotlin.Input.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.medialive.kotlin
import com.pulumi.aws.medialive.kotlin.outputs.InputDestination
import com.pulumi.aws.medialive.kotlin.outputs.InputInputDevice
import com.pulumi.aws.medialive.kotlin.outputs.InputMediaConnectFlow
import com.pulumi.aws.medialive.kotlin.outputs.InputSource
import com.pulumi.aws.medialive.kotlin.outputs.InputVpc
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.aws.medialive.kotlin.outputs.InputDestination.Companion.toKotlin as inputDestinationToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.InputInputDevice.Companion.toKotlin as inputInputDeviceToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.InputMediaConnectFlow.Companion.toKotlin as inputMediaConnectFlowToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.InputSource.Companion.toKotlin as inputSourceToKotlin
import com.pulumi.aws.medialive.kotlin.outputs.InputVpc.Companion.toKotlin as inputVpcToKotlin
/**
* Builder for [Input].
*/
@PulumiTagMarker
public class InputResourceBuilder internal constructor() {
public var name: String? = null
public var args: InputArgs = InputArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend InputArgsBuilder.() -> Unit) {
val builder = InputArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Input {
val builtJavaResource = com.pulumi.aws.medialive.Input(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Input(builtJavaResource)
}
}
/**
* Resource for managing an AWS MediaLive Input.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.medialive.InputSecurityGroup("example", {
* whitelistRules: [{
* cidr: "10.0.0.8/32",
* }],
* tags: {
* ENVIRONMENT: "prod",
* },
* });
* const exampleInput = new aws.medialive.Input("example", {
* name: "example-input",
* inputSecurityGroups: [example.id],
* type: "UDP_PUSH",
* tags: {
* ENVIRONMENT: "prod",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.medialive.InputSecurityGroup("example",
* whitelist_rules=[{
* "cidr": "10.0.0.8/32",
* }],
* tags={
* "ENVIRONMENT": "prod",
* })
* example_input = aws.medialive.Input("example",
* name="example-input",
* input_security_groups=[example.id],
* type="UDP_PUSH",
* tags={
* "ENVIRONMENT": "prod",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.MediaLive.InputSecurityGroup("example", new()
* {
* WhitelistRules = new[]
* {
* new Aws.MediaLive.Inputs.InputSecurityGroupWhitelistRuleArgs
* {
* Cidr = "10.0.0.8/32",
* },
* },
* Tags =
* {
* { "ENVIRONMENT", "prod" },
* },
* });
* var exampleInput = new Aws.MediaLive.Input("example", new()
* {
* Name = "example-input",
* InputSecurityGroups = new[]
* {
* example.Id,
* },
* Type = "UDP_PUSH",
* Tags =
* {
* { "ENVIRONMENT", "prod" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/medialive"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := medialive.NewInputSecurityGroup(ctx, "example", &medialive.InputSecurityGroupArgs{
* WhitelistRules: medialive.InputSecurityGroupWhitelistRuleArray{
* &medialive.InputSecurityGroupWhitelistRuleArgs{
* Cidr: pulumi.String("10.0.0.8/32"),
* },
* },
* Tags: pulumi.StringMap{
* "ENVIRONMENT": pulumi.String("prod"),
* },
* })
* if err != nil {
* return err
* }
* _, err = medialive.NewInput(ctx, "example", &medialive.InputArgs{
* Name: pulumi.String("example-input"),
* InputSecurityGroups: pulumi.StringArray{
* example.ID(),
* },
* Type: pulumi.String("UDP_PUSH"),
* Tags: pulumi.StringMap{
* "ENVIRONMENT": pulumi.String("prod"),
* },
* })
* 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.medialive.InputSecurityGroup;
* import com.pulumi.aws.medialive.InputSecurityGroupArgs;
* import com.pulumi.aws.medialive.inputs.InputSecurityGroupWhitelistRuleArgs;
* import com.pulumi.aws.medialive.Input;
* import com.pulumi.aws.medialive.InputArgs;
* 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) {
* var example = new InputSecurityGroup("example", InputSecurityGroupArgs.builder()
* .whitelistRules(InputSecurityGroupWhitelistRuleArgs.builder()
* .cidr("10.0.0.8/32")
* .build())
* .tags(Map.of("ENVIRONMENT", "prod"))
* .build());
* var exampleInput = new Input("exampleInput", InputArgs.builder()
* .name("example-input")
* .inputSecurityGroups(example.id())
* .type("UDP_PUSH")
* .tags(Map.of("ENVIRONMENT", "prod"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:medialive:InputSecurityGroup
* properties:
* whitelistRules:
* - cidr: 10.0.0.8/32
* tags:
* ENVIRONMENT: prod
* exampleInput:
* type: aws:medialive:Input
* name: example
* properties:
* name: example-input
* inputSecurityGroups:
* - ${example.id}
* type: UDP_PUSH
* tags:
* ENVIRONMENT: prod
* ```
*
* ## Import
* Using `pulumi import`, import MediaLive Input using the `id`. For example:
* ```sh
* $ pulumi import aws:medialive/input:Input example 12345678
* ```
*/
public class Input internal constructor(
override val javaResource: com.pulumi.aws.medialive.Input,
) : KotlinCustomResource(javaResource, InputMapper) {
/**
* ARN of the Input.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Channels attached to Input.
*/
public val attachedChannels: Output>
get() = javaResource.attachedChannels().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Destination settings for PUSH type inputs. See Destinations for more details.
*/
public val destinations: Output>?
get() = javaResource.destinations().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> inputDestinationToKotlin(args0) })
})
}).orElse(null)
})
/**
* The input class.
*/
public val inputClass: Output
get() = javaResource.inputClass().applyValue({ args0 -> args0 })
/**
* Settings for the devices. See Input Devices for more details.
*/
public val inputDevices: Output>
get() = javaResource.inputDevices().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
inputInputDeviceToKotlin(args0)
})
})
})
/**
* A list of IDs for all Inputs which are partners of this one.
*/
public val inputPartnerIds: Output>
get() = javaResource.inputPartnerIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* List of input security groups.
*/
public val inputSecurityGroups: Output>?
get() = javaResource.inputSecurityGroups().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* Source type of the input.
*/
public val inputSourceType: Output
get() = javaResource.inputSourceType().applyValue({ args0 -> args0 })
/**
* A list of the MediaConnect Flows. See Media Connect Flows for more details.
*/
public val mediaConnectFlows: Output>
get() = javaResource.mediaConnectFlows().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> inputMediaConnectFlowToKotlin(args0) })
})
})
/**
* Name of the input.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ARN of the role this input assumes during and after creation.
*/
public val roleArn: Output
get() = javaResource.roleArn().applyValue({ args0 -> args0 })
/**
* The source URLs for a PULL-type input. See Sources for more details.
*/
public val sources: Output>
get() = javaResource.sources().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
inputSourceToKotlin(args0)
})
})
})
/**
* A map of tags to assign to the Input. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy