Skip to content
v2.278.0

KeyValuePairProperty Struct ​

A key-value pair object.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const keyValuePairProperty: ecs.CfnDaemonTaskDefinition.KeyValuePairProperty = {
  name: 'name',
  value: 'value',
};
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_ecs as ecs

key_value_pair_property = ecs.CfnDaemonTaskDefinition.KeyValuePairProperty(
    name="name",
    value="value"
)
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.ecs.*;

KeyValuePairProperty keyValuePairProperty = KeyValuePairProperty.builder()
        .name("name")
        .value("value")
        .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.ECS;

var keyValuePairProperty = new KeyValuePairProperty {
    Name = "name",
    Value = "value"
};
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"

keyValuePairProperty := &KeyValuePairProperty{
	Name: jsii.String("name"),
	Value: jsii.String("value"),
}

Properties ​

nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
The name of the key-value pair.

For environment variables, this is the name of the environment variable.

valueoptionalstringvalueoptionalstrvalueoptionalStringValueoptionalstringValueoptional*string #
The value of the key-value pair.

For environment variables, this is the value of the environment variable.