# LoggingConfigProperty

The `LoggingConfig` property type specifies the `Delivery` status logging configuration for an [`AWS::SNS::Topic`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html) .

- Source: Generated at build time
- Type last changed: v2.115.0 · 14 Dec 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sns as sns } from 'aws-cdk-lib';
const loggingConfigProperty: sns.CfnTopic.LoggingConfigProperty = {
  protocol: 'protocol',

  // the properties below are optional
  failureFeedbackRoleArn: 'failureFeedbackRoleArn',
  successFeedbackRoleArn: 'successFeedbackRoleArn',
  successFeedbackSampleRate: 'successFeedbackSampleRate',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sns as sns

logging_config_property = sns.CfnTopic.LoggingConfigProperty(
    protocol="protocol",

    # the properties below are optional
    failure_feedback_role_arn="failureFeedbackRoleArn",
    success_feedback_role_arn="successFeedbackRoleArn",
    success_feedback_sample_rate="successFeedbackSampleRate"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sns.*;

LoggingConfigProperty loggingConfigProperty = LoggingConfigProperty.builder()
        .protocol("protocol")

        // the properties below are optional
        .failureFeedbackRoleArn("failureFeedbackRoleArn")
        .successFeedbackRoleArn("successFeedbackRoleArn")
        .successFeedbackSampleRate("successFeedbackSampleRate")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SNS;

var loggingConfigProperty = new LoggingConfigProperty {
    Protocol = "protocol",

    // the properties below are optional
    FailureFeedbackRoleArn = "failureFeedbackRoleArn",
    SuccessFeedbackRoleArn = "successFeedbackRoleArn",
    SuccessFeedbackSampleRate = "successFeedbackSampleRate"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

loggingConfigProperty := &LoggingConfigProperty{
	Protocol: jsii.String("protocol"),

	// the properties below are optional
	FailureFeedbackRoleArn: jsii.String("failureFeedbackRoleArn"),
	SuccessFeedbackRoleArn: jsii.String("successFeedbackRoleArn"),
	SuccessFeedbackSampleRate: jsii.String("successFeedbackSampleRate"),
}
```

## Properties

- `failureFeedbackRoleArn`: string — The IAM role ARN to be used when logging failed message deliveries in Amazon CloudWatch.

- `protocol`: string (required) — Indicates one of the supported protocols for the Amazon SNS topic.

  > At least one of the other three `LoggingConfig` properties is recommend along with `Protocol` .

- `successFeedbackRoleArn`: string — The IAM role ARN to be used when logging successful message deliveries in Amazon CloudWatch.

- `successFeedbackSampleRate`: string — The percentage of successful message deliveries to be logged in Amazon CloudWatch.

  Valid percentage values range from 0 to 100.
