# SubscriptionProperty

`Subscription` is an embedded property that describes the subscription endpoints of an Amazon  topic.

> For full control over subscription behavior (for example, delivery policy, filtering, raw message delivery, and cross-region subscriptions), use the [AWS::SNS::Subscription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html) resource.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 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 subscriptionProperty: sns.CfnTopic.SubscriptionProperty = {
  endpoint: 'endpoint',
  protocol: 'protocol',
};
```

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

subscription_property = sns.CfnTopic.SubscriptionProperty(
    endpoint="endpoint",
    protocol="protocol"
)
```

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.*;

SubscriptionProperty subscriptionProperty = SubscriptionProperty.builder()
        .endpoint("endpoint")
        .protocol("protocol")
        .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 subscriptionProperty = new SubscriptionProperty {
    Endpoint = "endpoint",
    Protocol = "protocol"
};
```

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"

subscriptionProperty := &SubscriptionProperty{
	Endpoint: jsii.String("endpoint"),
	Protocol: jsii.String("protocol"),
}
```

## Properties

- `endpoint`: string (required) — The endpoint that receives notifications from the Amazon topic.

  The endpoint value depends on the protocol that you specify. For more information, see the `Endpoint` parameter of the `[Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html)` action in the *Amazon  API Reference* .

- `protocol`: string (required) — The subscription's protocol.

  For more information, see the `Protocol` parameter of the `[Subscribe](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html)` action in the *Amazon  API Reference* .
