class KeyCondition
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppSync.KeyCondition |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#KeyCondition |
Java | software.amazon.awscdk.services.appsync.KeyCondition |
Python | aws_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
Name | Description |
---|---|
and(keyCond) | Conjunction between two conditions. |
render | Renders the key condition to a VTL string. |
static begins | 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
Key
Condition
Returns
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
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
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
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
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
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
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
Condition k < arg, true if the key attribute k is less than the Query argument.