ContainerImageAssetCacheOption Struct
Options for configuring the Docker cache backend.
| Source | lib/cloud-assembly/metadata-schema.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const containerImageAssetCacheOption: cloud_assembly_schema.ContainerImageAssetCacheOption = {
type: 'type',
// the properties below are optional
params: {
paramsKey: 'params',
},
};
python
from aws_cdk.cloud_assembly_schema import ContainerImageAssetCacheOption
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cloud_assembly_schema
container_image_asset_cache_option = ContainerImageAssetCacheOption(
type="type",
# the properties below are optional
params={
"params_key": "params"
}
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloud_assembly_schema.*;
ContainerImageAssetCacheOption containerImageAssetCacheOption = ContainerImageAssetCacheOption.builder()
.type("type")
// the properties below are optional
.params(Map.of(
"paramsKey", "params"))
.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.Cloud_assembly_schema;
var containerImageAssetCacheOption = new ContainerImageAssetCacheOption {
Type = "type",
// the properties below are optional
Params = new Dictionary<string, string> {
{ "paramsKey", "params" }
}
};
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"
containerImageAssetCacheOption := &ContainerImageAssetCacheOption{
Type: jsii.String("type"),
// the properties below are optional
Params: map[string]*string{
"paramsKey": jsii.String("params"),
},
}
Properties
paramsoptional{ [key: string]: string }paramsoptionaltyping.Mapping[str, str]paramsoptionalMap<String, String>ParamsoptionalIDictionary<string, string>Paramsoptional*map[string]*string #Any parameters to pass into the docker cache backend configuration.
Default: {} No options provided
Refer to https://docs.docker.com/build/cache/backends/ for cache backend configuration.
example
ts
declare const branch: string;
const params = {
ref: `12345678.dkr.ecr.us-west-2.amazonaws.com/cache:${branch}`,
mode: "max",
};
The type of cache to use.
Refer to https://docs.docker.com/build/cache/backends/ for full list of backends.
example
ts
'registry'