aws-cdk-lib.aws_appsync.KeyCondition

class KeyCondition

LanguageType name
.NETAmazon.CDK.AWS.AppSync.KeyCondition
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappsync#KeyCondition
Javasoftware.amazon.awscdk.services.appsync.KeyCondition
Pythonaws_cdk.aws_appsync.KeyCondition
TypeScript (source)aws-cdk-lib » aws_appsync » KeyCondition

Factory class for DynamoDB key conditions.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const keyCondition = appsync.KeyCondition.beginsWith('keyName', 'arg');

Methods

NameDescription
and(keyCond)Conjunction between two conditions.
renderTemplate()Renders the key condition to a VTL string.
static beginsWith(keyName, arg)Condition (k, arg).
static between(keyName, arg1, arg2)Condition k BETWEEN arg1 AND arg2, true if k >= arg1 and k <= arg2.
static eq(keyName, arg)Condition k = arg, true if the key attribute k is equal to the Query argument.
static ge(keyName, arg)Condition k >= arg, true if the key attribute k is greater or equal to the Query argument.
static gt(keyName, arg)Condition k > arg, true if the key attribute k is greater than the the Query argument.
static le(keyName, arg)Condition k <= arg, true if the key attribute k is less than or equal to the Query argument.
static lt(keyName, arg)Condition k < arg, true if the key attribute k is less than the Query argument.

and(keyCond)

public and(keyCond: KeyCondition): KeyCondition

Parameters

  • keyCond KeyCondition

Returns

  • KeyCondition

Conjunction between two conditions.


renderTemplate()

public renderTemplate(): string

Returns

  • string

Renders the key condition to a VTL string.


static beginsWith(keyName, arg)

public static beginsWith(keyName: string, arg: string): KeyCondition

Parameters

  • keyName string
  • arg string

Returns

  • KeyCondition

Condition (k, arg).

True if the key attribute k begins with the Query argument.


static between(keyName, arg1, arg2)

public static between(keyName: string, arg1: string, arg2: string): KeyCondition

Parameters

  • keyName string
  • arg1 string
  • arg2 string

Returns

  • KeyCondition

Condition k BETWEEN arg1 AND arg2, true if k >= arg1 and k <= arg2.


static eq(keyName, arg)

public static eq(keyName: string, arg: string): KeyCondition

Parameters

  • keyName string
  • arg string

Returns

  • KeyCondition

Condition k = arg, true if the key attribute k is equal to the Query argument.


static ge(keyName, arg)

public static ge(keyName: string, arg: string): KeyCondition

Parameters

  • keyName string
  • arg string

Returns

  • KeyCondition

Condition k >= arg, true if the key attribute k is greater or equal to the Query argument.


static gt(keyName, arg)

public static gt(keyName: string, arg: string): KeyCondition

Parameters

  • keyName string
  • arg string

Returns

  • KeyCondition

Condition k > arg, true if the key attribute k is greater than the the Query argument.


static le(keyName, arg)

public static le(keyName: string, arg: string): KeyCondition

Parameters

  • keyName string
  • arg string

Returns

  • KeyCondition

Condition k <= arg, true if the key attribute k is less than or equal to the Query argument.


static lt(keyName, arg)

public static lt(keyName: string, arg: string): KeyCondition

Parameters

  • keyName string
  • arg string

Returns

  • KeyCondition

Condition k < arg, true if the key attribute k is less than the Query argument.