# InAppMessageContentProperty

Specifies the configuration of an in-app message, including its header, body, buttons, colors, and images.

- 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_pinpoint as pinpoint } from 'aws-cdk-lib';
const inAppMessageContentProperty: pinpoint.CfnInAppTemplate.InAppMessageContentProperty = {
  backgroundColor: 'backgroundColor',
  bodyConfig: {
    alignment: 'alignment',
    body: 'body',
    textColor: 'textColor',
  },
  headerConfig: {
    alignment: 'alignment',
    header: 'header',
    textColor: 'textColor',
  },
  imageUrl: 'imageUrl',
  primaryBtn: {
    android: {
      buttonAction: 'buttonAction',
      link: 'link',
    },
    defaultConfig: {
      backgroundColor: 'backgroundColor',
      borderRadius: 123,
      buttonAction: 'buttonAction',
      link: 'link',
      text: 'text',
      textColor: 'textColor',
    },
    ios: {
      buttonAction: 'buttonAction',
      link: 'link',
    },
    web: {
      buttonAction: 'buttonAction',
      link: 'link',
    },
  },
  secondaryBtn: {
    android: {
      buttonAction: 'buttonAction',
      link: 'link',
    },
    defaultConfig: {
      backgroundColor: 'backgroundColor',
      borderRadius: 123,
      buttonAction: 'buttonAction',
      link: 'link',
      text: 'text',
      textColor: 'textColor',
    },
    ios: {
      buttonAction: 'buttonAction',
      link: 'link',
    },
    web: {
      buttonAction: 'buttonAction',
      link: 'link',
    },
  },
};
```

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_pinpoint as pinpoint

in_app_message_content_property = pinpoint.CfnInAppTemplate.InAppMessageContentProperty(
    background_color="backgroundColor",
    body_config=pinpoint.CfnInAppTemplate.BodyConfigProperty(
        alignment="alignment",
        body="body",
        text_color="textColor"
    ),
    header_config=pinpoint.CfnInAppTemplate.HeaderConfigProperty(
        alignment="alignment",
        header="header",
        text_color="textColor"
    ),
    image_url="imageUrl",
    primary_btn=pinpoint.CfnInAppTemplate.ButtonConfigProperty(
        android=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
            button_action="buttonAction",
            link="link"
        ),
        default_config=pinpoint.CfnInAppTemplate.DefaultButtonConfigurationProperty(
            background_color="backgroundColor",
            border_radius=123,
            button_action="buttonAction",
            link="link",
            text="text",
            text_color="textColor"
        ),
        ios=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
            button_action="buttonAction",
            link="link"
        ),
        web=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
            button_action="buttonAction",
            link="link"
        )
    ),
    secondary_btn=pinpoint.CfnInAppTemplate.ButtonConfigProperty(
        android=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
            button_action="buttonAction",
            link="link"
        ),
        default_config=pinpoint.CfnInAppTemplate.DefaultButtonConfigurationProperty(
            background_color="backgroundColor",
            border_radius=123,
            button_action="buttonAction",
            link="link",
            text="text",
            text_color="textColor"
        ),
        ios=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
            button_action="buttonAction",
            link="link"
        ),
        web=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
            button_action="buttonAction",
            link="link"
        )
    )
)
```

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

InAppMessageContentProperty inAppMessageContentProperty = InAppMessageContentProperty.builder()
        .backgroundColor("backgroundColor")
        .bodyConfig(BodyConfigProperty.builder()
                .alignment("alignment")
                .body("body")
                .textColor("textColor")
                .build())
        .headerConfig(HeaderConfigProperty.builder()
                .alignment("alignment")
                .header("header")
                .textColor("textColor")
                .build())
        .imageUrl("imageUrl")
        .primaryBtn(ButtonConfigProperty.builder()
                .android(OverrideButtonConfigurationProperty.builder()
                        .buttonAction("buttonAction")
                        .link("link")
                        .build())
                .defaultConfig(DefaultButtonConfigurationProperty.builder()
                        .backgroundColor("backgroundColor")
                        .borderRadius(123)
                        .buttonAction("buttonAction")
                        .link("link")
                        .text("text")
                        .textColor("textColor")
                        .build())
                .ios(OverrideButtonConfigurationProperty.builder()
                        .buttonAction("buttonAction")
                        .link("link")
                        .build())
                .web(OverrideButtonConfigurationProperty.builder()
                        .buttonAction("buttonAction")
                        .link("link")
                        .build())
                .build())
        .secondaryBtn(ButtonConfigProperty.builder()
                .android(OverrideButtonConfigurationProperty.builder()
                        .buttonAction("buttonAction")
                        .link("link")
                        .build())
                .defaultConfig(DefaultButtonConfigurationProperty.builder()
                        .backgroundColor("backgroundColor")
                        .borderRadius(123)
                        .buttonAction("buttonAction")
                        .link("link")
                        .text("text")
                        .textColor("textColor")
                        .build())
                .ios(OverrideButtonConfigurationProperty.builder()
                        .buttonAction("buttonAction")
                        .link("link")
                        .build())
                .web(OverrideButtonConfigurationProperty.builder()
                        .buttonAction("buttonAction")
                        .link("link")
                        .build())
                .build())
        .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.Pinpoint;

var inAppMessageContentProperty = new InAppMessageContentProperty {
    BackgroundColor = "backgroundColor",
    BodyConfig = new BodyConfigProperty {
        Alignment = "alignment",
        Body = "body",
        TextColor = "textColor"
    },
    HeaderConfig = new HeaderConfigProperty {
        Alignment = "alignment",
        Header = "header",
        TextColor = "textColor"
    },
    ImageUrl = "imageUrl",
    PrimaryBtn = new ButtonConfigProperty {
        Android = new OverrideButtonConfigurationProperty {
            ButtonAction = "buttonAction",
            Link = "link"
        },
        DefaultConfig = new DefaultButtonConfigurationProperty {
            BackgroundColor = "backgroundColor",
            BorderRadius = 123,
            ButtonAction = "buttonAction",
            Link = "link",
            Text = "text",
            TextColor = "textColor"
        },
        Ios = new OverrideButtonConfigurationProperty {
            ButtonAction = "buttonAction",
            Link = "link"
        },
        Web = new OverrideButtonConfigurationProperty {
            ButtonAction = "buttonAction",
            Link = "link"
        }
    },
    SecondaryBtn = new ButtonConfigProperty {
        Android = new OverrideButtonConfigurationProperty {
            ButtonAction = "buttonAction",
            Link = "link"
        },
        DefaultConfig = new DefaultButtonConfigurationProperty {
            BackgroundColor = "backgroundColor",
            BorderRadius = 123,
            ButtonAction = "buttonAction",
            Link = "link",
            Text = "text",
            TextColor = "textColor"
        },
        Ios = new OverrideButtonConfigurationProperty {
            ButtonAction = "buttonAction",
            Link = "link"
        },
        Web = new OverrideButtonConfigurationProperty {
            ButtonAction = "buttonAction",
            Link = "link"
        }
    }
};
```

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"

inAppMessageContentProperty := &InAppMessageContentProperty{
	BackgroundColor: jsii.String("backgroundColor"),
	BodyConfig: &BodyConfigProperty{
		Alignment: jsii.String("alignment"),
		Body: jsii.String("body"),
		TextColor: jsii.String("textColor"),
	},
	HeaderConfig: &HeaderConfigProperty{
		Alignment: jsii.String("alignment"),
		Header: jsii.String("header"),
		TextColor: jsii.String("textColor"),
	},
	ImageUrl: jsii.String("imageUrl"),
	PrimaryBtn: &ButtonConfigProperty{
		Android: &OverrideButtonConfigurationProperty{
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
		},
		DefaultConfig: &DefaultButtonConfigurationProperty{
			BackgroundColor: jsii.String("backgroundColor"),
			BorderRadius: jsii.Number(123),
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
			Text: jsii.String("text"),
			TextColor: jsii.String("textColor"),
		},
		Ios: &OverrideButtonConfigurationProperty{
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
		},
		Web: &OverrideButtonConfigurationProperty{
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
		},
	},
	SecondaryBtn: &ButtonConfigProperty{
		Android: &OverrideButtonConfigurationProperty{
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
		},
		DefaultConfig: &DefaultButtonConfigurationProperty{
			BackgroundColor: jsii.String("backgroundColor"),
			BorderRadius: jsii.Number(123),
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
			Text: jsii.String("text"),
			TextColor: jsii.String("textColor"),
		},
		Ios: &OverrideButtonConfigurationProperty{
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
		},
		Web: &OverrideButtonConfigurationProperty{
			ButtonAction: jsii.String("buttonAction"),
			Link: jsii.String("link"),
		},
	},
}
```

## Properties

- `backgroundColor`: string — The background color for an in-app message banner, expressed as a hex color code (such as #000000 for black).

- `bodyConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInAppTemplate.BodyConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpoint.CfnInAppTemplate.BodyConfigProperty.html) — An object that contains configuration information about the header or title text of the in-app message.

- `headerConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInAppTemplate.HeaderConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpoint.CfnInAppTemplate.HeaderConfigProperty.html) — An object that contains configuration information about the header or title text of the in-app message.

- `imageUrl`: string — The URL of the image that appears on an in-app message banner.

- `primaryBtn`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInAppTemplate.ButtonConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpoint.CfnInAppTemplate.ButtonConfigProperty.html) — An object that contains configuration information about the primary button in an in-app message.

- `secondaryBtn`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInAppTemplate.ButtonConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpoint.CfnInAppTemplate.ButtonConfigProperty.html) — An object that contains configuration information about the secondary button in an in-app message.
