Skip to content
v2.277.0

OriginConfigurationProperty Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codeartifact as codeartifact } from 'aws-cdk-lib';
const originConfigurationProperty: codeartifact.CfnPackageGroup.OriginConfigurationProperty = {
  restrictions: {
    externalUpstream: {
      restrictionMode: 'restrictionMode',

      // the properties below are optional
      repositories: ['repositories'],
    },
    internalUpstream: {
      restrictionMode: 'restrictionMode',

      // the properties below are optional
      repositories: ['repositories'],
    },
    publish: {
      restrictionMode: 'restrictionMode',

      // the properties below are optional
      repositories: ['repositories'],
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codeartifact as codeartifact

origin_configuration_property = codeartifact.CfnPackageGroup.OriginConfigurationProperty(
    restrictions=codeartifact.CfnPackageGroup.RestrictionsProperty(
        external_upstream=codeartifact.CfnPackageGroup.RestrictionTypeProperty(
            restriction_mode="restrictionMode",

            # the properties below are optional
            repositories=["repositories"]
        ),
        internal_upstream=codeartifact.CfnPackageGroup.RestrictionTypeProperty(
            restriction_mode="restrictionMode",

            # the properties below are optional
            repositories=["repositories"]
        ),
        publish=codeartifact.CfnPackageGroup.RestrictionTypeProperty(
            restriction_mode="restrictionMode",

            # the properties below are optional
            repositories=["repositories"]
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codeartifact.*;

OriginConfigurationProperty originConfigurationProperty = OriginConfigurationProperty.builder()
        .restrictions(RestrictionsProperty.builder()
                .externalUpstream(RestrictionTypeProperty.builder()
                        .restrictionMode("restrictionMode")

                        // the properties below are optional
                        .repositories(List.of("repositories"))
                        .build())
                .internalUpstream(RestrictionTypeProperty.builder()
                        .restrictionMode("restrictionMode")

                        // the properties below are optional
                        .repositories(List.of("repositories"))
                        .build())
                .publish(RestrictionTypeProperty.builder()
                        .restrictionMode("restrictionMode")

                        // the properties below are optional
                        .repositories(List.of("repositories"))
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeArtifact;

var originConfigurationProperty = new OriginConfigurationProperty {
    Restrictions = new RestrictionsProperty {
        ExternalUpstream = new RestrictionTypeProperty {
            RestrictionMode = "restrictionMode",

            // the properties below are optional
            Repositories = new [] { "repositories" }
        },
        InternalUpstream = new RestrictionTypeProperty {
            RestrictionMode = "restrictionMode",

            // the properties below are optional
            Repositories = new [] { "repositories" }
        },
        Publish = new RestrictionTypeProperty {
            RestrictionMode = "restrictionMode",

            // the properties below are optional
            Repositories = new [] { "repositories" }
        }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

originConfigurationProperty := &OriginConfigurationProperty{
	Restrictions: &RestrictionsProperty{
		ExternalUpstream: &RestrictionTypeProperty{
			RestrictionMode: jsii.String("restrictionMode"),

			// the properties below are optional
			Repositories: []*string{
				jsii.String("repositories"),
			},
		},
		InternalUpstream: &RestrictionTypeProperty{
			RestrictionMode: jsii.String("restrictionMode"),

			// the properties below are optional
			Repositories: []*string{
				jsii.String("repositories"),
			},
		},
		Publish: &RestrictionTypeProperty{
			RestrictionMode: jsii.String("restrictionMode"),

			// the properties below are optional
			Repositories: []*string{
				jsii.String("repositories"),
			},
		},
	},
}

Properties ​

restrictionsIResolvable | CfnPackageGroup.RestrictionsPropertyrestrictionstyping.Union[IResolvable, RestrictionsProperty]restrictionsIResolvableRestrictionsIResolvableRestrictionsinterface{} required #