1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. codeartifact
  5. Domain

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.6.0 published on Monday, Nov 4, 2024 by Pulumi

aws-native.codeartifact.Domain

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.6.0 published on Monday, Nov 4, 2024 by Pulumi

    The resource schema to create a CodeArtifact domain.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
            EncryptionKey = "arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12",
            PermissionsPolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["action"] = new[]
                        {
                            "codeartifact:ReadFromRepository",
                            "codeartifact:DescribePackageVersion",
                            "codeartifact:DescribeRepository",
                            "codeartifact:GetPackageVersionReadme",
                            "codeartifact:GetRepositoryEndpoint",
                            "codeartifact:ListPackageVersionAssets",
                            "codeartifact:ListPackageVersionDependencies",
                            "codeartifact:ListPackageVersions",
                            "codeartifact:ListPackages",
                            "codeartifact:ReadFromRepository",
                        },
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["aws"] = "arn:aws:iam::123456789012:root",
                        },
                        ["resource"] = "*",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName:    pulumi.String("my-domain"),
    			EncryptionKey: pulumi.String("arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12"),
    			PermissionsPolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"action": []string{
    							"codeartifact:ReadFromRepository",
    							"codeartifact:DescribePackageVersion",
    							"codeartifact:DescribeRepository",
    							"codeartifact:GetPackageVersionReadme",
    							"codeartifact:GetRepositoryEndpoint",
    							"codeartifact:ListPackageVersionAssets",
    							"codeartifact:ListPackageVersionDependencies",
    							"codeartifact:ListPackageVersions",
    							"codeartifact:ListPackages",
    							"codeartifact:ReadFromRepository",
    						},
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"aws": "arn:aws:iam::123456789012:root",
    						},
    						"resource": "*",
    					},
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain",
        domain_name="my-domain",
        encryption_key="arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12",
        permissions_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "action": [
                    "codeartifact:ReadFromRepository",
                    "codeartifact:DescribePackageVersion",
                    "codeartifact:DescribeRepository",
                    "codeartifact:GetPackageVersionReadme",
                    "codeartifact:GetRepositoryEndpoint",
                    "codeartifact:ListPackageVersionAssets",
                    "codeartifact:ListPackageVersionDependencies",
                    "codeartifact:ListPackageVersions",
                    "codeartifact:ListPackages",
                    "codeartifact:ReadFromRepository",
                ],
                "effect": "Allow",
                "principal": {
                    "aws": "arn:aws:iam::123456789012:root",
                },
                "resource": "*",
            }],
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {
        domainName: "my-domain",
        encryptionKey: "arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12",
        permissionsPolicyDocument: {
            version: "2012-10-17",
            statement: [{
                action: [
                    "codeartifact:ReadFromRepository",
                    "codeartifact:DescribePackageVersion",
                    "codeartifact:DescribeRepository",
                    "codeartifact:GetPackageVersionReadme",
                    "codeartifact:GetRepositoryEndpoint",
                    "codeartifact:ListPackageVersionAssets",
                    "codeartifact:ListPackageVersionDependencies",
                    "codeartifact:ListPackageVersions",
                    "codeartifact:ListPackages",
                    "codeartifact:ReadFromRepository",
                ],
                effect: "Allow",
                principal: {
                    aws: "arn:aws:iam::123456789012:root",
                },
                resource: "*",
            }],
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
            EncryptionKey = "arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12",
            PermissionsPolicyDocument = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["action"] = new[]
                        {
                            "codeartifact:ReadFromRepository",
                            "codeartifact:DescribePackageVersion",
                            "codeartifact:DescribeRepository",
                            "codeartifact:GetPackageVersionReadme",
                            "codeartifact:GetRepositoryEndpoint",
                            "codeartifact:ListPackageVersionAssets",
                            "codeartifact:ListPackageVersionDependencies",
                            "codeartifact:ListPackageVersions",
                            "codeartifact:ListPackages",
                            "codeartifact:ReadFromRepository",
                        },
                        ["effect"] = "Allow",
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["aws"] = "arn:aws:iam::123456789012:root",
                        },
                        ["resource"] = "*",
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName:    pulumi.String("my-domain"),
    			EncryptionKey: pulumi.String("arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12"),
    			PermissionsPolicyDocument: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"action": []string{
    							"codeartifact:ReadFromRepository",
    							"codeartifact:DescribePackageVersion",
    							"codeartifact:DescribeRepository",
    							"codeartifact:GetPackageVersionReadme",
    							"codeartifact:GetRepositoryEndpoint",
    							"codeartifact:ListPackageVersionAssets",
    							"codeartifact:ListPackageVersionDependencies",
    							"codeartifact:ListPackageVersions",
    							"codeartifact:ListPackages",
    							"codeartifact:ReadFromRepository",
    						},
    						"effect": "Allow",
    						"principal": map[string]interface{}{
    							"aws": "arn:aws:iam::123456789012:root",
    						},
    						"resource": "*",
    					},
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain",
        domain_name="my-domain",
        encryption_key="arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12",
        permissions_policy_document={
            "version": "2012-10-17",
            "statement": [{
                "action": [
                    "codeartifact:ReadFromRepository",
                    "codeartifact:DescribePackageVersion",
                    "codeartifact:DescribeRepository",
                    "codeartifact:GetPackageVersionReadme",
                    "codeartifact:GetRepositoryEndpoint",
                    "codeartifact:ListPackageVersionAssets",
                    "codeartifact:ListPackageVersionDependencies",
                    "codeartifact:ListPackageVersions",
                    "codeartifact:ListPackages",
                    "codeartifact:ReadFromRepository",
                ],
                "effect": "Allow",
                "principal": {
                    "aws": "arn:aws:iam::123456789012:root",
                },
                "resource": "*",
            }],
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {
        domainName: "my-domain",
        encryptionKey: "arn:aws:kms:us-west-2:123456789012:key/12345678-9abc-def1-2345-6789abcdef12",
        permissionsPolicyDocument: {
            version: "2012-10-17",
            statement: [{
                action: [
                    "codeartifact:ReadFromRepository",
                    "codeartifact:DescribePackageVersion",
                    "codeartifact:DescribeRepository",
                    "codeartifact:GetPackageVersionReadme",
                    "codeartifact:GetRepositoryEndpoint",
                    "codeartifact:ListPackageVersionAssets",
                    "codeartifact:ListPackageVersionDependencies",
                    "codeartifact:ListPackageVersions",
                    "codeartifact:ListPackages",
                    "codeartifact:ReadFromRepository",
                ],
                effect: "Allow",
                principal: {
                    aws: "arn:aws:iam::123456789012:root",
                },
                resource: "*",
            }],
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
            Tags = new[]
            {
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname1",
                    Value = "value1",
                },
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname2",
                    Value = "value2",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    			Tags: aws.TagArray{
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname1"),
    					Value: pulumi.String("value1"),
    				},
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname2"),
    					Value: pulumi.String("value2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain",
        domain_name="my-domain",
        tags=[
            {
                "key": "keyname1",
                "value": "value1",
            },
            {
                "key": "keyname2",
                "value": "value2",
            },
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {
        domainName: "my-domain",
        tags: [
            {
                key: "keyname1",
                value: "value1",
            },
            {
                key: "keyname2",
                value: "value2",
            },
        ],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
            Tags = new[]
            {
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname1",
                    Value = "value1",
                },
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname2",
                    Value = "value2",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    			Tags: aws.TagArray{
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname1"),
    					Value: pulumi.String("value1"),
    				},
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname2"),
    					Value: pulumi.String("value2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain",
        domain_name="my-domain",
        tags=[
            {
                "key": "keyname1",
                "value": "value1",
            },
            {
                "key": "keyname2",
                "value": "value2",
            },
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {
        domainName: "my-domain",
        tags: [
            {
                key: "keyname1",
                value: "value1",
            },
            {
                key: "keyname2",
                value: "value2",
            },
        ],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
        var myCodeArtifactRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactRepository", new()
        {
            RepositoryName = "my-repo",
            DomainName = myCodeArtifactDomain.Name,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myCodeArtifactDomain, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "myCodeArtifactRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    my_code_artifact_repository = aws_native.codeartifact.Repository("myCodeArtifactRepository",
        repository_name="my-repo",
        domain_name=my_code_artifact_domain.name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    const myCodeArtifactRepository = new aws_native.codeartifact.Repository("myCodeArtifactRepository", {
        repositoryName: "my-repo",
        domainName: myCodeArtifactDomain.name,
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
        var myCodeArtifactRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactRepository", new()
        {
            RepositoryName = "my-repo",
            DomainName = myCodeArtifactDomain.Name,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myCodeArtifactDomain, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "myCodeArtifactRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    my_code_artifact_repository = aws_native.codeartifact.Repository("myCodeArtifactRepository",
        repository_name="my-repo",
        domain_name=my_code_artifact_domain.name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    const myCodeArtifactRepository = new aws_native.codeartifact.Repository("myCodeArtifactRepository", {
        repositoryName: "my-repo",
        domainName: myCodeArtifactDomain.name,
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
        var myCodeArtifactUpstreamRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactUpstreamRepository", new()
        {
            RepositoryName = "my-upstream-repo",
            DomainName = myCodeArtifactDomain.Name,
            ExternalConnections = new[]
            {
                "public:npmjs",
            },
        });
    
        var myCodeArtifactRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactRepository", new()
        {
            RepositoryName = "my-repo",
            DomainName = myCodeArtifactDomain.Name,
            Upstreams = new[]
            {
                myCodeArtifactUpstreamRepository.Name,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myCodeArtifactDomain, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		myCodeArtifactUpstreamRepository, err := codeartifact.NewRepository(ctx, "myCodeArtifactUpstreamRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-upstream-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    			ExternalConnections: pulumi.StringArray{
    				pulumi.String("public:npmjs"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "myCodeArtifactRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    			Upstreams: pulumi.StringArray{
    				myCodeArtifactUpstreamRepository.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    my_code_artifact_upstream_repository = aws_native.codeartifact.Repository("myCodeArtifactUpstreamRepository",
        repository_name="my-upstream-repo",
        domain_name=my_code_artifact_domain.name,
        external_connections=["public:npmjs"])
    my_code_artifact_repository = aws_native.codeartifact.Repository("myCodeArtifactRepository",
        repository_name="my-repo",
        domain_name=my_code_artifact_domain.name,
        upstreams=[my_code_artifact_upstream_repository.name])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    const myCodeArtifactUpstreamRepository = new aws_native.codeartifact.Repository("myCodeArtifactUpstreamRepository", {
        repositoryName: "my-upstream-repo",
        domainName: myCodeArtifactDomain.name,
        externalConnections: ["public:npmjs"],
    });
    const myCodeArtifactRepository = new aws_native.codeartifact.Repository("myCodeArtifactRepository", {
        repositoryName: "my-repo",
        domainName: myCodeArtifactDomain.name,
        upstreams: [myCodeArtifactUpstreamRepository.name],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
        var myCodeArtifactUpstreamRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactUpstreamRepository", new()
        {
            RepositoryName = "my-upstream-repo",
            DomainName = myCodeArtifactDomain.Name,
            ExternalConnections = new[]
            {
                "public:npmjs",
            },
        });
    
        var myCodeArtifactRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactRepository", new()
        {
            RepositoryName = "my-repo",
            DomainName = myCodeArtifactDomain.Name,
            Upstreams = new[]
            {
                myCodeArtifactUpstreamRepository.Name,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myCodeArtifactDomain, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		myCodeArtifactUpstreamRepository, err := codeartifact.NewRepository(ctx, "myCodeArtifactUpstreamRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-upstream-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    			ExternalConnections: pulumi.StringArray{
    				pulumi.String("public:npmjs"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "myCodeArtifactRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    			Upstreams: pulumi.StringArray{
    				myCodeArtifactUpstreamRepository.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    my_code_artifact_upstream_repository = aws_native.codeartifact.Repository("myCodeArtifactUpstreamRepository",
        repository_name="my-upstream-repo",
        domain_name=my_code_artifact_domain.name,
        external_connections=["public:npmjs"])
    my_code_artifact_repository = aws_native.codeartifact.Repository("myCodeArtifactRepository",
        repository_name="my-repo",
        domain_name=my_code_artifact_domain.name,
        upstreams=[my_code_artifact_upstream_repository.name])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    const myCodeArtifactUpstreamRepository = new aws_native.codeartifact.Repository("myCodeArtifactUpstreamRepository", {
        repositoryName: "my-upstream-repo",
        domainName: myCodeArtifactDomain.name,
        externalConnections: ["public:npmjs"],
    });
    const myCodeArtifactRepository = new aws_native.codeartifact.Repository("myCodeArtifactRepository", {
        repositoryName: "my-repo",
        domainName: myCodeArtifactDomain.name,
        upstreams: [myCodeArtifactUpstreamRepository.name],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
        var myCodeArtifactRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactRepository", new()
        {
            RepositoryName = "my-repo",
            DomainName = myCodeArtifactDomain.Name,
            Tags = new[]
            {
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname1",
                    Value = "value1",
                },
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname2",
                    Value = "value2",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myCodeArtifactDomain, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "myCodeArtifactRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    			Tags: aws.TagArray{
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname1"),
    					Value: pulumi.String("value1"),
    				},
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname2"),
    					Value: pulumi.String("value2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    my_code_artifact_repository = aws_native.codeartifact.Repository("myCodeArtifactRepository",
        repository_name="my-repo",
        domain_name=my_code_artifact_domain.name,
        tags=[
            {
                "key": "keyname1",
                "value": "value1",
            },
            {
                "key": "keyname2",
                "value": "value2",
            },
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    const myCodeArtifactRepository = new aws_native.codeartifact.Repository("myCodeArtifactRepository", {
        repositoryName: "my-repo",
        domainName: myCodeArtifactDomain.name,
        tags: [
            {
                key: "keyname1",
                value: "value1",
            },
            {
                key: "keyname2",
                value: "value2",
            },
        ],
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myCodeArtifactDomain = new AwsNative.CodeArtifact.Domain("myCodeArtifactDomain", new()
        {
            DomainName = "my-domain",
        });
    
        var myCodeArtifactRepository = new AwsNative.CodeArtifact.Repository("myCodeArtifactRepository", new()
        {
            RepositoryName = "my-repo",
            DomainName = myCodeArtifactDomain.Name,
            Tags = new[]
            {
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname1",
                    Value = "value1",
                },
                new AwsNative.Inputs.TagArgs
                {
                    Key = "keyname2",
                    Value = "value2",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/codeartifact"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myCodeArtifactDomain, err := codeartifact.NewDomain(ctx, "myCodeArtifactDomain", &codeartifact.DomainArgs{
    			DomainName: pulumi.String("my-domain"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = codeartifact.NewRepository(ctx, "myCodeArtifactRepository", &codeartifact.RepositoryArgs{
    			RepositoryName: pulumi.String("my-repo"),
    			DomainName:     myCodeArtifactDomain.Name,
    			Tags: aws.TagArray{
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname1"),
    					Value: pulumi.String("value1"),
    				},
    				&aws.TagArgs{
    					Key:   pulumi.String("keyname2"),
    					Value: pulumi.String("value2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_code_artifact_domain = aws_native.codeartifact.Domain("myCodeArtifactDomain", domain_name="my-domain")
    my_code_artifact_repository = aws_native.codeartifact.Repository("myCodeArtifactRepository",
        repository_name="my-repo",
        domain_name=my_code_artifact_domain.name,
        tags=[
            {
                "key": "keyname1",
                "value": "value1",
            },
            {
                "key": "keyname2",
                "value": "value2",
            },
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myCodeArtifactDomain = new aws_native.codeartifact.Domain("myCodeArtifactDomain", {domainName: "my-domain"});
    const myCodeArtifactRepository = new aws_native.codeartifact.Repository("myCodeArtifactRepository", {
        repositoryName: "my-repo",
        domainName: myCodeArtifactDomain.name,
        tags: [
            {
                key: "keyname1",
                value: "value1",
            },
            {
                key: "keyname2",
                value: "value2",
            },
        ],
    });
    

    Coming soon!

    Create Domain Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Domain(name: string, args?: DomainArgs, opts?: CustomResourceOptions);
    @overload
    def Domain(resource_name: str,
               args: Optional[DomainArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Domain(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               domain_name: Optional[str] = None,
               encryption_key: Optional[str] = None,
               permissions_policy_document: Optional[Any] = None,
               tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
    func NewDomain(ctx *Context, name string, args *DomainArgs, opts ...ResourceOption) (*Domain, error)
    public Domain(string name, DomainArgs? args = null, CustomResourceOptions? opts = null)
    public Domain(String name, DomainArgs args)
    public Domain(String name, DomainArgs args, CustomResourceOptions options)
    
    type: aws-native:codeartifact:Domain
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Domain Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Domain resource accepts the following input properties:

    DomainName string
    The name of the domain.
    EncryptionKey string
    The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
    PermissionsPolicyDocument object

    The access control resource policy on the provided domain.

    Search the CloudFormation User Guide for AWS::CodeArtifact::Domain for more information about the expected schema for this property.

    Tags List<Pulumi.AwsNative.Inputs.Tag>
    An array of key-value pairs to apply to this resource.
    DomainName string
    The name of the domain.
    EncryptionKey string
    The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
    PermissionsPolicyDocument interface{}

    The access control resource policy on the provided domain.

    Search the CloudFormation User Guide for AWS::CodeArtifact::Domain for more information about the expected schema for this property.

    Tags TagArgs
    An array of key-value pairs to apply to this resource.
    domainName String
    The name of the domain.
    encryptionKey String
    The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
    permissionsPolicyDocument Object

    The access control resource policy on the provided domain.

    Search the CloudFormation User Guide for AWS::CodeArtifact::Domain for more information about the expected schema for this property.

    tags List<Tag>
    An array of key-value pairs to apply to this resource.
    domainName string
    The name of the domain.
    encryptionKey string
    The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
    permissionsPolicyDocument any

    The access control resource policy on the provided domain.

    Search the CloudFormation User Guide for AWS::CodeArtifact::Domain for more information about the expected schema for this property.

    tags Tag[]
    An array of key-value pairs to apply to this resource.
    domain_name str
    The name of the domain.
    encryption_key str
    The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
    permissions_policy_document Any

    The access control resource policy on the provided domain.

    Search the CloudFormation User Guide for AWS::CodeArtifact::Domain for more information about the expected schema for this property.

    tags Sequence[TagArgs]
    An array of key-value pairs to apply to this resource.
    domainName String
    The name of the domain.
    encryptionKey String
    The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
    permissionsPolicyDocument Any

    The access control resource policy on the provided domain.

    Search the CloudFormation User Guide for AWS::CodeArtifact::Domain for more information about the expected schema for this property.

    tags List<Property Map>
    An array of key-value pairs to apply to this resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Domain resource produces the following output properties:

    Arn string
    The ARN of the domain.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the domain. This field is used for GetAtt
    Owner string
    The 12-digit account ID of the AWS account that owns the domain. This field is used for GetAtt
    Arn string
    The ARN of the domain.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the domain. This field is used for GetAtt
    Owner string
    The 12-digit account ID of the AWS account that owns the domain. This field is used for GetAtt
    arn String
    The ARN of the domain.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the domain. This field is used for GetAtt
    owner String
    The 12-digit account ID of the AWS account that owns the domain. This field is used for GetAtt
    arn string
    The ARN of the domain.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the domain. This field is used for GetAtt
    owner string
    The 12-digit account ID of the AWS account that owns the domain. This field is used for GetAtt
    arn str
    The ARN of the domain.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the domain. This field is used for GetAtt
    owner str
    The 12-digit account ID of the AWS account that owns the domain. This field is used for GetAtt
    arn String
    The ARN of the domain.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the domain. This field is used for GetAtt
    owner String
    The 12-digit account ID of the AWS account that owns the domain. This field is used for GetAtt

    Supporting Types

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.6.0 published on Monday, Nov 4, 2024 by Pulumi