Skip to content
v2.278.0

RestrictionsProperty 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 restrictionsProperty: codeartifact.CfnPackageGroup.RestrictionsProperty = {
  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

restrictions_property = 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.*;

RestrictionsProperty restrictionsProperty = 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();
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 restrictionsProperty = 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"

restrictionsProperty := &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 ​

externalUpstreamoptionalIResolvable | CfnPackageGroup.RestrictionTypePropertyexternal_upstreamoptionaltyping.Union[IResolvable, RestrictionTypeProperty]externalUpstreamoptionalIResolvableExternalUpstreamoptionalIResolvableExternalUpstreamoptionalinterface{} #
internalUpstreamoptionalIResolvable | CfnPackageGroup.RestrictionTypePropertyinternal_upstreamoptionaltyping.Union[IResolvable, RestrictionTypeProperty]internalUpstreamoptionalIResolvableInternalUpstreamoptionalIResolvableInternalUpstreamoptionalinterface{} #
publishoptionalIResolvable | CfnPackageGroup.RestrictionTypePropertypublishoptionaltyping.Union[IResolvable, RestrictionTypeProperty]publishoptionalIResolvablePublishoptionalIResolvablePublishoptionalinterface{} #