Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.27 KB

operators.rst

File metadata and controls

37 lines (22 loc) · 1.27 KB

Operators =====

Condition operators are available though the Operator class. First import it along with the Statement:

ts

// for use without AWS CDK use the iam-floyd package import { Operator, Statement } from 'iam-floyd';

// for use with CDK use the cdk-iam-floyd package import { Operator, Statement } from 'cdk-iam-floyd';

js

// for use without AWS CDK use the iam-floyd package const { Operator, Statement } = require('iam-floyd');

// for use with CDK use the cdk-iam-floyd package const { Operator, Statement } = require('cdk-iam-floyd');

Operators can be simple strings such as StringEquals or get complex with modifiers such as ForAnyValue or IfExists. For simple operators you can use the static properties of the Operator class:

conditions-operator-simple

Complex operators can be generated by instantiating the Operator class and calling its methods:

conditions-operator-all-values

conditions-operator-any-value

conditions-operator-if-exists