

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::IVS::PlaybackKeyPair
<a name="aws-resource-ivs-playbackkeypair"></a>

The `AWS::IVS::PlaybackKeyPair` resource specifies an Amazon IVS playback key pair. Amazon IVS uses a public playback key to validate playback tokens that have been signed with the corresponding private key. For more information, see [Setting Up Private Channels](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/private-channels.html) in the *Amazon IVS Low-Latency Streaming User Guide*.

## Syntax
<a name="aws-resource-ivs-playbackkeypair-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ivs-playbackkeypair-syntax.json"></a>

```
{
  "Type" : "AWS::IVS::PlaybackKeyPair",
  "Properties" : {
      "[Name](#cfn-ivs-playbackkeypair-name)" : String,
      "[PublicKeyMaterial](#cfn-ivs-playbackkeypair-publickeymaterial)" : String,
      "[Tags](#cfn-ivs-playbackkeypair-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-ivs-playbackkeypair-syntax.yaml"></a>

```
Type: AWS::IVS::PlaybackKeyPair
Properties:
  [Name](#cfn-ivs-playbackkeypair-name): String
  [PublicKeyMaterial](#cfn-ivs-playbackkeypair-publickeymaterial): String
  [Tags](#cfn-ivs-playbackkeypair-tags): 
    - Tag
```

## Properties
<a name="aws-resource-ivs-playbackkeypair-properties"></a>

`Name`  <a name="cfn-ivs-playbackkeypair-name"></a>
Playback-key-pair name. The value does not need to be unique.  
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9-_]*$`  
*Minimum*: `0`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PublicKeyMaterial`  <a name="cfn-ivs-playbackkeypair-publickeymaterial"></a>
The public portion of a customer-generated key pair. Note that this field is required to create the AWS::IVS::PlaybackKeyPair resource.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ivs-playbackkeypair-tags"></a>
An array of key-value pairs to apply to this resource.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ivs-playbackkeypair-tag.html).  
*Required*: No  
*Type*: Array of [Tag](aws-properties-ivs-playbackkeypair-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ivs-playbackkeypair-return-values"></a>

### Ref
<a name="aws-resource-ivs-playbackkeypair-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the playback key pair ARN. For example:

 `{ "Ref": "myPlaybackKeyPair" }` 

For the Amazon IVS playback key pair `myPlaybackKeyPair`, `Ref` returns the playback key pair ARN.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-ivs-playbackkeypair-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-ivs-playbackkeypair-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
Key-pair ARN. For example: `arn:aws:ivs:us-west-2:693991300569:playback-key/f99cde61-c2b0-4df3-8941-ca7d38acca1a`

`Fingerprint`  <a name="Fingerprint-fn::getatt"></a>
Key-pair identifier. For example: `98:0d:1a:a0:19:96:1e:ea:0a:0a:2c:9a:42:19:2b:e7`

## Examples
<a name="aws-resource-ivs-playbackkeypair--examples"></a>



### Playback Key Pair Template Examples
<a name="aws-resource-ivs-playbackkeypair--examples--Playback_Key_Pair_Template_Examples"></a>

The following examples specify an Amazon IVS playback key pair.

#### JSON
<a name="aws-resource-ivs-playbackkeypair--examples--Playback_Key_Pair_Template_Examples--json"></a>

```
 {
     "AWSTemplateFormatVersion": "2010-09-09",
     "Resources": {
         "PlaybackKeyPair": {
             "Type": "AWS::IVS::PlaybackKeyPair",
             "Properties": {
                 "PublicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEwOR43ETwEoWif1i14aL8GtDMNkT/kBQm\nh4sas9P//bjCU988rmQQXVBfftKT9xngg+W6hzOEpeUlCRlAtz6b6U79naYYRaSk\nK/UhYGWkXlbJlc9zn13imYWgVGe/BMFp\n-----END PUBLIC KEY-----\n",
                 "Name": "MyPlaybackKeyPair",
                 "Tags": [
                     {
                         "Key": "MyKey",
                         "Value": "MyValue"
                     }
                 ]
             }
         }
     },
     "Outputs": {
         "PlaybackKeyPairArn": {
             "Value": {"Ref": "PlaybackKeyPair"}
         },
         "PlaybackKeyPairFingerprint": {
             "Value": {
                 "Fn::GetAtt": [
                     "PlaybackKeyPair",
                     "Fingerprint"
                 ]
             }
         }
     }
 }
```

#### YAML
<a name="aws-resource-ivs-playbackkeypair--examples--Playback_Key_Pair_Template_Examples--yaml"></a>

```
 AWSTemplateFormatVersion: 2010-09-09
 Resources:
  PlaybackKeyPair:
    Type: AWS::IVS::PlaybackKeyPair
    Properties:
      PublicKeyMaterial: |
        -----BEGIN PUBLIC KEY-----
        MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEwOR43ETwEoWif1i14aL8GtDMNkT/kBQm
        h4sas9P//bjCU988rmQQXVBfftKT9xngg+W6hzOEpeUlCRlAtz6b6U79naYYRaSk
        K/UhYGWkXlbJlc9zn13imYWgVGe/BMFp
        -----END PUBLIC KEY-----
      Name: MyPlaybackKeyPair
      Tags:
        - Key: MyKey
          Value: MyValue
 Outputs:
  PlaybackKeyPairArn:
    Value: !Ref PlaybackKeyPair
  PlaybackKeyPairFingerprint:
    Value: !GetAtt PlaybackKeyPair.Fingerprint
```

## See also
<a name="aws-resource-ivs-playbackkeypair--seealso"></a>
+  [Setting Up Private Channels](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/private-channels.html) 
+ [PlaybackKeyPair](https://docs.aws.amazon.com/ivs/latest/LowLatencyAPIReference/API_PlaybackKeyPair.html) data type
+ [ImportPlaybackKeyPair](https://docs.aws.amazon.com/ivs/latest/LowLatencyAPIReference/API_ImportPlaybackKeyPair.html) API endpoint