We recommend new projects start with resources from the AWS provider.
aws-native.codeartifact.Domain
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
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
The Domain resource accepts the following input properties:
- Domain
Name string - The name of the domain.
- Encryption
Key string - The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
- Permissions
Policy objectDocument 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.- List<Pulumi.
Aws Native. Inputs. Tag> - An array of key-value pairs to apply to this resource.
- Domain
Name string - The name of the domain.
- Encryption
Key string - The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
- Permissions
Policy interface{}Document 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.- Tag
Args - An array of key-value pairs to apply to this resource.
- domain
Name String - The name of the domain.
- encryption
Key String - The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
- permissions
Policy ObjectDocument 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.- List<Tag>
- An array of key-value pairs to apply to this resource.
- domain
Name string - The name of the domain.
- encryption
Key string - The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
- permissions
Policy anyDocument 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.- 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_ Anydocument 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.- Sequence[Tag
Args] - An array of key-value pairs to apply to this resource.
- domain
Name String - The name of the domain.
- encryption
Key String - The ARN of an AWS Key Management Service (AWS KMS) key associated with a domain.
- permissions
Policy AnyDocument 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.- 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:
Supporting Types
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.