com.pulumi.aws.redshift.kotlin.Partner.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.redshift.kotlin
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.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [Partner].
*/
@PulumiTagMarker
public class PartnerResourceBuilder internal constructor() {
public var name: String? = null
public var args: PartnerArgs = PartnerArgs()
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 PartnerArgsBuilder.() -> Unit) {
val builder = PartnerArgsBuilder()
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(): Partner {
val builtJavaResource = com.pulumi.aws.redshift.Partner(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Partner(builtJavaResource)
}
}
/**
* Creates a new Amazon Redshift Partner Integration.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.redshift.Partner("example", {
* clusterIdentifier: exampleAwsRedshiftCluster.id,
* accountId: "1234567910",
* databaseName: exampleAwsRedshiftCluster.databaseName,
* partnerName: "example",
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.redshift.Partner("example",
* cluster_identifier=example_aws_redshift_cluster["id"],
* account_id="1234567910",
* database_name=example_aws_redshift_cluster["databaseName"],
* partner_name="example")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.RedShift.Partner("example", new()
* {
* ClusterIdentifier = exampleAwsRedshiftCluster.Id,
* AccountId = "1234567910",
* DatabaseName = exampleAwsRedshiftCluster.DatabaseName,
* PartnerName = "example",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := redshift.NewPartner(ctx, "example", &redshift.PartnerArgs{
* ClusterIdentifier: pulumi.Any(exampleAwsRedshiftCluster.Id),
* AccountId: pulumi.String("1234567910"),
* DatabaseName: pulumi.Any(exampleAwsRedshiftCluster.DatabaseName),
* PartnerName: pulumi.String("example"),
* })
* 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.redshift.Partner;
* import com.pulumi.aws.redshift.PartnerArgs;
* 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 Partner("example", PartnerArgs.builder()
* .clusterIdentifier(exampleAwsRedshiftCluster.id())
* .accountId(1234567910)
* .databaseName(exampleAwsRedshiftCluster.databaseName())
* .partnerName("example")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:redshift:Partner
* properties:
* clusterIdentifier: ${exampleAwsRedshiftCluster.id}
* accountId: 1.23456791e+09
* databaseName: ${exampleAwsRedshiftCluster.databaseName}
* partnerName: example
* ```
*
* ## Import
* Using `pulumi import`, import Redshift usage limits using the `id`. For example:
* ```sh
* $ pulumi import aws:redshift/partner:Partner example 01234567910:cluster-example-id:example:example
* ```
*/
public class Partner internal constructor(
override val javaResource: com.pulumi.aws.redshift.Partner,
) : KotlinCustomResource(javaResource, PartnerMapper) {
/**
* The Amazon Web Services account ID that owns the cluster.
*/
public val accountId: Output
get() = javaResource.accountId().applyValue({ args0 -> args0 })
/**
* The cluster identifier of the cluster that receives data from the partner.
*/
public val clusterIdentifier: Output
get() = javaResource.clusterIdentifier().applyValue({ args0 -> args0 })
/**
* The name of the database that receives data from the partner.
*/
public val databaseName: Output
get() = javaResource.databaseName().applyValue({ args0 -> args0 })
/**
* The name of the partner that is authorized to send data.
*/
public val partnerName: Output
get() = javaResource.partnerName().applyValue({ args0 -> args0 })
/**
* (Optional) The partner integration status.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 -> args0 })
/**
* (Optional) The status message provided by the partner.
*/
public val statusMessage: Output
get() = javaResource.statusMessage().applyValue({ args0 -> args0 })
}
public object PartnerMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.redshift.Partner::class == javaResource::class
override fun map(javaResource: Resource): Partner = Partner(
javaResource as
com.pulumi.aws.redshift.Partner,
)
}
/**
* @see [Partner].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Partner].
*/
public suspend fun partner(name: String, block: suspend PartnerResourceBuilder.() -> Unit): Partner {
val builder = PartnerResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Partner].
* @param name The _unique_ name of the resulting resource.
*/
public fun partner(name: String): Partner {
val builder = PartnerResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy