@aws-cdk/aws-ivs-alpha 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +4957 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +97 -0
- package/lib/channel.d.ts +168 -0
- package/lib/channel.js +98 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +17 -0
- package/lib/playback-key-pair.d.ts +75 -0
- package/lib/playback-key-pair.js +38 -0
- package/lib/stream-key.d.ts +60 -0
- package/lib/stream-key.js +29 -0
- package/package.json +117 -0
- package/rosetta/default.ts-fixture +19 -0
- package/rosetta/with-channel.ts-fixture +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# AWS::IVS Construct Library
|
|
2
|
+
<!--BEGIN STABILITY BANNER-->
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
> All classes with the `Cfn` prefix in this module ([CFN Resources]) are always stable and safe to use.
|
|
9
|
+
>
|
|
10
|
+
> [CFN Resources]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
> The APIs of higher level constructs in this module are experimental and under active development.
|
|
15
|
+
> They are subject to non-backward compatible changes or removal in any future version. These are
|
|
16
|
+
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
|
|
17
|
+
> announced in the release notes. This means that while you may use them, you may need to update
|
|
18
|
+
> your source code when upgrading to a newer version of this package.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<!--END STABILITY BANNER-->
|
|
23
|
+
|
|
24
|
+
Amazon Interactive Video Service (Amazon IVS) is a managed live streaming
|
|
25
|
+
solution that is quick and easy to set up, and ideal for creating interactive
|
|
26
|
+
video experiences. Send your live streams to Amazon IVS using streaming software
|
|
27
|
+
and the service does everything you need to make low-latency live video
|
|
28
|
+
available to any viewer around the world, letting you focus on building
|
|
29
|
+
interactive experiences alongside the live video. You can easily customize and
|
|
30
|
+
enhance the audience experience through the Amazon IVS player SDK and timed
|
|
31
|
+
metadata APIs, allowing you to build a more valuable relationship with your
|
|
32
|
+
viewers on your own websites and applications.
|
|
33
|
+
|
|
34
|
+
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
|
|
35
|
+
|
|
36
|
+
## Channels
|
|
37
|
+
|
|
38
|
+
An Amazon IVS channel stores configuration information related to your live
|
|
39
|
+
stream. You first create a channel and then contribute video to it using the
|
|
40
|
+
channel’s stream key to start your live stream.
|
|
41
|
+
|
|
42
|
+
You can create a channel
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
const myChannel = new ivs.Channel(this, 'Channel');
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Importing an existing channel
|
|
49
|
+
|
|
50
|
+
You can reference an existing channel, for example, if you need to create a
|
|
51
|
+
stream key for an existing channel
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
const myChannel = ivs.Channel.fromChannelArn(this, 'Channel', myChannelArn);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Stream Keys
|
|
58
|
+
|
|
59
|
+
A Stream Key is used by a broadcast encoder to initiate a stream and identify
|
|
60
|
+
to Amazon IVS which customer and channel the stream is for. If you are
|
|
61
|
+
storing this value, it should be treated as if it were a password.
|
|
62
|
+
|
|
63
|
+
You can create a stream key for a given channel
|
|
64
|
+
|
|
65
|
+
```ts fixture=with-channel
|
|
66
|
+
const myStreamKey = myChannel.addStreamKey('StreamKey');
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Private Channels
|
|
70
|
+
|
|
71
|
+
Amazon IVS offers the ability to create private channels, allowing
|
|
72
|
+
you to restrict your streams by channel or viewer. You control access
|
|
73
|
+
to video playback by enabling playback authorization on channels and
|
|
74
|
+
generating signed JSON Web Tokens (JWTs) for authorized playback requests.
|
|
75
|
+
|
|
76
|
+
A playback token is a JWT that you sign (with a playback authorization key)
|
|
77
|
+
and include with every playback request for a channel that has playback
|
|
78
|
+
authorization enabled.
|
|
79
|
+
|
|
80
|
+
In order for Amazon IVS to validate the token, you need to upload
|
|
81
|
+
the public key that corresponds to the private key you use to sign the token.
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
const keyPair = new ivs.PlaybackKeyPair(this, 'PlaybackKeyPair', {
|
|
85
|
+
publicKeyMaterial: myPublicKeyPemString,
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Then, when creating a channel, specify the authorized property
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
const myChannel = new ivs.Channel(this, 'Channel', {
|
|
93
|
+
authorized: true, // default value is false
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
|
package/lib/channel.d.ts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import * as core from 'aws-cdk-lib';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
import { StreamKey } from './stream-key';
|
|
4
|
+
/**
|
|
5
|
+
* (experimental) Represents an IVS Channel.
|
|
6
|
+
*
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export interface IChannel extends core.IResource {
|
|
10
|
+
/**
|
|
11
|
+
* (experimental) The channel ARN.
|
|
12
|
+
*
|
|
13
|
+
* For example: arn:aws:ivs:us-west-2:123456789012:channel/abcdABCDefgh
|
|
14
|
+
*
|
|
15
|
+
* @experimental
|
|
16
|
+
* @attribute true
|
|
17
|
+
*/
|
|
18
|
+
readonly channelArn: string;
|
|
19
|
+
/**
|
|
20
|
+
* (experimental) Adds a stream key for this IVS Channel.
|
|
21
|
+
*
|
|
22
|
+
* @param id construct ID.
|
|
23
|
+
* @experimental
|
|
24
|
+
*/
|
|
25
|
+
addStreamKey(id: string): StreamKey;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Reference to a new or existing IVS Channel
|
|
29
|
+
*/
|
|
30
|
+
declare abstract class ChannelBase extends core.Resource implements IChannel {
|
|
31
|
+
abstract readonly channelArn: string;
|
|
32
|
+
/**
|
|
33
|
+
* (experimental) Adds a stream key for this IVS Channel.
|
|
34
|
+
*
|
|
35
|
+
* @experimental
|
|
36
|
+
*/
|
|
37
|
+
addStreamKey(id: string): StreamKey;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* (experimental) Channel latency mode.
|
|
41
|
+
*
|
|
42
|
+
* @experimental
|
|
43
|
+
*/
|
|
44
|
+
export declare enum LatencyMode {
|
|
45
|
+
/**
|
|
46
|
+
* (experimental) Use LOW to minimize broadcaster-to-viewer latency for interactive broadcasts.
|
|
47
|
+
*
|
|
48
|
+
* @experimental
|
|
49
|
+
*/
|
|
50
|
+
LOW = "LOW",
|
|
51
|
+
/**
|
|
52
|
+
* (experimental) Use NORMAL for broadcasts that do not require viewer interaction.
|
|
53
|
+
*
|
|
54
|
+
* @experimental
|
|
55
|
+
*/
|
|
56
|
+
NORMAL = "NORMAL"
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* (experimental) The channel type, which determines the allowable resolution and bitrate.
|
|
60
|
+
*
|
|
61
|
+
* If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately.
|
|
62
|
+
*
|
|
63
|
+
* @experimental
|
|
64
|
+
*/
|
|
65
|
+
export declare enum ChannelType {
|
|
66
|
+
/**
|
|
67
|
+
* (experimental) Multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions.
|
|
68
|
+
*
|
|
69
|
+
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html
|
|
70
|
+
* @experimental
|
|
71
|
+
*/
|
|
72
|
+
STANDARD = "STANDARD",
|
|
73
|
+
/**
|
|
74
|
+
* (experimental) delivers the original input to viewers.
|
|
75
|
+
*
|
|
76
|
+
* The viewer’s video-quality choice is limited to the original input.
|
|
77
|
+
*
|
|
78
|
+
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ivs-channel.html
|
|
79
|
+
* @experimental
|
|
80
|
+
*/
|
|
81
|
+
BASIC = "BASIC"
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* (experimental) Properties for creating a new Channel.
|
|
85
|
+
*
|
|
86
|
+
* @experimental
|
|
87
|
+
*/
|
|
88
|
+
export interface ChannelProps {
|
|
89
|
+
/**
|
|
90
|
+
* (experimental) Whether the channel is authorized.
|
|
91
|
+
*
|
|
92
|
+
* If you wish to make an authorized channel, you will need to ensure that
|
|
93
|
+
* a PlaybackKeyPair has been uploaded to your account as this is used to
|
|
94
|
+
* validate the signed JWT that is required for authorization
|
|
95
|
+
*
|
|
96
|
+
* @default false
|
|
97
|
+
* @experimental
|
|
98
|
+
*/
|
|
99
|
+
readonly authorized?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* (experimental) Channel latency mode.
|
|
102
|
+
*
|
|
103
|
+
* @default LatencyMode.LOW
|
|
104
|
+
* @experimental
|
|
105
|
+
*/
|
|
106
|
+
readonly latencyMode?: LatencyMode;
|
|
107
|
+
/**
|
|
108
|
+
* (experimental) Channel name.
|
|
109
|
+
*
|
|
110
|
+
* @default - None
|
|
111
|
+
* @experimental
|
|
112
|
+
*/
|
|
113
|
+
readonly name?: string;
|
|
114
|
+
/**
|
|
115
|
+
* (experimental) The channel type, which determines the allowable resolution and bitrate.
|
|
116
|
+
*
|
|
117
|
+
* If you exceed the allowable resolution or bitrate, the stream will disconnect immediately
|
|
118
|
+
*
|
|
119
|
+
* @default ChannelType.STANDARD
|
|
120
|
+
* @experimental
|
|
121
|
+
*/
|
|
122
|
+
readonly type?: ChannelType;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* (experimental) A new IVS channel.
|
|
126
|
+
*
|
|
127
|
+
* @experimental
|
|
128
|
+
*/
|
|
129
|
+
export declare class Channel extends ChannelBase {
|
|
130
|
+
/**
|
|
131
|
+
* (experimental) Import an existing channel.
|
|
132
|
+
*
|
|
133
|
+
* @experimental
|
|
134
|
+
*/
|
|
135
|
+
static fromChannelArn(scope: Construct, id: string, channelArn: string): IChannel;
|
|
136
|
+
/**
|
|
137
|
+
* (experimental) The channel ARN.
|
|
138
|
+
*
|
|
139
|
+
* For example: arn:aws:ivs:us-west-2:123456789012:channel/abcdABCDefgh
|
|
140
|
+
*
|
|
141
|
+
* @experimental
|
|
142
|
+
*/
|
|
143
|
+
readonly channelArn: string;
|
|
144
|
+
/**
|
|
145
|
+
* (experimental) Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software.
|
|
146
|
+
*
|
|
147
|
+
* For example: a1b2c3d4e5f6.global-contribute.live-video.net
|
|
148
|
+
*
|
|
149
|
+
* @experimental
|
|
150
|
+
* @attribute true
|
|
151
|
+
*/
|
|
152
|
+
readonly channelIngestEndpoint: string;
|
|
153
|
+
/**
|
|
154
|
+
* (experimental) Channel playback URL.
|
|
155
|
+
*
|
|
156
|
+
* For example:
|
|
157
|
+
* https://a1b2c3d4e5f6.us-west-2.playback.live-video.net/api/video/v1/us-west-2.123456789012.channel.abcdEFGH.m3u8
|
|
158
|
+
*
|
|
159
|
+
* @experimental
|
|
160
|
+
* @attribute true
|
|
161
|
+
*/
|
|
162
|
+
readonly channelPlaybackUrl: string;
|
|
163
|
+
/**
|
|
164
|
+
* @experimental
|
|
165
|
+
*/
|
|
166
|
+
constructor(scope: Construct, id: string, props?: ChannelProps);
|
|
167
|
+
}
|
|
168
|
+
export {};
|
package/lib/channel.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Channel = exports.ChannelType = exports.LatencyMode = void 0;
|
|
5
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
+
const core = require("aws-cdk-lib");
|
|
7
|
+
const aws_ivs_1 = require("aws-cdk-lib/aws-ivs");
|
|
8
|
+
const stream_key_1 = require("./stream-key");
|
|
9
|
+
/**
|
|
10
|
+
* Reference to a new or existing IVS Channel
|
|
11
|
+
*/
|
|
12
|
+
class ChannelBase extends core.Resource {
|
|
13
|
+
/**
|
|
14
|
+
* (experimental) Adds a stream key for this IVS Channel.
|
|
15
|
+
*
|
|
16
|
+
* @experimental
|
|
17
|
+
*/
|
|
18
|
+
addStreamKey(id) {
|
|
19
|
+
return new stream_key_1.StreamKey(this, id, {
|
|
20
|
+
channel: this,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* (experimental) Channel latency mode.
|
|
26
|
+
*
|
|
27
|
+
* @experimental
|
|
28
|
+
*/
|
|
29
|
+
var LatencyMode;
|
|
30
|
+
(function (LatencyMode) {
|
|
31
|
+
LatencyMode["LOW"] = "LOW";
|
|
32
|
+
LatencyMode["NORMAL"] = "NORMAL";
|
|
33
|
+
})(LatencyMode = exports.LatencyMode || (exports.LatencyMode = {}));
|
|
34
|
+
/**
|
|
35
|
+
* (experimental) The channel type, which determines the allowable resolution and bitrate.
|
|
36
|
+
*
|
|
37
|
+
* If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately.
|
|
38
|
+
*
|
|
39
|
+
* @experimental
|
|
40
|
+
*/
|
|
41
|
+
var ChannelType;
|
|
42
|
+
(function (ChannelType) {
|
|
43
|
+
ChannelType["STANDARD"] = "STANDARD";
|
|
44
|
+
ChannelType["BASIC"] = "BASIC";
|
|
45
|
+
})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
|
|
46
|
+
/**
|
|
47
|
+
* (experimental) A new IVS channel.
|
|
48
|
+
*
|
|
49
|
+
* @experimental
|
|
50
|
+
*/
|
|
51
|
+
class Channel extends ChannelBase {
|
|
52
|
+
/**
|
|
53
|
+
* @experimental
|
|
54
|
+
*/
|
|
55
|
+
constructor(scope, id, props = {}) {
|
|
56
|
+
super(scope, id, {
|
|
57
|
+
physicalName: props.name,
|
|
58
|
+
});
|
|
59
|
+
if (props.name && !core.Token.isUnresolved(props.name) && !/^[a-zA-Z0-9-_]*$/.test(props.name)) {
|
|
60
|
+
throw new Error(`name must contain only numbers, letters, hyphens and underscores, got: '${props.name}'`);
|
|
61
|
+
}
|
|
62
|
+
const resource = new aws_ivs_1.CfnChannel(this, 'Resource', {
|
|
63
|
+
authorized: props.authorized,
|
|
64
|
+
latencyMode: props.latencyMode,
|
|
65
|
+
name: props.name,
|
|
66
|
+
type: props.type,
|
|
67
|
+
});
|
|
68
|
+
this.channelArn = resource.attrArn;
|
|
69
|
+
this.channelIngestEndpoint = resource.attrIngestEndpoint;
|
|
70
|
+
this.channelPlaybackUrl = resource.attrPlaybackUrl;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* (experimental) Import an existing channel.
|
|
74
|
+
*
|
|
75
|
+
* @experimental
|
|
76
|
+
*/
|
|
77
|
+
static fromChannelArn(scope, id, channelArn) {
|
|
78
|
+
// This will throw an error if the arn cannot be parsed
|
|
79
|
+
let arnComponents = core.Arn.parse(channelArn);
|
|
80
|
+
if (!core.Token.isUnresolved(arnComponents.service) && arnComponents.service !== 'ivs') {
|
|
81
|
+
throw new Error(`Invalid service, expected 'ivs', got '${arnComponents.service}'`);
|
|
82
|
+
}
|
|
83
|
+
if (!core.Token.isUnresolved(arnComponents.resource) && arnComponents.resource !== 'channel') {
|
|
84
|
+
throw new Error(`Invalid resource, expected 'channel', got '${arnComponents.resource}'`);
|
|
85
|
+
}
|
|
86
|
+
class Import extends ChannelBase {
|
|
87
|
+
constructor() {
|
|
88
|
+
super(...arguments);
|
|
89
|
+
this.channelArn = channelArn;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return new Import(scope, id);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.Channel = Channel;
|
|
96
|
+
_a = JSII_RTTI_SYMBOL_1;
|
|
97
|
+
Channel[_a] = { fqn: "@aws-cdk/aws-ivs-alpha.Channel", version: "2.0.0-alpha.1" };
|
|
98
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhbm5lbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNoYW5uZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxvQ0FBb0M7QUFFcEMsaURBQWlEO0FBQ2pELDZDQUF5QztBQVd6Qzs7R0FFRztBQUNILE1BQWUsV0FBWSxTQUFRLElBQUksQ0FBQyxRQUFROzs7Ozs7SUFHdkMsWUFBWSxDQUFDLEVBQVU7UUFDNUIsT0FBTyxJQUFJLHNCQUFTLENBQUMsSUFBSSxFQUFFLEVBQUUsRUFBRTtZQUM3QixPQUFPLEVBQUUsSUFBSTtTQUNkLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FDRjs7Ozs7O0FBR0QsSUFBWSxXQU1YO0FBTkQsV0FBWSxXQUFXO0lBRXJCLDBCQUFXLENBQUE7SUFHWCxnQ0FBaUIsQ0FBQTtBQUNuQixDQUFDLEVBTlcsV0FBVyxHQUFYLG1CQUFXLEtBQVgsbUJBQVcsUUFNdEI7Ozs7Ozs7O0FBR0QsSUFBWSxXQU1YO0FBTkQsV0FBWSxXQUFXO0lBRXJCLG9DQUFxQixDQUFBO0lB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cmVhbUtleSB9IGZyb20gJy4vc3RyZWFtLWtleSc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuZXhwb3J0IGludGVyZmFjZSBJQ2hhbm5lbCBleHRlbmRzIGNvcmUuSVJlc291cmNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICByZWFkb25seSBjaGFubmVsQXJuOiBzdHJpbmc7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICBhZGRTdHJlYW1LZXkoaWQ6IHN0cmluZyk6IFN0cmVhbUtleTtcbn1cblxuLyoqXG4gKiBSZWZlcmVuY2UgdG8gYSBuZXcgb3IgZXhpc3RpbmcgSVZTIENoYW5uZWxcbiAqL1xuYWJzdHJhY3QgY2xhc3MgQ2hhbm5lbEJhc2UgZXh0ZW5kcyBjb3JlLlJlc291cmNlIGltcGxlbWVudHMgSUNoYW5uZWwge1xuICBwdWJsaWMgYWJzdHJhY3QgcmVhZG9ubHkgY2hhbm5lbEFybjogc3RyaW5nO1xuXG4gIHB1YmxpYyBhZGRTdHJlYW1LZXkoaWQ6IHN0cmluZyk6IFN0cmVhbUtleSB7XG4gICAgcmV0dXJuIG5ldyBTdHJlYW1LZXkodGhpcywgaWQsIHtcbiAgICAgIGNoYW5uZWw6IHRoaXMsXG4gICAgfSk7XG4gIH1cbn1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmV4cG9ydCBlbnVtIExhdGVuY3lNb2RlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgTE9XID0gJ0xPVycsXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgTk9STUFMID0gJ05PUk1BTCcsXG59XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmV4cG9ydCBlbnVtIENoYW5uZWxUeXBlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICBTVEFOREFSRCA9ICdTVEFOREFSRCcsXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgQkFTSUMgPSAnQkFTSUMnLFxufVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbmV4cG9ydCBpbnRlcmZhY2UgQ2hhbm5lbFByb3BzIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgYXV0aG9yaXplZD86IGJvb2xlYW47XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgbGF0ZW5jeU1vZGU/OiBMYXRlbmN5TW9kZTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgcmVhZG9ubHkgdHlwZT86IENoYW5uZWxUeXBlO1xufVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgIFxuZXhwb3J0IGNsYXNzIENoYW5uZWwgZXh0ZW5kcyBDaGFubmVsQmFzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gIHB1YmxpYyBzdGF0aWMgZnJvbUNoYW5uZW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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gIHB1YmxpYyByZWFkb25seSBjaGFubmVsSW5nZXN0RW5kcG9pbnQ6IHN0cmluZztcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICBwdWJsaWMgcmVhZG9ubHkgY2hhbm5lbFBsYXliYWNrVXJsOiBzdHJpbmc7XG5cbiAgY29uc3RydWN0b3Ioc2NvcGU6IENvbnN0cnVjdCwgaWQ6IHN0cmluZywgcHJvcHM6IENoYW5uZWxQcm9wcyA9IHt9KSB7XG4gICAgc3VwZXIoc2NvcGUsIGlkLCB7XG4gICAgICBwaHlzaWNhbE5hbWU6IHByb3BzLm5hbWUsXG4gICAgfSk7XG5cbiAgICBpZiAocHJvcHMubmFtZSAmJiAhY29yZS5Ub2tlbi5pc1VucmVzb2x2ZWQocHJvcHMubmFtZSkgJiYgIS9eW2EtekEtWjAtOS1fXSokLy50ZXN0KHByb3BzLm5hbWUpKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYG5hbWUgbXVzdCBjb250YWluIG9ubHkgbnVtYmVycywgbGV0dGVycywgaHlwaGVucyBhbmQgdW5kZXJzY29yZXMsIGdvdDogJyR7cHJvcHMubmFtZX0nYCk7XG4gICAgfVxuXG4gICAgY29uc3QgcmVzb3VyY2UgPSBuZXcgQ2ZuQ2hhbm5lbCh0aGlzLCAnUmVzb3VyY2UnLCB7XG4gICAgICBhdXRob3JpemVkOiBwcm9wcy5hdXRob3JpemVkLFxuICAgICAgbGF0ZW5jeU1vZGU6IHByb3BzLmxhdGVuY3lNb2RlLFxuICAgICAgbmFtZTogcHJvcHMubmFtZSxcbiAgICAgIHR5cGU6IHByb3BzLnR5cGUsXG4gICAgfSk7XG5cbiAgICB0aGlzLmNoYW5uZWxBcm4gPSByZXNvdXJjZS5hdHRyQXJuO1xuICAgIHRoaXMuY2hhbm5lbEluZ2VzdEVuZHBvaW50ID0gcmVzb3VyY2UuYXR0ckluZ2VzdEVuZHBvaW50O1xuICAgIHRoaXMuY2hhbm5lbFBsYXliYWNrVXJsID0gcmVzb3VyY2UuYXR0clBsYXliYWNrVXJsO1xuICB9XG59XG4iXX0=
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./channel"), exports);
|
|
14
|
+
__exportStar(require("./playback-key-pair"), exports);
|
|
15
|
+
__exportStar(require("./stream-key"), exports);
|
|
16
|
+
// AWS::IVS CloudFormation Resources:
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSw0Q0FBMEI7QUFDMUIsc0RBQW9DO0FBQ3BDLCtDQUE2QjtBQUU3QixxQ0FBcUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NoYW5uZWwnO1xuZXhwb3J0ICogZnJvbSAnLi9wbGF5YmFjay1rZXktcGFpcic7XG5leHBvcnQgKiBmcm9tICcuL3N0cmVhbS1rZXknO1xuXG4vLyBBV1M6OklWUyBDbG91ZEZvcm1hdGlvbiBSZXNvdXJjZXM6XG4iXX0=
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as core from 'aws-cdk-lib';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
/**
|
|
4
|
+
* (experimental) Represents an IVS Playback Key Pair.
|
|
5
|
+
*
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export interface IPlaybackKeyPair extends core.IResource {
|
|
9
|
+
/**
|
|
10
|
+
* (experimental) Key-pair ARN.
|
|
11
|
+
*
|
|
12
|
+
* For example: arn:aws:ivs:us-west-2:693991300569:playback-key/f99cde61-c2b0-4df3-8941-ca7d38acca1a
|
|
13
|
+
*
|
|
14
|
+
* @experimental
|
|
15
|
+
* @attribute true
|
|
16
|
+
*/
|
|
17
|
+
readonly playbackKeyPairArn: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Reference to a new or existing IVS Playback Key Pair
|
|
21
|
+
*/
|
|
22
|
+
declare abstract class PlaybackKeyPairBase extends core.Resource implements IPlaybackKeyPair {
|
|
23
|
+
abstract readonly playbackKeyPairArn: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* (experimental) Properties for creating a new Playback Key Pair.
|
|
27
|
+
*
|
|
28
|
+
* @experimental
|
|
29
|
+
*/
|
|
30
|
+
export interface PlaybackKeyPairProps {
|
|
31
|
+
/**
|
|
32
|
+
* (experimental) The public portion of a customer-generated key pair.
|
|
33
|
+
*
|
|
34
|
+
* @experimental
|
|
35
|
+
*/
|
|
36
|
+
readonly publicKeyMaterial: string;
|
|
37
|
+
/**
|
|
38
|
+
* (experimental) An arbitrary string (a nickname) assigned to a playback key pair that helps the customer identify that resource.
|
|
39
|
+
*
|
|
40
|
+
* The value does not need to be unique.
|
|
41
|
+
*
|
|
42
|
+
* @default None
|
|
43
|
+
* @experimental
|
|
44
|
+
*/
|
|
45
|
+
readonly name?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* (experimental) A new IVS Playback Key Pair.
|
|
49
|
+
*
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
52
|
+
export declare class PlaybackKeyPair extends PlaybackKeyPairBase {
|
|
53
|
+
/**
|
|
54
|
+
* (experimental) Key-pair ARN.
|
|
55
|
+
*
|
|
56
|
+
* For example: arn:aws:ivs:us-west-2:693991300569:playback-key/f99cde61-c2b0-4df3-8941-ca7d38acca1a
|
|
57
|
+
*
|
|
58
|
+
* @experimental
|
|
59
|
+
*/
|
|
60
|
+
readonly playbackKeyPairArn: string;
|
|
61
|
+
/**
|
|
62
|
+
* (experimental) Key-pair identifier.
|
|
63
|
+
*
|
|
64
|
+
* For example: 98:0d:1a:a0:19:96:1e:ea:0a:0a:2c:9a:42:19:2b:e7
|
|
65
|
+
*
|
|
66
|
+
* @experimental
|
|
67
|
+
* @attribute true
|
|
68
|
+
*/
|
|
69
|
+
readonly playbackKeyPairFingerprint: string;
|
|
70
|
+
/**
|
|
71
|
+
* @experimental
|
|
72
|
+
*/
|
|
73
|
+
constructor(scope: Construct, id: string, props: PlaybackKeyPairProps);
|
|
74
|
+
}
|
|
75
|
+
export {};
|