attini_cdk_lib

package module
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

Attini CDK

The Attini CDK library contains AWS CDK constructs for creating Attini deployment plans using the CDK.

Attini allowed users to write deployment logic and package it together with the resources being deployed. The deployments are performed from within the AWS account and uses only serverless resources.

Together with the CDK the deployment logic can be we written in different programming languages.

For more information about Attini. Please visit the website. There are several guides on how to get started with different tasks.

Also check out the cdk examples repository, containing some minimalistic example implementations.

How to install

npm (Javascript/Typescript)

Run the following command:

npm i @attini/cdk
Maven (Java)

Add the following to your pom.xml file:

<dependency>
    <groupId>io.attini.cdk</groupId>
    <artifactId>attini-cdk-lib</artifactId>
    <version>1.2.1</version>
</dependency>
PyPI(Python)

Run the following command:

pip install attini-cdk-lib

How to use

To use Attini you need both the Attini CLI installed on your local machine and the Attini framework installed in your AWS account. See the get started guide for installation instructions.

Start from the root of the folder/project containing the resources that should be deployed. First create a new folder that will contain the CDK project that will become the deployment plan. In the folder, create a new cdk project in the language you prefer.

mkdir deloyment-plan-proj
cd deloyment-plan-proj
cdk init --language typescript

Install the attini constructs in the new app.

npm i @attini/cdk

Update the deployment-plan-proj stack to extend "DeploymentPlanStack" instead of "Stack". This will add the transformation necessary for Attini to function. This is also the stack where you create your deployment plan (find some examples here). All Attini types are supported, for more information on the different types, please read the guides or documentation.

In order to create an Attini distribution (the package that will be deployed) you need to create an attini-config.yaml file containing some basic data, such as the distribution name and our package instructions.

For this example, it could look like this:

distributionName: typescript-cdk-demo
initDeployConfig:
  template: deployment-plan.yaml
  stackName: ${environment}-${distributionName}-deployment-plan

package:
  prePackage:
    commands:
      - cd deployment-plan-proj
      - npm install
      - cdk synth > ../deployment-plan.yaml

The package commands will synthesise the template. For more information about packing, see the package a distribution guide.

The distribution can then be packaged and the deployed. From the root of the project, execute:

attini deploy run .

For more information about deploying a distribution. See the deploy a distribution guide.

Resources

Documentation

Overview

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Attini CDK Constructs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttiniCdk_FilterNextables added in v1.0.0

func AttiniCdk_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniCdk_FindReachableEndStates added in v1.0.0

func AttiniCdk_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniCdk_FindReachableStates added in v1.0.0

func AttiniCdk_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniCdk_IsConstruct added in v1.0.0

func AttiniCdk_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniCdk_PrefixStates added in v1.0.0

func AttiniCdk_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniCfn_FilterNextables added in v0.0.17

func AttiniCfn_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniCfn_FindReachableEndStates added in v0.0.17

func AttiniCfn_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniCfn_FindReachableStates added in v0.0.17

func AttiniCfn_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniCfn_IsConstruct added in v0.0.17

func AttiniCfn_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniCfn_PrefixStates added in v0.0.17

func AttiniCfn_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniDeploymentPlanStack_IsConstruct added in v1.0.0

func AttiniDeploymentPlanStack_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniDeploymentPlanStack_IsStack added in v1.0.0

func AttiniDeploymentPlanStack_IsStack(x interface{}) *bool

Return whether the given object is a Stack.

We do attribute detection since we can't reliably use 'instanceof'.

func AttiniDeploymentPlanStack_Of added in v1.0.0

func AttiniDeploymentPlanStack_Of(construct constructs.IConstruct) awscdk.Stack

Looks up the first stack scope in which `construct` is defined.

Fails if there is no stack up the tree.

func AttiniImport_FilterNextables added in v0.0.17

func AttiniImport_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniImport_FindReachableEndStates added in v0.0.17

func AttiniImport_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniImport_FindReachableStates added in v0.0.17

func AttiniImport_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniImport_IsConstruct added in v0.0.17

func AttiniImport_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniImport_PrefixStates added in v0.0.17

func AttiniImport_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniLambdaInvoke_FilterNextables added in v0.0.17

func AttiniLambdaInvoke_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniLambdaInvoke_FindReachableEndStates added in v0.0.17

func AttiniLambdaInvoke_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniLambdaInvoke_FindReachableStates added in v0.0.17

func AttiniLambdaInvoke_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniLambdaInvoke_IsConstruct added in v0.0.17

func AttiniLambdaInvoke_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniLambdaInvoke_PrefixStates added in v0.0.17

func AttiniLambdaInvoke_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniManualApproval_FilterNextables added in v0.0.17

func AttiniManualApproval_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniManualApproval_FindReachableEndStates added in v0.0.17

func AttiniManualApproval_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniManualApproval_FindReachableStates added in v0.0.17

func AttiniManualApproval_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniManualApproval_IsConstruct added in v0.0.17

func AttiniManualApproval_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniManualApproval_PrefixStates added in v0.0.17

func AttiniManualApproval_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniMerge_FilterNextables

func AttiniMerge_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniMerge_FindReachableEndStates

func AttiniMerge_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniMerge_FindReachableStates

func AttiniMerge_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniMerge_IsConstruct

func AttiniMerge_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniMerge_PrefixStates

func AttiniMerge_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniPayload_DISTRIBUTION_NAME_PATH added in v1.2.0

func AttiniPayload_DISTRIBUTION_NAME_PATH() *string

func AttiniPayload_DISTRIBUTION_VERSION added in v1.2.0

func AttiniPayload_DISTRIBUTION_VERSION() *string

func AttiniPayload_DistributionName added in v1.2.0

func AttiniPayload_DistributionName() *string

func AttiniPayload_ENVIRONMENT_PATH added in v1.2.0

func AttiniPayload_ENVIRONMENT_PATH() *string

func AttiniPayload_Environment added in v1.2.0

func AttiniPayload_Environment() *string

func AttiniPayload_STACK_PARAMETERS_PATH added in v1.2.0

func AttiniPayload_STACK_PARAMETERS_PATH() *string

func AttiniPayload_StackParameter added in v1.2.0

func AttiniPayload_StackParameter(parameterName *string) *string

func AttiniPayload_Version added in v1.2.0

func AttiniPayload_Version() *string

func AttiniRunnerJob_FilterNextables

func AttiniRunnerJob_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniRunnerJob_FindReachableEndStates

func AttiniRunnerJob_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniRunnerJob_FindReachableStates

func AttiniRunnerJob_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniRunnerJob_IsConstruct

func AttiniRunnerJob_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniRunnerJob_PrefixStates

func AttiniRunnerJob_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniRunner_IsConstruct

func AttiniRunner_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniRuntimeVariables_DISTRIBUTION_ID added in v1.2.0

func AttiniRuntimeVariables_DISTRIBUTION_ID() *string

func AttiniRuntimeVariables_DISTRIBUTION_NAME added in v1.2.0

func AttiniRuntimeVariables_DISTRIBUTION_NAME() *string

func AttiniRuntimeVariables_ENVIRONMENT added in v1.2.0

func AttiniRuntimeVariables_ENVIRONMENT() *string

func AttiniRuntimeVariables_INPUT_FILE_PATH added in v1.2.0

func AttiniRuntimeVariables_INPUT_FILE_PATH() *string

func AttiniRuntimeVariables_OUTPUT_FILE_PATH added in v1.2.0

func AttiniRuntimeVariables_OUTPUT_FILE_PATH() *string

func AttiniRuntimeVariables_STEP_NAME added in v1.2.0

func AttiniRuntimeVariables_STEP_NAME() *string

func AttiniSam_FilterNextables added in v0.0.19

func AttiniSam_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniSam_FindReachableEndStates added in v0.0.19

func AttiniSam_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniSam_FindReachableStates added in v0.0.19

func AttiniSam_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniSam_IsConstruct added in v0.0.19

func AttiniSam_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniSam_PrefixStates added in v0.0.19

func AttiniSam_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniState_FilterNextables

func AttiniState_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniState_FindReachableEndStates

func AttiniState_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniState_FindReachableStates

func AttiniState_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniState_IsConstruct

func AttiniState_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniState_PrefixStates

func AttiniState_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func AttiniTask_FilterNextables added in v0.0.33

func AttiniTask_FilterNextables(states *[]awsstepfunctions.State) *[]awsstepfunctions.INextable

Return only the states that allow chaining from an array of states.

func AttiniTask_FindReachableEndStates added in v0.0.33

func AttiniTask_FindReachableEndStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of end states states reachable through transitions from the given start state.

func AttiniTask_FindReachableStates added in v0.0.33

func AttiniTask_FindReachableStates(start awsstepfunctions.State, options *awsstepfunctions.FindStateOptions) *[]awsstepfunctions.State

Find the set of states reachable through transitions from the given start state.

This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.

func AttiniTask_IsConstruct added in v0.0.33

func AttiniTask_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AttiniTask_PrefixStates added in v0.0.33

func AttiniTask_PrefixStates(root constructs.IConstruct, prefix *string)

Add a prefix to the stateId of all States found in a construct tree.

func DeploymentPlan_IsConstruct

func DeploymentPlan_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func NewAttiniCdk_Override added in v1.0.0

func NewAttiniCdk_Override(a AttiniCdk, scope constructs.Construct, id *string, props *AttiniCdkProps)

func NewAttiniCfn_Override added in v0.0.17

func NewAttiniCfn_Override(a AttiniCfn, scope constructs.Construct, id *string, props *AttiniCfnProps)

func NewAttiniDeploymentPlanStack_Override added in v1.0.0

func NewAttiniDeploymentPlanStack_Override(a AttiniDeploymentPlanStack, scope constructs.Construct, id *string, props *awscdk.StackProps)

func NewAttiniImport_Override added in v0.0.17

func NewAttiniImport_Override(a AttiniImport, scope constructs.Construct, id *string, props *AttiniImportProps)

func NewAttiniLambdaInvoke_Override added in v0.0.17

func NewAttiniLambdaInvoke_Override(a AttiniLambdaInvoke, scope constructs.Construct, id *string, props *AttiniLambdaInvokeProps)

func NewAttiniManualApproval_Override added in v0.0.17

func NewAttiniManualApproval_Override(a AttiniManualApproval, scope constructs.Construct, id *string)

func NewAttiniMerge_Override

func NewAttiniMerge_Override(a AttiniMerge, scope constructs.Construct, id *string)

func NewAttiniPayload_Override added in v1.2.0

func NewAttiniPayload_Override(a AttiniPayload)

func NewAttiniRunnerJob_Override

func NewAttiniRunnerJob_Override(a AttiniRunnerJob, scope constructs.Construct, id *string, props *AttiniRunnerJobProps)

func NewAttiniRunner_Override

func NewAttiniRunner_Override(a AttiniRunner, scope constructs.Construct, id *string, props *AttiniRunnerProps)

func NewAttiniRuntimeVariables_Override added in v1.2.0

func NewAttiniRuntimeVariables_Override(a AttiniRuntimeVariables)

func NewAttiniSam_Override added in v0.0.19

func NewAttiniSam_Override(a AttiniSam, scope constructs.Construct, id *string, props *AttiniSamProps)

func NewAttiniState_Override

func NewAttiniState_Override(a AttiniState, scope constructs.Construct, id *string)

func NewAttiniTask_Override added in v0.0.33

func NewAttiniTask_Override(a AttiniTask, scope constructs.Construct, id *string)

func NewDeploymentPlan_Override

func NewDeploymentPlan_Override(d DeploymentPlan, scope constructs.Construct, id *string, props *DeploymentPlanProps)

func NewPropsUtil_Override

func NewPropsUtil_Override(p PropsUtil)

func PropsUtil_FixCase

func PropsUtil_FixCase(props interface{}) *map[string]interface{}

Types

type AttiniCdk added in v1.0.0

type AttiniCdk interface {
	AttiniTask
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Get a string value from the steps output.
	//
	// This method can only be used as the value for a key/value pair in another Attini or
	// StepFunction step.
	//
	// Example:
	//   Valid examples:
	//
	//   {my-key: step.getOutput()}
	//   {my-key: step.getOutput('path','to','key')}
	//
	//   Invalid examples:
	//
	//   {my-key: 'test'+ step.getOutput()}
	//   {my-key: '[step.getOutput()]}
	//
	GetOutput(paths ...*string) *string
	// Get the json path to this steps output.
	//
	// Convenience
	// method that will return a string with the following format
	// $.output.<id>.<path>.<path>
	GetOutputPath(paths ...*string) *string
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

The AttiniCdk step allows you to deploy CDK projects as part of your deployment plan.

func NewAttiniCdk added in v1.0.0

func NewAttiniCdk(scope constructs.Construct, id *string, props *AttiniCdkProps) AttiniCdk

type AttiniCdkProps added in v1.0.0

type AttiniCdkProps struct {
	// The path to the CDK project.
	Path *string `field:"required" json:"path" yaml:"path"`
	// Passed to the CDK --app option.
	App *string `field:"optional" json:"app" yaml:"app"`
	// Passed to the CDK --build option.
	BuildCommands *string `field:"optional" json:"buildCommands" yaml:"buildCommands"`
	// Passed to the CDK --build-exclude option.
	BuildExclude *[]*string `field:"optional" json:"buildExclude" yaml:"buildExclude"`
	// Passed to the CDK --context option.
	Context *map[string]*string `field:"optional" json:"context" yaml:"context"`
	// Configure if you want Attini to perform a diff check on the CDK app before any changes are applied.
	//
	// If there are any changes performed on the CDK app, then manual approval will be required before the changes
	// are applied.
	Diff *DiffProps `field:"optional" json:"diff" yaml:"diff"`
	// Environment variables that will be set in the shell for the runner job.
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// Passed to the CDK --force option.
	Force *bool `field:"optional" json:"force" yaml:"force"`
	// Passed to the CDK --notification-arns option.
	NotificationArns *[]*string `field:"optional" json:"notificationArns" yaml:"notificationArns"`
	// Passed to the CDK --plugins option.
	Plugins *[]*string `field:"optional" json:"plugins" yaml:"plugins"`
	// Passed to the CDK --role-arn option.
	RoleArn *string `field:"optional" json:"roleArn" yaml:"roleArn"`
	// A reference to an {@link AttiniRunner} to use for executing the job. Use {@link AttiniRunner.runnerName} to get a reference.
	//
	// If omitted the Attini default runner will be used.
	Runner *string `field:"optional" json:"runner" yaml:"runner"`
	// Passed to the CDK --parameters options.
	StackConfiguration *[]*StackConfigurationProps `field:"optional" json:"stackConfiguration" yaml:"stackConfiguration"`
	// Stacks to deploy.
	Stacks *[]*string `field:"optional" json:"stacks" yaml:"stacks"`
}

type AttiniCfn added in v0.0.17

type AttiniCfn interface {
	AttiniTask
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Get a string value from the steps output.
	//
	// This method can only be used as the value for a key/value pair in another Attini or
	// StepFunction step.
	//
	// Example:
	//   Valid examples:
	//
	//   {my-key: step.getOutput()}
	//   {my-key: step.getOutput('path','to','key')}
	//
	//   Invalid examples:
	//
	//   {my-key: 'test'+ step.getOutput()}
	//   {my-key: '[step.getOutput()]}
	//
	GetOutput(paths ...*string) *string
	// Get the json path to this steps output.
	//
	// Convenience
	// method that will return a string with the following format
	// $.output.<id>.<path>.<path>
	GetOutputPath(paths ...*string) *string
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

The AttiniCfn step can create, update or delete a CloudFormation stack.

func NewAttiniCfn added in v0.0.17

func NewAttiniCfn(scope constructs.Construct, id *string, props *AttiniCfnProps) AttiniCfn

type AttiniCfnProps added in v0.0.17

type AttiniCfnProps struct {
	// Specify if the stack should be created/updated or deleted.
	Action CfnAction `field:"optional" json:"action" yaml:"action"`
	// Specifies a path to a configuration file for the stack.
	//
	// For more information, see the {@link https://docs.attini.io/api-reference/cloudformation-configuration.html#api-reference-cloudformation-configuration documentation}
	ConfigFile *string `field:"optional" json:"configFile" yaml:"configFile"`
	// Specify if termination protection should be enabled for the stack.
	//
	// For more information, see the {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html AWS documentation}.
	EnableTerminationProtection *bool `field:"optional" json:"enableTerminationProtection" yaml:"enableTerminationProtection"`
	// The role that should be assumed when the Attini Framework deploys the CloudFormation stack.
	//
	// The ExecutionRole has to trust the following role so that it can be assumed:
	// “`
	// arn:aws:iam::{AccountId}:role/attini/attini-action-role-{Region}
	// “`.
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// An optional field name that the CloudFormations output should be placed under in the deployment plan payload.
	OutputPath *string `field:"optional" json:"outputPath" yaml:"outputPath"`
	// The CloudFormation parameters.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// The region that the template should be deployed to.
	Region *string `field:"optional" json:"region" yaml:"region"`
	// The name that should be given to the stack when deployed.
	//
	// The name must be unique in the Region in which you are creating the stack.
	//
	// Required if it is not specified in {@link configFile}.
	StackName *string `field:"optional" json:"stackName" yaml:"stackName"`
	// The arn of the StackRole, find more info here: {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html AWS CloudFormation service role}.
	StackRoleArn *string `field:"optional" json:"stackRoleArn" yaml:"stackRoleArn"`
	// The CloudFormation tags.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// The path to the CloudFormation template. Can either be:.
	//
	// 1. A path to a file in the distribution. The path should be from the root of the project and start with a "/".
	// 2. A URL to a public S3 file, starting with "https://".
	// 3. An S3 path, starting with "s3://".
	//
	// Required if it is not specified in {@link configFile}.
	Template *string `field:"optional" json:"template" yaml:"template"`
	// Variables that should be passed to any {@link configFile} that is configured.
	//
	// Variables can be referenced in the configuration file and can be used to pass data from the payload to the configuration.
	Variables *map[string]*string `field:"optional" json:"variables" yaml:"variables"`
}

type AttiniDeploymentPlanStack added in v1.0.0

type AttiniDeploymentPlanStack interface {
	awscdk.Stack
	// The AWS account into which this stack will be deployed.
	//
	// This value is resolved according to the following rules:
	//
	// 1. The value provided to `env.account` when the stack is defined. This can
	//     either be a concerete account (e.g. `585695031111`) or the
	//     `Aws.accountId` token.
	// 3. `Aws.accountId`, which represents the CloudFormation intrinsic reference
	//     `{ "Ref": "AWS::AccountId" }` encoded as a string token.
	//
	// Preferably, you should use the return value as an opaque string and not
	// attempt to parse it to implement your logic. If you do, you must first
	// check that it is a concerete value an not an unresolved token. If this
	// value is an unresolved token (`Token.isUnresolved(stack.account)` returns
	// `true`), this implies that the user wishes that this stack will synthesize
	// into a **account-agnostic template**. In this case, your code should either
	// fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
	// implement some other region-agnostic behavior.
	Account() *string
	// The ID of the cloud assembly artifact for this stack.
	ArtifactId() *string
	// Returns the list of AZs that are available in the AWS environment (account/region) associated with this stack.
	//
	// If the stack is environment-agnostic (either account and/or region are
	// tokens), this property will return an array with 2 tokens that will resolve
	// at deploy-time to the first two availability zones returned from CloudFormation's
	// `Fn::GetAZs` intrinsic function.
	//
	// If they are not available in the context, returns a set of dummy values and
	// reports them as missing, and let the CLI resolve them by calling EC2
	// `DescribeAvailabilityZones` on the target environment.
	//
	// To specify a different strategy for selecting availability zones override this method.
	AvailabilityZones() *[]*string
	// Return the stacks this stack depends on.
	Dependencies() *[]awscdk.Stack
	// The environment coordinates in which this stack is deployed.
	//
	// In the form
	// `aws://account/region`. Use `stack.account` and `stack.region` to obtain
	// the specific values, no need to parse.
	//
	// You can use this value to determine if two stacks are targeting the same
	// environment.
	//
	// If either `stack.account` or `stack.region` are not concrete values (e.g.
	// `Aws.account` or `Aws.region`) the special strings `unknown-account` and/or
	// `unknown-region` will be used respectively to indicate this stack is
	// region/account-agnostic.
	Environment() *string
	// Indicates if this is a nested stack, in which case `parentStack` will include a reference to it's parent.
	Nested() *bool
	// If this is a nested stack, returns it's parent stack.
	NestedStackParent() awscdk.Stack
	// If this is a nested stack, this represents its `AWS::CloudFormation::Stack` resource.
	//
	// `undefined` for top-level (non-nested) stacks.
	NestedStackResource() awscdk.CfnResource
	// The tree node.
	Node() constructs.Node
	// Returns the list of notification Amazon Resource Names (ARNs) for the current stack.
	NotificationArns() *[]*string
	// The partition in which this stack is defined.
	Partition() *string
	// The AWS region into which this stack will be deployed (e.g. `us-west-2`).
	//
	// This value is resolved according to the following rules:
	//
	// 1. The value provided to `env.region` when the stack is defined. This can
	//     either be a concerete region (e.g. `us-west-2`) or the `Aws.region`
	//     token.
	// 3. `Aws.region`, which is represents the CloudFormation intrinsic reference
	//     `{ "Ref": "AWS::Region" }` encoded as a string token.
	//
	// Preferably, you should use the return value as an opaque string and not
	// attempt to parse it to implement your logic. If you do, you must first
	// check that it is a concerete value an not an unresolved token. If this
	// value is an unresolved token (`Token.isUnresolved(stack.region)` returns
	// `true`), this implies that the user wishes that this stack will synthesize
	// into a **region-agnostic template**. In this case, your code should either
	// fail (throw an error, emit a synth error using `Annotations.of(construct).addError()`) or
	// implement some other region-agnostic behavior.
	Region() *string
	// The ID of the stack.
	//
	// Example:
	//   // After resolving, looks like
	//   'arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123'
	//
	StackId() *string
	// The concrete CloudFormation physical stack name.
	//
	// This is either the name defined explicitly in the `stackName` prop or
	// allocated based on the stack's location in the construct tree. Stacks that
	// are directly defined under the app use their construct `id` as their stack
	// name. Stacks that are defined deeper within the tree will use a hashed naming
	// scheme based on the construct path to ensure uniqueness.
	//
	// If you wish to obtain the deploy-time AWS::StackName intrinsic,
	// you can use `Aws.stackName` directly.
	StackName() *string
	// Synthesis method for this stack.
	Synthesizer() awscdk.IStackSynthesizer
	// Tags to be applied to the stack.
	Tags() awscdk.TagManager
	// The name of the CloudFormation template file emitted to the output directory during synthesis.
	//
	// Example value: `MyStack.template.json`
	TemplateFile() *string
	// Options for CloudFormation template (like version, transform, description).
	TemplateOptions() awscdk.ITemplateOptions
	// Whether termination protection is enabled for this stack.
	TerminationProtection() *bool
	// The Amazon domain suffix for the region in which this stack is defined.
	UrlSuffix() *string
	// Add a dependency between this stack and another stack.
	//
	// This can be used to define dependencies between any two stacks within an
	// app, and also supports nested stacks.
	AddDependency(target awscdk.Stack, reason *string)
	// Add a Transform to this stack. A Transform is a macro that AWS CloudFormation uses to process your template.
	//
	// Duplicate values are removed when stack is synthesized.
	//
	// Example:
	//   declare const stack: Stack;
	//
	//   stack.addTransform('AWS::Serverless-2016-10-31')
	//
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-section-structure.html
	//
	AddTransform(transform *string)
	// Returns the naming scheme used to allocate logical IDs.
	//
	// By default, uses
	// the `HashedAddressingScheme` but this method can be overridden to customize
	// this behavior.
	//
	// In order to make sure logical IDs are unique and stable, we hash the resource
	// construct tree path (i.e. toplevel/secondlevel/.../myresource) and add it as
	// a suffix to the path components joined without a separator (CloudFormation
	// IDs only allow alphanumeric characters).
	//
	// The result will be:
	//
	//    <path.join(”)><md5(path.join('/')>
	//      "human"      "hash"
	//
	// If the "human" part of the ID exceeds 240 characters, we simply trim it so
	// the total ID doesn't exceed CloudFormation's 255 character limit.
	//
	// We only take 8 characters from the md5 hash (0.000005 chance of collision).
	//
	// Special cases:
	//
	// - If the path only contains a single component (i.e. it's a top-level
	//    resource), we won't add the hash to it. The hash is not needed for
	//    disamiguation and also, it allows for a more straightforward migration an
	//    existing CloudFormation template to a CDK stack without logical ID changes
	//    (or renames).
	// - For aesthetic reasons, if the last components of the path are the same
	//    (i.e. `L1/L2/Pipeline/Pipeline`), they will be de-duplicated to make the
	//    resulting human portion of the ID more pleasing: `L1L2Pipeline<HASH>`
	//    instead of `L1L2PipelinePipeline<HASH>`
	// - If a component is named "Default" it will be omitted from the path. This
	//    allows refactoring higher level abstractions around constructs without affecting
	//    the IDs of already deployed resources.
	// - If a component is named "Resource" it will be omitted from the user-visible
	//    path, but included in the hash. This reduces visual noise in the human readable
	//    part of the identifier.
	AllocateLogicalId(cfnElement awscdk.CfnElement) *string
	// Create a CloudFormation Export for a value.
	//
	// Returns a string representing the corresponding `Fn.importValue()`
	// expression for this Export. You can control the name for the export by
	// passing the `name` option.
	//
	// If you don't supply a value for `name`, the value you're exporting must be
	// a Resource attribute (for example: `bucket.bucketName`) and it will be
	// given the same name as the automatic cross-stack reference that would be created
	// if you used the attribute in another Stack.
	//
	// One of the uses for this method is to *remove* the relationship between
	// two Stacks established by automatic cross-stack references. It will
	// temporarily ensure that the CloudFormation Export still exists while you
	// remove the reference from the consuming stack. After that, you can remove
	// the resource and the manual export.
	//
	// ## Example
	//
	// Here is how the process works. Let's say there are two stacks,
	// `producerStack` and `consumerStack`, and `producerStack` has a bucket
	// called `bucket`, which is referenced by `consumerStack` (perhaps because
	// an AWS Lambda Function writes into it, or something like that).
	//
	// It is not safe to remove `producerStack.bucket` because as the bucket is being
	// deleted, `consumerStack` might still be using it.
	//
	// Instead, the process takes two deployments:
	//
	// ### Deployment 1: break the relationship
	//
	// - Make sure `consumerStack` no longer references `bucket.bucketName` (maybe the consumer
	//    stack now uses its own bucket, or it writes to an AWS DynamoDB table, or maybe you just
	//    remove the Lambda Function altogether).
	// - In the `ProducerStack` class, call `this.exportValue(this.bucket.bucketName)`. This
	//    will make sure the CloudFormation Export continues to exist while the relationship
	//    between the two stacks is being broken.
	// - Deploy (this will effectively only change the `consumerStack`, but it's safe to deploy both).
	//
	// ### Deployment 2: remove the bucket resource
	//
	// - You are now free to remove the `bucket` resource from `producerStack`.
	// - Don't forget to remove the `exportValue()` call as well.
	// - Deploy again (this time only the `producerStack` will be changed -- the bucket will be deleted).
	ExportValue(exportedValue interface{}, options *awscdk.ExportValueOptions) *string
	// Creates an ARN from components.
	//
	// If `partition`, `region` or `account` are not specified, the stack's
	// partition, region and account will be used.
	//
	// If any component is the empty string, an empty string will be inserted
	// into the generated ARN at the location that component corresponds to.
	//
	// The ARN will be formatted as follows:
	//
	//    arn:{partition}:{service}:{region}:{account}:{resource}{sep}}{resource-name}
	//
	// The required ARN pieces that are omitted will be taken from the stack that
	// the 'scope' is attached to. If all ARN pieces are supplied, the supplied scope
	// can be 'undefined'.
	FormatArn(components *awscdk.ArnComponents) *string
	// Allocates a stack-unique CloudFormation-compatible logical identity for a specific resource.
	//
	// This method is called when a `CfnElement` is created and used to render the
	// initial logical identity of resources. Logical ID renames are applied at
	// this stage.
	//
	// This method uses the protected method `allocateLogicalId` to render the
	// logical ID for an element. To modify the naming scheme, extend the `Stack`
	// class and override this method.
	GetLogicalId(element awscdk.CfnElement) *string
	// Rename a generated logical identities.
	//
	// To modify the naming scheme strategy, extend the `Stack` class and
	// override the `allocateLogicalId` method.
	RenameLogicalId(oldId *string, newId *string)
	// Indicate that a context key was expected.
	//
	// Contains instructions which will be emitted into the cloud assembly on how
	// the key should be supplied.
	ReportMissingContextKey(report *cloudassemblyschema.MissingContext)
	// Resolve a tokenized value in the context of the current stack.
	Resolve(obj interface{}) interface{}
	// Splits the provided ARN into its components.
	//
	// Works both if 'arn' is a string like 'arn:aws:s3:::bucket',
	// and a Token representing a dynamic CloudFormation expression
	// (in which case the returned components will also be dynamic CloudFormation expressions,
	// encoded as Tokens).
	SplitArn(arn *string, arnFormat awscdk.ArnFormat) *awscdk.ArnComponents
	// Convert an object, potentially containing tokens, to a JSON string.
	ToJsonString(obj interface{}, space *float64) *string
	// Returns a string representation of this construct.
	ToString() *string
}

type AttiniImport added in v0.0.17

type AttiniImport interface {
	AttiniTask
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Get a string value from the steps output.
	//
	// This method can only be used as the value for a key/value pair in another Attini or
	// StepFunction step.
	//
	// Example:
	//   Valid examples:
	//
	//   {my-key: step.getOutput()}
	//   {my-key: step.getOutput('path','to','key')}
	//
	//   Invalid examples:
	//
	//   {my-key: 'test'+ step.getOutput()}
	//   {my-key: '[step.getOutput()]}
	//
	GetOutput(paths ...*string) *string
	// Get the json path to this steps output.
	//
	// Convenience
	// method that will return a string with the following format
	// $.output.<id>.<path>.<path>
	GetOutputPath(paths ...*string) *string
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

The Attini import step can be used for importing data from different sources.

A common use case for this type is reading data from the output of another distribution. For example, you could have a distribution responsible for setting up a network that exposes a VPC-id. Then the VPC-id can be imported by other deployment plans.

func NewAttiniImport added in v0.0.17

func NewAttiniImport(scope constructs.Construct, id *string, props *AttiniImportProps) AttiniImport

type AttiniImportProps added in v0.0.17

type AttiniImportProps struct {
	// Specifies what kind of source should be used.
	SourceType SourceType `field:"required" json:"sourceType" yaml:"sourceType"`
	// Used when the source of the import should be another distribution deployed in the environment.
	//
	// Before a distribution can import the output of another distribution, it first needs to be declared as a dependency in the attini-configuration file.
	DistributionSource *DistributionSource `field:"optional" json:"distributionSource" yaml:"distributionSource"`
	// The arn of the execution role that should be used for accessing the source.
	//
	// At the moment only needed for the S3 source type if Attini does not have access to the S3 Bucket.
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// A key/value map where the value is a path to a value in the imported document.
	//
	// The path follows the {@link https://goessner.net/ JSONPath} syntax. The value on the path will be included in the output of the step under the same key name as the mapping.
	Mapping *map[string]*string `field:"optional" json:"mapping" yaml:"mapping"`
	// Used when the source of the import should be a file on S3.
	//
	// The file must be either a JSON or a YAML document.
	S3Source *S3Source `field:"optional" json:"s3Source" yaml:"s3Source"`
}

type AttiniLambdaInvoke added in v0.0.17

type AttiniLambdaInvoke interface {
	AttiniState
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

AttiniLambdaInvoke will call a Lambda function while preserving the payload for subsequent steps.

func NewAttiniLambdaInvoke added in v0.0.17

func NewAttiniLambdaInvoke(scope constructs.Construct, id *string, props *AttiniLambdaInvokeProps) AttiniLambdaInvoke

type AttiniLambdaInvokeProps added in v0.0.17

type AttiniLambdaInvokeProps struct {
	// Lambda function to invoke.
	FunctionName *string `field:"required" json:"functionName" yaml:"functionName"`
	// Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function.
	ClientContext *string `field:"optional" json:"clientContext" yaml:"clientContext"`
	// Invocation type of the Lambda function.
	InvocationType awsstepfunctionstasks.LambdaInvocationType `field:"optional" json:"invocationType" yaml:"invocationType"`
	// The JSON that will be supplied as input to the Lambda function.
	//
	// If not specified then the entire payload will be passed.
	Payload *map[string]interface{} `field:"optional" json:"payload" yaml:"payload"`
	// Version or alias to invoke a published version of the function.
	Qualifier *string `field:"optional" json:"qualifier" yaml:"qualifier"`
}

type AttiniManualApproval added in v0.0.17

type AttiniManualApproval interface {
	AttiniTask
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Get a string value from the steps output.
	//
	// This method can only be used as the value for a key/value pair in another Attini or
	// StepFunction step.
	//
	// Example:
	//   Valid examples:
	//
	//   {my-key: step.getOutput()}
	//   {my-key: step.getOutput('path','to','key')}
	//
	//   Invalid examples:
	//
	//   {my-key: 'test'+ step.getOutput()}
	//   {my-key: '[step.getOutput()]}
	//
	GetOutput(paths ...*string) *string
	// Get the json path to this steps output.
	//
	// Convenience
	// method that will return a string with the following format
	// $.output.<id>.<path>.<path>
	GetOutputPath(paths ...*string) *string
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

The manual approval step will pause the deployment plan and wait for confirmation before continuing.

The deployment can be resumed by running the "attini deploy continue" command with the Attini CLI.

func NewAttiniManualApproval added in v0.0.17

func NewAttiniManualApproval(scope constructs.Construct, id *string) AttiniManualApproval

type AttiniMerge

type AttiniMerge interface {
	AttiniState
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

Some AWS StepFunction types return a list instead of an object, for example Parallel or Map.

To make the payload easier to work with, the merge step can merge all the data in the list into one object.

func NewAttiniMerge

func NewAttiniMerge(scope constructs.Construct, id *string) AttiniMerge

type AttiniPayload added in v1.2.0

type AttiniPayload interface {
}

Utility class for reading values from the payload of an Attini deployment plan.

Each method can only be used as the value of a key/value pair in an Attini or StepFunction step.

Example:

Valid example:

{my-key: AttiniPayload.environment()}

Invalid examples:

{my-key: 'test'+ AttiniPayload.environment()}
{my-key: '[step.AttiniPayload.environment()]}

type AttiniRunner

type AttiniRunner interface {
	constructs.Construct
	// The tree node.
	Node() constructs.Node
	// Returns a reference to the runner that can be used by the {@link AttiniRunnerJob} step.
	//
	// Pass it to {@link AttiniRunnerJobProps.runner}.
	RunnerName() *string
	// Returns a string representation of this construct.
	ToString() *string
}

func NewAttiniRunner

func NewAttiniRunner(scope constructs.Construct, id *string, props *AttiniRunnerProps) AttiniRunner

type AttiniRunnerJob

type AttiniRunnerJob interface {
	AttiniTask
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Get a string value from the steps output.
	//
	// This method can only be used as the value for a key/value pair in another Attini or
	// StepFunction step.
	//
	// Example:
	//   Valid examples:
	//
	//   {my-key: step.getOutput()}
	//   {my-key: step.getOutput('path','to','key')}
	//
	//   Invalid examples:
	//
	//   {my-key: 'test'+ step.getOutput()}
	//   {my-key: '[step.getOutput()]}
	//
	GetOutput(paths ...*string) *string
	// Get the json path to this steps output.
	//
	// Convenience
	// method that will return a string with the following format
	// $.output.<id>.<path>.<path>
	GetOutputPath(paths ...*string) *string
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

The AttiniRunnerJob is a quick and cost-efficient way to run shell commands using a container.

func NewAttiniRunnerJob

func NewAttiniRunnerJob(scope constructs.Construct, id *string, props *AttiniRunnerJobProps) AttiniRunnerJob

type AttiniRunnerJobProps

type AttiniRunnerJobProps struct {
	// A list of shell commands that will be executed by the Runner.
	Commands *[]*string `field:"required" json:"commands" yaml:"commands"`
	// Environment variables that will be set in the shell for the runner job.
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// A reference to an {@link AttiniRunner} to use for executing the job. Use {@link AttiniRunner.runnerName} to get a reference.
	//
	// If omitted the Attini default runner will be used.
	Runner *string `field:"optional" json:"runner" yaml:"runner"`
}

type AttiniRunnerProps

type AttiniRunnerProps struct {
	// VPC configuration.
	AwsVpcConfiguration *AwsVpcConfiguration `field:"optional" json:"awsVpcConfiguration" yaml:"awsVpcConfiguration"`
	// The name of the container in the task definition.
	//
	// This is only required if a task definition with multiple containers is specified.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// Configures an EC2 instance to host the Runner ECS task.
	//
	// By default, Attini Runners use Fargate, but you can use EC2 instead.
	// This is useful if you want to start a container from the ECS container, which is currently not possible with Fargate.
	Ec2Configuration *Ec2Configuration `field:"optional" json:"ec2Configuration" yaml:"ec2Configuration"`
	// The name of the ECS Cluster to use.
	//
	// This is not mandatory if there is a default cluster in the account.
	EcsCluster *string `field:"optional" json:"ecsCluster" yaml:"ecsCluster"`
	// A Container image that the runner should use.
	//
	// If you configure this value, Attini will configure a TaskDefinition for you.
	//
	// This configuration can not be combined with the {@link taskDefinitionArn} configuration.
	Image *string `field:"optional" json:"image" yaml:"image"`
	// The IAM Role the Runner should use.
	//
	// This IAM Role will override the IAM Role from the TaskDefinition.
	//
	// This IAM Role requires a basic execution policy that allows the runner to communicate with the deployment plan.
	// Add the following execution policy to the IAM Role:
	// “`
	// arn:aws:iam::${AccountId}:policy/attini-runner-basic-execution-policy-${Region}
	// “`.
	RoleArn *string `field:"optional" json:"roleArn" yaml:"roleArn"`
	// Configuration for the runner.
	RunnerConfiguration *RunnerConfiguration `field:"optional" json:"runnerConfiguration" yaml:"runnerConfiguration"`
	// Runner startup configuration.
	Startup *Startup `field:"optional" json:"startup" yaml:"startup"`
	// Fargate ECS task definition that the Attini Runner should use.
	//
	// If omitted, then Attini will use its default task definition.
	TaskDefinitionArn *string `field:"optional" json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
}

type AttiniRuntimeVariables added in v1.2.0

type AttiniRuntimeVariables interface {
}

Environment variables that are available when deploying a CDK app with Attini.

type AttiniSam added in v0.0.19

type AttiniSam interface {
	AttiniTask
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Get a string value from the steps output.
	//
	// This method can only be used as the value for a key/value pair in another Attini or
	// StepFunction step.
	//
	// Example:
	//   Valid examples:
	//
	//   {my-key: step.getOutput()}
	//   {my-key: step.getOutput('path','to','key')}
	//
	//   Invalid examples:
	//
	//   {my-key: 'test'+ step.getOutput()}
	//   {my-key: '[step.getOutput()]}
	//
	GetOutput(paths ...*string) *string
	// Get the json path to this steps output.
	//
	// Convenience
	// method that will return a string with the following format
	// $.output.<id>.<path>.<path>
	GetOutputPath(paths ...*string) *string
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

A step for deploying an AWS SAM Project.

func NewAttiniSam added in v0.0.19

func NewAttiniSam(scope constructs.Construct, id *string, props *AttiniSamProps) AttiniSam

type AttiniSamProps added in v0.0.19

type AttiniSamProps struct {
	// SAM project config.
	Project *Project `field:"required" json:"project" yaml:"project"`
	// The name that should be given to the stack when deployed.
	//
	// The name must be unique in the Region in which you are creating the stack.
	StackName *string `field:"required" json:"stackName" yaml:"stackName"`
	// Specify if the stack should be created/updated or deleted.
	Action CfnAction `field:"optional" json:"action" yaml:"action"`
	// Specifies a path to a configuration file for the stack.
	//
	// For more information, see the {@link https://docs.attini.io/api-reference/cloudformation-configuration.html#api-reference-cloudformation-configuration documentation}
	ConfigFile *string `field:"optional" json:"configFile" yaml:"configFile"`
	// Specify if termination protection should be enabled for the stack.
	//
	// For more information, see the {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html AWS documentation}.
	EnableTerminationProtection *bool `field:"optional" json:"enableTerminationProtection" yaml:"enableTerminationProtection"`
	// The role that should be assumed when the Attini Framework deploys the CloudFormation stack.
	//
	// The ExecutionRole has to trust the following role so that it can be assumed:
	// “`
	// arn:aws:iam::{AccountId}:role/attini/attini-action-role-{Region}
	// “`.
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// The parameters for the stack.
	//
	// For more information, see the {@link https://docs.attini.io/api-reference/cloudformation-configuration.html#api-reference-cloudformation-configuration documentation}
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// The arn of the StackRole, find more info here: {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html AWS CloudFormation service role}.
	StackRoleArn *string `field:"optional" json:"stackRoleArn" yaml:"stackRoleArn"`
	// The tags for the stack.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// Variables that should be passed to any {@link configFile} that is configured.
	//
	// Variables can be referenced in the configuration file and can be used to pass data from the payload to the configuration.
	Variables *map[string]*string `field:"optional" json:"variables" yaml:"variables"`
}

type AttiniState

type AttiniState interface {
	awsstepfunctions.State
	awsstepfunctions.IChainable
	awsstepfunctions.INextable
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

type AttiniTask added in v0.0.33

type AttiniTask interface {
	AttiniState
	Branches() *[]awsstepfunctions.StateGraph
	Comment() *string
	DefaultChoice() awsstepfunctions.State
	SetDefaultChoice(val awsstepfunctions.State)
	// Continuable states of this Chainable.
	EndStates() *[]awsstepfunctions.INextable
	// Descriptive identifier for this chainable.
	Id() *string
	InputPath() *string
	Iteration() awsstepfunctions.StateGraph
	SetIteration(val awsstepfunctions.StateGraph)
	// The tree node.
	Node() constructs.Node
	OutputPath() *string
	Parameters() *map[string]interface{}
	ResultPath() *string
	ResultSelector() *map[string]interface{}
	// First state of this Chainable.
	StartState() awsstepfunctions.State
	// Tokenized string that evaluates to the state's ID.
	StateId() *string
	Type() *string
	SetType(val *string)
	// Add a paralle branch to this state.
	AddBranch(branch awsstepfunctions.StateGraph)
	// Add a choice branch to this state.
	AddChoice(condition awsstepfunctions.Condition, next awsstepfunctions.State)
	// Add a map iterator to this state.
	AddIterator(iteration awsstepfunctions.StateGraph)
	// Add a prefix to the stateId of this state.
	AddPrefix(x *string)
	// Register this state as part of the given graph.
	//
	// Don't call this. It will be called automatically when you work
	// with states normally.
	BindToGraph(graph awsstepfunctions.StateGraph)
	// Get a string value from the steps output.
	//
	// This method can only be used as the value for a key/value pair in another Attini or
	// StepFunction step.
	//
	// Example:
	//   Valid examples:
	//
	//   {my-key: step.getOutput()}
	//   {my-key: step.getOutput('path','to','key')}
	//
	//   Invalid examples:
	//
	//   {my-key: 'test'+ step.getOutput()}
	//   {my-key: '[step.getOutput()]}
	//
	GetOutput(paths ...*string) *string
	// Get the json path to this steps output.
	//
	// Convenience
	// method that will return a string with the following format
	// $.output.<id>.<path>.<path>
	GetOutputPath(paths ...*string) *string
	// Make the indicated state the default choice transition of this state.
	MakeDefault(def awsstepfunctions.State)
	// Make the indicated state the default transition of this state.
	MakeNext(next awsstepfunctions.State)
	// Go to the indicated state after this state.
	Next(next awsstepfunctions.IChainable) awsstepfunctions.Chain
	// Render parallel branches in ASL JSON format.
	RenderBranches() interface{}
	// Render the choices in ASL JSON format.
	RenderChoices() interface{}
	// Render InputPath/Parameters/OutputPath in ASL JSON format.
	RenderInputOutput() interface{}
	// Render map iterator in ASL JSON format.
	RenderIterator() interface{}
	// Render the default next state in ASL JSON format.
	RenderNextEnd() interface{}
	RenderProps() *map[string]interface{}
	// Render ResultSelector in ASL JSON format.
	RenderResultSelector() interface{}
	// Render error recovery options in ASL JSON format.
	RenderRetryCatch() interface{}
	// Render the state as JSON.
	ToStateJson() *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
	// Allows the state to validate itself.
	ValidateState() *[]*string
	// Called whenever this state is bound to a graph.
	//
	// Can be overridden by subclasses.
	WhenBoundToGraph(graph awsstepfunctions.StateGraph)
}

type AwsVpcConfiguration

type AwsVpcConfiguration struct {
	// Whether the task's elastic network interface receives a public IP address.
	//
	// Default is false.
	// *
	// For more information see the {@link https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_AwsVpcConfiguration.html AWS ECS VPC documentation}
	AssignPublicIp *bool `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"`
	// A list of the security group ids associated with the ECS task.
	//
	// For more information see the {@link https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_AwsVpcConfiguration.html AWS ECS VPC documentation}
	SecurityGroups *[]*string `field:"optional" json:"securityGroups" yaml:"securityGroups"`
	// A list of the subnet ids associated with the ECS task.
	//
	// For more information see the AWS ECS VPC documentation.
	//
	// For more information see the {@link https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_AwsVpcConfiguration.html AWS ECS VPC documentation}
	Subnets *[]*string `field:"optional" json:"subnets" yaml:"subnets"`
}

The VPC configuration for the ECS task.

If awsVpcConfiguration is omitted, Attini will use the default VPC and create a new security group resource in the init deploy stack. The security group will have no inbound rules (no openings), but allow all outgoing traffic.

type CfnAction added in v0.0.46

type CfnAction string
const (
	CfnAction_DEPLOY CfnAction = "DEPLOY"
	CfnAction_DELETE CfnAction = "DELETE"
)

type DeploymentPlan

type DeploymentPlan interface {
	constructs.Construct
	// The tree node.
	Node() constructs.Node
	// Returns a string representation of this construct.
	ToString() *string
}

func NewDeploymentPlan

func NewDeploymentPlan(scope constructs.Construct, id *string, props *DeploymentPlanProps) DeploymentPlan

type DeploymentPlanProps

type DeploymentPlanProps struct {
	Definition awsstepfunctions.IChainable `field:"required" json:"definition" yaml:"definition"`
}

type DiffProps added in v1.3.0

type DiffProps struct {
	// Enable diff.
	Enabled *bool `field:"required" json:"enabled" yaml:"enabled"`
}

type DistributionSource added in v0.0.17

type DistributionSource struct {
	// The name of the distribution to import.
	Name *string `field:"required" json:"name" yaml:"name"`
}

type Ec2Configuration added in v1.4.0

type Ec2Configuration struct {
	// The instance type of the EC2 instance that will host the Runner.
	InstanceType *string `field:"required" json:"instanceType" yaml:"instanceType"`
	// The AMI to use.
	//
	// Can be specified as an imageId, starting with "ami-", or a short hand name like, AmazonLinux2, AmazonLinux2_arm64 etc.
	// For a complete list, please see the documentation.
	//
	// Will default to AmazonLinux2.
	Ami *string `field:"optional" json:"ami" yaml:"ami"`
	// The instance profile name for the EC2 instance.
	//
	// If omitted, then Attini will create
	// an instance profile with the Runners default role.
	InstanceProfileName *string `field:"optional" json:"instanceProfileName" yaml:"instanceProfileName"`
}

type Project added in v0.0.19

type Project struct {
	// The path to the SAM App in the Attini project.
	//
	// The Path should always start from the root of the Attini project.
	Path *string `field:"required" json:"path" yaml:"path"`
	// The path to a directory where the built artifacts are stored.
	//
	// Only needed if Attini did not perform the SAM build and a custom build dir was specified with the --build-dir option.
	// For more information, see the {@link https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-build.html AWS SAM CLI build documentation}.
	BuildDir *string `field:"optional" json:"buildDir" yaml:"buildDir"`
	// The path and file name of AWS SAM template file.
	//
	// Only needed if Attini did not perform the SAM build and a custom template name was specified with the --template option.
	// For more information, see the {@link https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-build.html AWS SAM CLI build documentation}.
	Template *string `field:"optional" json:"template" yaml:"template"`
}

type PropsUtil

type PropsUtil interface {
}

func NewPropsUtil

func NewPropsUtil() PropsUtil

type RunnerConfiguration

type RunnerConfiguration struct {
	// The number of seconds the Attini Runner will stay alive without any jobs executing.
	//
	// New jobs will reset the countdown.
	IdleTimeToLive *float64 `field:"optional" json:"idleTimeToLive" yaml:"idleTimeToLive"`
	// The number of seconds a job can execute before the Attini Runner aborts the execution.
	JobTimeout *float64 `field:"optional" json:"jobTimeout" yaml:"jobTimeout"`
	// The log level of the Attini Runner.
	LogLevel *string `field:"optional" json:"logLevel" yaml:"logLevel"`
	// The max amount of concurrent jobs the Attini Runner will execute.
	MaxConcurrentJobs *float64 `field:"optional" json:"maxConcurrentJobs" yaml:"maxConcurrentJobs"`
}

type S3Source added in v0.0.17

type S3Source struct {
	// The S3 Bucket where the document is located.
	Bucket *string `field:"required" json:"bucket" yaml:"bucket"`
	// The S3 Key of the document to import.
	Key *string `field:"required" json:"key" yaml:"key"`
}

type SourceType added in v0.0.17

type SourceType string
const (
	SourceType_S3_SOURCE           SourceType = "S3_SOURCE"
	SourceType_DISTRIBUTION_SOURCE SourceType = "DISTRIBUTION_SOURCE"
)

type StackConfigurationProps added in v1.0.0

type StackConfigurationProps struct {
	// Parameter configuration for the CloudFormation stack/stacks.
	Parameters *map[string]*string `field:"required" json:"parameters" yaml:"parameters"`
	// Stack name that you want to configure.
	StackName *string `field:"optional" json:"stackName" yaml:"stackName"`
}

type Startup

type Startup struct {
	// List of shell commands that are executed when the Attini Runner starts.
	Commands *[]*string `field:"optional" json:"commands" yaml:"commands"`
	// The number of seconds the startup commands can execute before the Attini Runner aborts the execution.
	CommandsTimeout *float64 `field:"optional" json:"commandsTimeout" yaml:"commandsTimeout"`
}

Startup instructions for the Attini Runner.

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL