Skip to content

Commit 67d4f60

Browse files
authoredAug 26, 2021
Formatting
1 parent 30f1fd0 commit 67d4f60

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed
 

‎the-state-machine/java/src/main/java/com/cdkpatterns/TheStateMachineStack.java

+21-21
Original file line numberDiff line numberDiff line change
@@ -98,31 +98,31 @@ public TheStateMachineStack(final Construct scope, final String id, final StackP
9898

9999
// We need to give our HTTP API permission to invoke our step function
100100
Role httpApiRole = new Role(this, "HttpApiRole", new RoleProps.Builder()
101-
.assumedBy(new ServicePrincipal("apigateway.amazonaws.com"))
102-
.inlinePolicies(Map.of("AllowSFNExec", new PolicyDocument(
103-
new PolicyDocumentProps.Builder()
104-
.statements(List.of(new PolicyStatement(
105-
new PolicyStatementProps.Builder()
106-
.effect(Effect.ALLOW)
107-
.resources(List.of(stateMachine.getStateMachineArn()))
108-
.actions(List.of("states:StartSyncExecution"))
109-
.build())))
110-
.build())))
111-
.build());
101+
.assumedBy(new ServicePrincipal("apigateway.amazonaws.com"))
102+
.inlinePolicies(Map.of("AllowSFNExec", new PolicyDocument(
103+
new PolicyDocumentProps.Builder()
104+
.statements(List.of(new PolicyStatement(
105+
new PolicyStatementProps.Builder()
106+
.effect(Effect.ALLOW)
107+
.resources(List.of(stateMachine.getStateMachineArn()))
108+
.actions(List.of("states:StartSyncExecution"))
109+
.build())))
110+
.build())))
111+
.build());
112112

113113
HttpApi api = new HttpApi(this, "TheStateMachineAPI", new HttpApiProps.Builder().createDefaultStage(true).build());
114114

115115
CfnIntegration integration = new CfnIntegration(this, "Integration", new CfnIntegrationProps.Builder()
116-
.apiId(api.getHttpApiId())
117-
.integrationType("AWS_PROXY")
118-
.connectionType("INTERNET")
119-
.integrationSubtype("StepFunctions-StartSyncExecution")
120-
.credentialsArn(httpApiRole.getRoleArn())
121-
.requestParameters(Map.of("Input","$request.body",
122-
"StateMachineArn",stateMachine.getStateMachineArn()))
123-
.payloadFormatVersion("1.0")
124-
.timeoutInMillis(10000)
125-
.build());
116+
.apiId(api.getHttpApiId())
117+
.integrationType("AWS_PROXY")
118+
.connectionType("INTERNET")
119+
.integrationSubtype("StepFunctions-StartSyncExecution")
120+
.credentialsArn(httpApiRole.getRoleArn())
121+
.requestParameters(Map.of("Input","$request.body",
122+
"StateMachineArn",stateMachine.getStateMachineArn()))
123+
.payloadFormatVersion("1.0")
124+
.timeoutInMillis(10000)
125+
.build());
126126

127127
new CfnRoute(this, "DefaultRoute", new CfnRouteProps.Builder()
128128
.apiId(api.getHttpApiId())

0 commit comments

Comments
 (0)
Please sign in to comment.