Skip to content

Commit

Permalink
docs for cloudwatch, dynamodb, ses, sns, sqs
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejwalkowiak committed Sep 29, 2024
1 parent a8ab519 commit 629cd97
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 1 deletion.
27 changes: 27 additions & 0 deletions docs/src/main/asciidoc/cloudwatch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,30 @@ Following configuration properties are available to configure CloudWatch integra
|
|The specific region for CloudWatch integration.
|===

=== Client Customization

`CloudWatchAsyncClient` can be further customized by providing a bean of type `CloudWatchAsyncClientCustomizer`:

[source,java]
----
@Bean
CloudWatchAsyncClientCustomizer customizer() {
return builder -> {
builder.overrideConfiguration(builder.overrideConfiguration().copy(c -> {
c.apiCallTimeout(Duration.ofMillis(1500));
}));
};
}
----

[WARNING]
====
`builder.overrideConfiguration(..)` replaces the configuration object, so always make sure to use `builder.overrideConfiguration().copy(c -> ..)` to configure only certain properties and keep the already pre-configured values for others.
====

`CloudWatchAsyncClientCustomizer` is a functional interface that enables configuring `CloudWatchAsyncClientBuilder` before the `CloudWatchAsyncClient` is built in auto-configuration.

There can be multiple `CloudWatchAsyncClientCustomizer` beans present in single application context. `@Order(..)` annotation can be used to define the order of the execution.

Note that `CloudWatchAsyncClientCustomizer` beans are applied **after** `AwsAsyncClientCustomizer` beans and therefore can overwrite previously set configurations.
27 changes: 27 additions & 0 deletions docs/src/main/asciidoc/dynamodb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,33 @@ The Spring Boot Starter for DynamoDb provides the following configuration option
| `spring.cloud.aws.dynamodb.dax.skip-host-name-verification` | Skips hostname verification in url. | No |
|===

=== Client Customization

`DynamoDbClient` can be further customized by providing a bean of type `DynamoDbClientCustomizer`:

[source,java]
----
@Bean
DynamoDbClientCustomizer customizer() {
return builder -> {
builder.overrideConfiguration(builder.overrideConfiguration().copy(c -> {
c.apiCallTimeout(Duration.ofMillis(1500));
}));
};
}
----

[WARNING]
====
`builder.overrideConfiguration(..)` replaces the configuration object, so always make sure to use `builder.overrideConfiguration().copy(c -> ..)` to configure only certain properties and keep the already pre-configured values for others.
====

`DynamoDbClientCustomizer` is a functional interface that enables configuring `DynamoDbClientBuilder` before the `DynamoDbClient` is built in auto-configuration.

There can be multiple `DynamoDbClientCustomizer` beans present in single application context. `@Order(..)` annotation can be used to define the order of the execution.

Note that `DynamoDbClientCustomizer` beans are applied **after** `AwsSyncClientCustomizer` beans and therefore can overwrite previously set configurations.

=== IAM Permissions

Since it depends on how you will use DynamoDb integration providing a list of IAM policies would be pointless since least privilege model should be used.
Expand Down
27 changes: 27 additions & 0 deletions docs/src/main/asciidoc/ses.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,33 @@ spring.cloud.aws.ses.from-arn=arn:aws:ses:eu-west-1:123456789012:identity/exampl
spring.cloud.aws.ses.configuration-set-name=ConfigSet
----

=== Client Customization

`SesClient` can be further customized by providing a bean of type `SesClientCustomizer`:

[source,java]
----
@Bean
SesClientCustomizer customizer() {
return builder -> {
builder.overrideConfiguration(builder.overrideConfiguration().copy(c -> {
c.apiCallTimeout(Duration.ofMillis(1500));
}));
};
}
----

[WARNING]
====
`builder.overrideConfiguration(..)` replaces the configuration object, so always make sure to use `builder.overrideConfiguration().copy(c -> ..)` to configure only certain properties and keep the already pre-configured values for others.
====

`SesClientCustomizer` is a functional interface that enables configuring `SesClientBuilder` before the `SesClient` is built in auto-configuration.

There can be multiple `SesClientCustomizer` beans present in single application context. `@Order(..)` annotation can be used to define the order of the execution.

Note that `SesClientCustomizer` beans are applied **after** `AwsSyncClientCustomizer` beans and therefore can overwrite previously set configurations.

=== IAM Permissions
Following IAM permissions are required by Spring Cloud AWS:

Expand Down
29 changes: 28 additions & 1 deletion docs/src/main/asciidoc/sns.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,33 @@ The Spring Boot Starter for SNS provides the following configuration options:
| `spring.cloud.aws.sns.region` | Configures region used by `SnsClient`. | No | `eu-west-1`
|===

=== Client Customization

`SnsClient` can be further customized by providing a bean of type `SnsClientCustomizer`:

[source,java]
----
@Bean
SnsClientCustomizer customizer() {
return builder -> {
builder.overrideConfiguration(builder.overrideConfiguration().copy(c -> {
c.apiCallTimeout(Duration.ofMillis(1500));
}));
};
}
----

[WARNING]
====
`builder.overrideConfiguration(..)` replaces the configuration object, so always make sure to use `builder.overrideConfiguration().copy(c -> ..)` to configure only certain properties and keep the already pre-configured values for others.
====

`SnsClientCustomizer` is a functional interface that enables configuring `SnsClientBuilder` before the `SnsClient` is built in auto-configuration.

There can be multiple `SnsClientCustomizer` beans present in single application context. `@Order(..)` annotation can be used to define the order of the execution.

Note that `SnsClientCustomizer` beans are applied **after** `AwsSyncClientCustomizer` beans and therefore can overwrite previously set configurations.

=== IAM Permissions
Following IAM permissions are required by Spring Cloud AWS:

Expand All @@ -237,7 +264,7 @@ Following IAM permissions are required by Spring Cloud AWS:
| To publish notification you will also need | `sns:ListTopics`
| To use Annotation-driven HTTP notification endpoint | `sns:ConfirmSubscription`
| For resolving topic name to ARN | `sns:CreateTopic`
| For validating topic existence by ARN | `sns:GetTopicAttributes`
| For validating topic existence by ARN | `sns:GetTopicAttributes`
|===

Sample IAM policy granting access to SNS:
Expand Down
28 changes: 28 additions & 0 deletions docs/src/main/asciidoc/sqs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,34 @@ When providing a custom executor, it's important that it's configured to support
IMPORTANT: To avoid unnecessary thread hopping between blocking components, a `MessageExecutionThreadFactory` MUST be set to the executor.


=== Client Customization

`SqsAsyncClient` can be further customized by providing a bean of type `SqsAsyncClientCustomizer`:

[source,java]
----
@Bean
SqsAsyncClientCustomizer customizer() {
return builder -> {
builder.overrideConfiguration(builder.overrideConfiguration().copy(c -> {
c.apiCallTimeout(Duration.ofMillis(1500));
}));
};
}
----

[WARNING]
====
`builder.overrideConfiguration(..)` replaces the configuration object, so always make sure to use `builder.overrideConfiguration().copy(c -> ..)` to configure only certain properties and keep the already pre-configured values for others.
====

`SqsAsyncClientCustomizer` is a functional interface that enables configuring `SqsAsyncClientBuilder` before the `SqsAsyncClient` is built in auto-configuration.

There can be multiple `SqsAsyncClientCustomizer` beans present in single application context. `@Order(..)` annotation can be used to define the order of the execution.

Note that `SqsAsyncClientCustomizer` beans are applied **after** `AwsAsyncClientCustomizer` beans and therefore can overwrite previously set configurations.


=== IAM Permissions
Following IAM permissions are required by Spring Cloud AWS SQS:

Expand Down

0 comments on commit 629cd97

Please sign in to comment.