All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.transfer.kotlin.ConnectorArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.transfer.kotlin

import com.pulumi.aws.transfer.ConnectorArgs.builder
import com.pulumi.aws.transfer.kotlin.inputs.ConnectorAs2ConfigArgs
import com.pulumi.aws.transfer.kotlin.inputs.ConnectorAs2ConfigArgsBuilder
import com.pulumi.aws.transfer.kotlin.inputs.ConnectorSftpConfigArgs
import com.pulumi.aws.transfer.kotlin.inputs.ConnectorSftpConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a AWS Transfer AS2 Connector resource.
 * ## Example Usage
 * ### Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.transfer.Connector("example", {
 *     accessRole: test.arn,
 *     as2Config: {
 *         compression: "DISABLED",
 *         encryptionAlgorithm: "AWS128_CBC",
 *         messageSubject: "For Connector",
 *         localProfileId: local.profileId,
 *         mdnResponse: "NONE",
 *         mdnSigningAlgorithm: "NONE",
 *         partnerProfileId: partner.profileId,
 *         signingAlgorithm: "NONE",
 *     },
 *     url: "http://www.test.com",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.transfer.Connector("example",
 *     access_role=test["arn"],
 *     as2_config={
 *         "compression": "DISABLED",
 *         "encryption_algorithm": "AWS128_CBC",
 *         "message_subject": "For Connector",
 *         "local_profile_id": local["profileId"],
 *         "mdn_response": "NONE",
 *         "mdn_signing_algorithm": "NONE",
 *         "partner_profile_id": partner["profileId"],
 *         "signing_algorithm": "NONE",
 *     },
 *     url="http://www.test.com")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Transfer.Connector("example", new()
 *     {
 *         AccessRole = test.Arn,
 *         As2Config = new Aws.Transfer.Inputs.ConnectorAs2ConfigArgs
 *         {
 *             Compression = "DISABLED",
 *             EncryptionAlgorithm = "AWS128_CBC",
 *             MessageSubject = "For Connector",
 *             LocalProfileId = local.ProfileId,
 *             MdnResponse = "NONE",
 *             MdnSigningAlgorithm = "NONE",
 *             PartnerProfileId = partner.ProfileId,
 *             SigningAlgorithm = "NONE",
 *         },
 *         Url = "http://www.test.com",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := transfer.NewConnector(ctx, "example", &transfer.ConnectorArgs{
 * 			AccessRole: pulumi.Any(test.Arn),
 * 			As2Config: &transfer.ConnectorAs2ConfigArgs{
 * 				Compression:         pulumi.String("DISABLED"),
 * 				EncryptionAlgorithm: pulumi.String("AWS128_CBC"),
 * 				MessageSubject:      pulumi.String("For Connector"),
 * 				LocalProfileId:      pulumi.Any(local.ProfileId),
 * 				MdnResponse:         pulumi.String("NONE"),
 * 				MdnSigningAlgorithm: pulumi.String("NONE"),
 * 				PartnerProfileId:    pulumi.Any(partner.ProfileId),
 * 				SigningAlgorithm:    pulumi.String("NONE"),
 * 			},
 * 			Url: pulumi.String("http://www.test.com"),
 * 		})
 * 		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.transfer.Connector;
 * import com.pulumi.aws.transfer.ConnectorArgs;
 * import com.pulumi.aws.transfer.inputs.ConnectorAs2ConfigArgs;
 * 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 Connector("example", ConnectorArgs.builder()
 *             .accessRole(test.arn())
 *             .as2Config(ConnectorAs2ConfigArgs.builder()
 *                 .compression("DISABLED")
 *                 .encryptionAlgorithm("AWS128_CBC")
 *                 .messageSubject("For Connector")
 *                 .localProfileId(local.profileId())
 *                 .mdnResponse("NONE")
 *                 .mdnSigningAlgorithm("NONE")
 *                 .partnerProfileId(partner.profileId())
 *                 .signingAlgorithm("NONE")
 *                 .build())
 *             .url("http://www.test.com")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:transfer:Connector
 *     properties:
 *       accessRole: ${test.arn}
 *       as2Config:
 *         compression: DISABLED
 *         encryptionAlgorithm: AWS128_CBC
 *         messageSubject: For Connector
 *         localProfileId: ${local.profileId}
 *         mdnResponse: NONE
 *         mdnSigningAlgorithm: NONE
 *         partnerProfileId: ${partner.profileId}
 *         signingAlgorithm: NONE
 *       url: http://www.test.com
 * ```
 * 
 * ### SFTP Connector
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.transfer.Connector("example", {
 *     accessRole: test.arn,
 *     sftpConfig: {
 *         trustedHostKeys: ["ssh-rsa AAAAB3NYourKeysHere"],
 *         userSecretId: exampleAwsSecretsmanagerSecret.id,
 *     },
 *     url: "sftp://test.com",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.transfer.Connector("example",
 *     access_role=test["arn"],
 *     sftp_config={
 *         "trusted_host_keys": ["ssh-rsa AAAAB3NYourKeysHere"],
 *         "user_secret_id": example_aws_secretsmanager_secret["id"],
 *     },
 *     url="sftp://test.com")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Transfer.Connector("example", new()
 *     {
 *         AccessRole = test.Arn,
 *         SftpConfig = new Aws.Transfer.Inputs.ConnectorSftpConfigArgs
 *         {
 *             TrustedHostKeys = new[]
 *             {
 *                 "ssh-rsa AAAAB3NYourKeysHere",
 *             },
 *             UserSecretId = exampleAwsSecretsmanagerSecret.Id,
 *         },
 *         Url = "sftp://test.com",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := transfer.NewConnector(ctx, "example", &transfer.ConnectorArgs{
 * 			AccessRole: pulumi.Any(test.Arn),
 * 			SftpConfig: &transfer.ConnectorSftpConfigArgs{
 * 				TrustedHostKeys: pulumi.StringArray{
 * 					pulumi.String("ssh-rsa AAAAB3NYourKeysHere"),
 * 				},
 * 				UserSecretId: pulumi.Any(exampleAwsSecretsmanagerSecret.Id),
 * 			},
 * 			Url: pulumi.String("sftp://test.com"),
 * 		})
 * 		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.transfer.Connector;
 * import com.pulumi.aws.transfer.ConnectorArgs;
 * import com.pulumi.aws.transfer.inputs.ConnectorSftpConfigArgs;
 * 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 Connector("example", ConnectorArgs.builder()
 *             .accessRole(test.arn())
 *             .sftpConfig(ConnectorSftpConfigArgs.builder()
 *                 .trustedHostKeys("ssh-rsa AAAAB3NYourKeysHere")
 *                 .userSecretId(exampleAwsSecretsmanagerSecret.id())
 *                 .build())
 *             .url("sftp://test.com")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:transfer:Connector
 *     properties:
 *       accessRole: ${test.arn}
 *       sftpConfig:
 *         trustedHostKeys:
 *           - ssh-rsa AAAAB3NYourKeysHere
 *         userSecretId: ${exampleAwsSecretsmanagerSecret.id}
 *       url: sftp://test.com
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Transfer AS2 Connector using the `connector_id`. For example:
 * ```sh
 * $ pulumi import aws:transfer/connector:Connector example c-4221a88afd5f4362a
 * ```
 * @property accessRole The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
 * @property as2Config Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
 * @property loggingRole The IAM Role which is required for allowing the connector to turn on CloudWatch logging for Amazon S3 events.
 * @property securityPolicyName Name of the security policy for the connector.
 * @property sftpConfig Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
 * @property tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property url The URL of the partners AS2 endpoint or SFTP endpoint.
 */
public data class ConnectorArgs(
    public val accessRole: Output? = null,
    public val as2Config: Output? = null,
    public val loggingRole: Output? = null,
    public val securityPolicyName: Output? = null,
    public val sftpConfig: Output? = null,
    public val tags: Output>? = null,
    public val url: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.transfer.ConnectorArgs =
        com.pulumi.aws.transfer.ConnectorArgs.builder()
            .accessRole(accessRole?.applyValue({ args0 -> args0 }))
            .as2Config(as2Config?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .loggingRole(loggingRole?.applyValue({ args0 -> args0 }))
            .securityPolicyName(securityPolicyName?.applyValue({ args0 -> args0 }))
            .sftpConfig(sftpConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .url(url?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConnectorArgs].
 */
@PulumiTagMarker
public class ConnectorArgsBuilder internal constructor() {
    private var accessRole: Output? = null

    private var as2Config: Output? = null

    private var loggingRole: Output? = null

    private var securityPolicyName: Output? = null

    private var sftpConfig: Output? = null

    private var tags: Output>? = null

    private var url: Output? = null

    /**
     * @param value The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
     */
    @JvmName("lolmjdgihayktuik")
    public suspend fun accessRole(`value`: Output) {
        this.accessRole = value
    }

    /**
     * @param value Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
     */
    @JvmName("ywuyuoheluaxyhkn")
    public suspend fun as2Config(`value`: Output) {
        this.as2Config = value
    }

    /**
     * @param value The IAM Role which is required for allowing the connector to turn on CloudWatch logging for Amazon S3 events.
     */
    @JvmName("cedqyyhgvwwoqiee")
    public suspend fun loggingRole(`value`: Output) {
        this.loggingRole = value
    }

    /**
     * @param value Name of the security policy for the connector.
     */
    @JvmName("nvgaaunnvsdjgldb")
    public suspend fun securityPolicyName(`value`: Output) {
        this.securityPolicyName = value
    }

    /**
     * @param value Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
     */
    @JvmName("qvslsrenjiwnjlqy")
    public suspend fun sftpConfig(`value`: Output) {
        this.sftpConfig = value
    }

    /**
     * @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("mjwubswyrpdexswf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The URL of the partners AS2 endpoint or SFTP endpoint.
     */
    @JvmName("cehthghywpjfyrgs")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

    /**
     * @param value The IAM Role which provides read and write access to the parent directory of the file location mentioned in the StartFileTransfer request.
     */
    @JvmName("wvuyktcbfnailgcf")
    public suspend fun accessRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessRole = mapped
    }

    /**
     * @param value Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
     */
    @JvmName("pwxkshxiwvxsujiy")
    public suspend fun as2Config(`value`: ConnectorAs2ConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.as2Config = mapped
    }

    /**
     * @param argument Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
     */
    @JvmName("ejaerorgyhoabkgy")
    public suspend fun as2Config(argument: suspend ConnectorAs2ConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectorAs2ConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.as2Config = mapped
    }

    /**
     * @param value The IAM Role which is required for allowing the connector to turn on CloudWatch logging for Amazon S3 events.
     */
    @JvmName("ogmtwgseiyplpjwi")
    public suspend fun loggingRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loggingRole = mapped
    }

    /**
     * @param value Name of the security policy for the connector.
     */
    @JvmName("khjpvyrctmivelfy")
    public suspend fun securityPolicyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityPolicyName = mapped
    }

    /**
     * @param value Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
     */
    @JvmName("ubkfakuvywasnqxc")
    public suspend fun sftpConfig(`value`: ConnectorSftpConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sftpConfig = mapped
    }

    /**
     * @param argument Either SFTP or AS2 is configured.The parameters to configure for the connector object. Fields documented below.
     */
    @JvmName("mnjldhoahmatdxmd")
    public suspend fun sftpConfig(argument: suspend ConnectorSftpConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ConnectorSftpConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sftpConfig = mapped
    }

    /**
     * @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ncbsainkhnlglkrf")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("varcxefjtkxouhys")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The URL of the partners AS2 endpoint or SFTP endpoint.
     */
    @JvmName("xhgwmlygcuphmqlg")
    public suspend fun url(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.url = mapped
    }

    internal fun build(): ConnectorArgs = ConnectorArgs(
        accessRole = accessRole,
        as2Config = as2Config,
        loggingRole = loggingRole,
        securityPolicyName = securityPolicyName,
        sftpConfig = sftpConfig,
        tags = tags,
        url = url,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy