com.pulumi.aws.codecommit.kotlin.RepositoryArgs.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.codecommit.kotlin
import com.pulumi.aws.codecommit.RepositoryArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a CodeCommit Repository Resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.codecommit.Repository("test", {
* repositoryName: "MyTestRepository",
* description: "This is the Sample App Repository",
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.codecommit.Repository("test",
* repository_name="MyTestRepository",
* description="This is the Sample App Repository")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.CodeCommit.Repository("test", new()
* {
* RepositoryName = "MyTestRepository",
* Description = "This is the Sample App Repository",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codecommit"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := codecommit.NewRepository(ctx, "test", &codecommit.RepositoryArgs{
* RepositoryName: pulumi.String("MyTestRepository"),
* Description: pulumi.String("This is the Sample App Repository"),
* })
* 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.codecommit.Repository;
* import com.pulumi.aws.codecommit.RepositoryArgs;
* 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 test = new Repository("test", RepositoryArgs.builder()
* .repositoryName("MyTestRepository")
* .description("This is the Sample App Repository")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:codecommit:Repository
* properties:
* repositoryName: MyTestRepository
* description: This is the Sample App Repository
* ```
*
* ### AWS KMS Customer Managed Keys (CMK)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const testKey = new aws.kms.Key("test", {
* description: "test",
* deletionWindowInDays: 7,
* });
* const test = new aws.codecommit.Repository("test", {
* repositoryName: "MyTestRepository",
* description: "This is the Sample App Repository",
* kmsKeyId: testKey.arn,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test_key = aws.kms.Key("test",
* description="test",
* deletion_window_in_days=7)
* test = aws.codecommit.Repository("test",
* repository_name="MyTestRepository",
* description="This is the Sample App Repository",
* kms_key_id=test_key.arn)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var testKey = new Aws.Kms.Key("test", new()
* {
* Description = "test",
* DeletionWindowInDays = 7,
* });
* var test = new Aws.CodeCommit.Repository("test", new()
* {
* RepositoryName = "MyTestRepository",
* Description = "This is the Sample App Repository",
* KmsKeyId = testKey.Arn,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codecommit"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* testKey, err := kms.NewKey(ctx, "test", &kms.KeyArgs{
* Description: pulumi.String("test"),
* DeletionWindowInDays: pulumi.Int(7),
* })
* if err != nil {
* return err
* }
* _, err = codecommit.NewRepository(ctx, "test", &codecommit.RepositoryArgs{
* RepositoryName: pulumi.String("MyTestRepository"),
* Description: pulumi.String("This is the Sample App Repository"),
* KmsKeyId: testKey.Arn,
* })
* 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.kms.Key;
* import com.pulumi.aws.kms.KeyArgs;
* import com.pulumi.aws.codecommit.Repository;
* import com.pulumi.aws.codecommit.RepositoryArgs;
* 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 testKey = new Key("testKey", KeyArgs.builder()
* .description("test")
* .deletionWindowInDays(7)
* .build());
* var test = new Repository("test", RepositoryArgs.builder()
* .repositoryName("MyTestRepository")
* .description("This is the Sample App Repository")
* .kmsKeyId(testKey.arn())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:codecommit:Repository
* properties:
* repositoryName: MyTestRepository
* description: This is the Sample App Repository
* kmsKeyId: ${testKey.arn}
* testKey:
* type: aws:kms:Key
* name: test
* properties:
* description: test
* deletionWindowInDays: 7
* ```
*
* ## Import
* Using `pulumi import`, import CodeCommit repository using repository name. For example:
* ```sh
* $ pulumi import aws:codecommit/repository:Repository imported ExistingRepo
* ```
* @property defaultBranch The default branch of the repository. The branch specified here needs to exist.
* @property description The description of the repository. This needs to be less than 1000 characters
* @property kmsKeyId The ARN of the encryption key. If no key is specified, the default `aws/codecommit` Amazon Web Services managed key is used.
* @property repositoryName The name for the repository. This needs to be less than 100 characters.
* @property tags Key-value map of resource tags. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
public data class RepositoryArgs(
public val defaultBranch: Output? = null,
public val description: Output? = null,
public val kmsKeyId: Output? = null,
public val repositoryName: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy