@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AWS Elemental MediaPackage
@version 2017-10-12
@auth AWS SigV4
@endpoints 19
@toc channels(8), harvest_jobs(3), origin_endpoints(5), tags(3)

@group channels
@endpoint PUT /channels/{id}/configure_logs
@desc Changes the Channel's properities to configure log subscription
@required {Id: str}
@optional {EgressAccessLogs: EgressAccessLogs, IngressAccessLogs: IngressAccessLogs}
@returns(200) {Arn: str?, CreatedAt: str?, Description: str?, EgressAccessLogs: EgressAccessLogs?{LogGroupName: str?}, HlsIngest: HlsIngest?{IngestEndpoints: [IngestEndpoint]?}, Id: str?, IngressAccessLogs: IngressAccessLogs?{LogGroupName: str?}, Tags: map<str,str>?}

@endpoint POST /channels
@desc Creates a new Channel.
@required {Id: str}
@optional {Description: str, Tags: map<str,str>}
@returns(200) {Arn: str?, CreatedAt: str?, Description: str?, EgressAccessLogs: EgressAccessLogs?{LogGroupName: str?}, HlsIngest: HlsIngest?{IngestEndpoints: [IngestEndpoint]?}, Id: str?, IngressAccessLogs: IngressAccessLogs?{LogGroupName: str?}, Tags: map<str,str>?}

@endgroup

@group harvest_jobs
@endpoint POST /harvest_jobs
@desc Creates a new HarvestJob record.
@required {EndTime: str, Id: str, OriginEndpointId: str, S3Destination: S3Destination, StartTime: str}
@returns(200) {Arn: str?, ChannelId: str?, CreatedAt: str?, EndTime: str?, Id: str?, OriginEndpointId: str?, S3Destination: S3Destination?{BucketName: str, ManifestKey: str, RoleArn: str}, StartTime: str?, Status: str?}

@endgroup

@group origin_endpoints
@endpoint POST /origin_endpoints
@desc Creates a new OriginEndpoint record.
@required {ChannelId: str, Id: str}
@optional {Authorization: Authorization, CmafPackage: CmafPackageCreateOrUpdateParameters, DashPackage: DashPackage, Description: str, HlsPackage: HlsPackage, ManifestName: str, MssPackage: MssPackage, Origination: str, StartoverWindowSeconds: int, Tags: map<str,str>, TimeDelaySeconds: int, Whitelist: [str]}
@returns(200) {Arn: str?, Authorization: Authorization?{CdnIdentifierSecret: str, SecretsRoleArn: str}, ChannelId: str?, CmafPackage: CmafPackage?{Encryption: CmafEncryption?{ConstantInitializationVector: str?, EncryptionMethod: str?, KeyRotationIntervalSeconds: int?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, HlsManifests: [HlsManifest]?, SegmentDurationSeconds: int?, SegmentPrefix: str?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}}, CreatedAt: str?, DashPackage: DashPackage?{AdTriggers: [str]?, AdsOnDeliveryRestrictions: str?, Encryption: DashEncryption?{KeyRotationIntervalSeconds: int?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, IncludeIframeOnlyStream: bool?, ManifestLayout: str?, ManifestWindowSeconds: int?, MinBufferTimeSeconds: int?, MinUpdatePeriodSeconds: int?, PeriodTriggers: [str]?, Profile: str?, SegmentDurationSeconds: int?, SegmentTemplateFormat: str?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}, SuggestedPresentationDelaySeconds: int?, UtcTiming: str?, UtcTimingUri: str?}, Description: str?, HlsPackage: HlsPackage?{AdMarkers: str?, AdTriggers: [str]?, AdsOnDeliveryRestrictions: str?, Encryption: HlsEncryption?{ConstantInitializationVector: str?, EncryptionMethod: str?, KeyRotationIntervalSeconds: int?, RepeatExtXKey: bool?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, IncludeDvbSubtitles: bool?, IncludeIframeOnlyStream: bool?, PlaylistType: str?, PlaylistWindowSeconds: int?, ProgramDateTimeIntervalSeconds: int?, SegmentDurationSeconds: int?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}, UseAudioRenditionGroup: bool?}, Id: str?, ManifestName: str?, MssPackage: MssPackage?{Encryption: MssEncryption?{SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, ManifestWindowSeconds: int?, SegmentDurationSeconds: int?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}}, Origination: str?, StartoverWindowSeconds: int?, Tags: map<str,str>?, TimeDelaySeconds: int?, Url: str?, Whitelist: [str]?}

@endgroup

@group channels
@endpoint DELETE /channels/{id}
@desc Deletes an existing Channel.
@required {Id: str}

@endgroup

@group origin_endpoints
@endpoint DELETE /origin_endpoints/{id}
@desc Deletes an existing OriginEndpoint.
@required {Id: str}

@endgroup

@group channels
@endpoint GET /channels/{id}
@desc Gets details about a Channel.
@required {Id: str}
@returns(200) {Arn: str?, CreatedAt: str?, Description: str?, EgressAccessLogs: EgressAccessLogs?{LogGroupName: str?}, HlsIngest: HlsIngest?{IngestEndpoints: [IngestEndpoint]?}, Id: str?, IngressAccessLogs: IngressAccessLogs?{LogGroupName: str?}, Tags: map<str,str>?}

@endgroup

@group harvest_jobs
@endpoint GET /harvest_jobs/{id}
@desc Gets details about an existing HarvestJob.
@required {Id: str}
@returns(200) {Arn: str?, ChannelId: str?, CreatedAt: str?, EndTime: str?, Id: str?, OriginEndpointId: str?, S3Destination: S3Destination?{BucketName: str, ManifestKey: str, RoleArn: str}, StartTime: str?, Status: str?}

@endgroup

@group origin_endpoints
@endpoint GET /origin_endpoints/{id}
@desc Gets details about an existing OriginEndpoint.
@required {Id: str}
@returns(200) {Arn: str?, Authorization: Authorization?{CdnIdentifierSecret: str, SecretsRoleArn: str}, ChannelId: str?, CmafPackage: CmafPackage?{Encryption: CmafEncryption?{ConstantInitializationVector: str?, EncryptionMethod: str?, KeyRotationIntervalSeconds: int?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, HlsManifests: [HlsManifest]?, SegmentDurationSeconds: int?, SegmentPrefix: str?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}}, CreatedAt: str?, DashPackage: DashPackage?{AdTriggers: [str]?, AdsOnDeliveryRestrictions: str?, Encryption: DashEncryption?{KeyRotationIntervalSeconds: int?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, IncludeIframeOnlyStream: bool?, ManifestLayout: str?, ManifestWindowSeconds: int?, MinBufferTimeSeconds: int?, MinUpdatePeriodSeconds: int?, PeriodTriggers: [str]?, Profile: str?, SegmentDurationSeconds: int?, SegmentTemplateFormat: str?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}, SuggestedPresentationDelaySeconds: int?, UtcTiming: str?, UtcTimingUri: str?}, Description: str?, HlsPackage: HlsPackage?{AdMarkers: str?, AdTriggers: [str]?, AdsOnDeliveryRestrictions: str?, Encryption: HlsEncryption?{ConstantInitializationVector: str?, EncryptionMethod: str?, KeyRotationIntervalSeconds: int?, RepeatExtXKey: bool?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, IncludeDvbSubtitles: bool?, IncludeIframeOnlyStream: bool?, PlaylistType: str?, PlaylistWindowSeconds: int?, ProgramDateTimeIntervalSeconds: int?, SegmentDurationSeconds: int?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}, UseAudioRenditionGroup: bool?}, Id: str?, ManifestName: str?, MssPackage: MssPackage?{Encryption: MssEncryption?{SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, ManifestWindowSeconds: int?, SegmentDurationSeconds: int?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}}, Origination: str?, StartoverWindowSeconds: int?, Tags: map<str,str>?, TimeDelaySeconds: int?, Url: str?, Whitelist: [str]?}

@endgroup

@group channels
@endpoint GET /channels
@desc Returns a collection of Channels.
@optional {maxResults: int, nextToken: str}
@returns(200) {Channels: [Channel]?, NextToken: str?}

@endgroup

@group harvest_jobs
@endpoint GET /harvest_jobs
@desc Returns a collection of HarvestJob records.
@optional {includeChannelId: str, includeStatus: str, maxResults: int, nextToken: str}
@returns(200) {HarvestJobs: [HarvestJob]?, NextToken: str?}

@endgroup

@group origin_endpoints
@endpoint GET /origin_endpoints
@desc Returns a collection of OriginEndpoint records.
@optional {channelId: str, maxResults: int, nextToken: str}
@returns(200) {NextToken: str?, OriginEndpoints: [OriginEndpoint]?}

@endgroup

@group tags
@endpoint GET /tags/{resource-arn}
@required {ResourceArn: str}
@returns(200) {Tags: map<str,str>?}

@endgroup

@group channels
@endpoint PUT /channels/{id}/credentials
@desc Changes the Channel's first IngestEndpoint's username and password. WARNING - This API is deprecated. Please use RotateIngestEndpointCredentials instead
@required {Id: str}
@returns(200) {Arn: str?, CreatedAt: str?, Description: str?, EgressAccessLogs: EgressAccessLogs?{LogGroupName: str?}, HlsIngest: HlsIngest?{IngestEndpoints: [IngestEndpoint]?}, Id: str?, IngressAccessLogs: IngressAccessLogs?{LogGroupName: str?}, Tags: map<str,str>?}

@endpoint PUT /channels/{id}/ingest_endpoints/{ingest_endpoint_id}/credentials
@desc Rotate the IngestEndpoint's username and password, as specified by the IngestEndpoint's id.
@required {Id: str, IngestEndpointId: str}
@returns(200) {Arn: str?, CreatedAt: str?, Description: str?, EgressAccessLogs: EgressAccessLogs?{LogGroupName: str?}, HlsIngest: HlsIngest?{IngestEndpoints: [IngestEndpoint]?}, Id: str?, IngressAccessLogs: IngressAccessLogs?{LogGroupName: str?}, Tags: map<str,str>?}

@endgroup

@group tags
@endpoint POST /tags/{resource-arn}
@required {ResourceArn: str, Tags: map<str,str>}

@endpoint DELETE /tags/{resource-arn}
@required {ResourceArn: str, tagKeys: [str]}

@endgroup

@group channels
@endpoint PUT /channels/{id}
@desc Updates an existing Channel.
@required {Id: str}
@optional {Description: str}
@returns(200) {Arn: str?, CreatedAt: str?, Description: str?, EgressAccessLogs: EgressAccessLogs?{LogGroupName: str?}, HlsIngest: HlsIngest?{IngestEndpoints: [IngestEndpoint]?}, Id: str?, IngressAccessLogs: IngressAccessLogs?{LogGroupName: str?}, Tags: map<str,str>?}

@endgroup

@group origin_endpoints
@endpoint PUT /origin_endpoints/{id}
@desc Updates an existing OriginEndpoint.
@required {Id: str}
@optional {Authorization: Authorization, CmafPackage: CmafPackageCreateOrUpdateParameters, DashPackage: DashPackage, Description: str, HlsPackage: HlsPackage, ManifestName: str, MssPackage: MssPackage, Origination: str, StartoverWindowSeconds: int, TimeDelaySeconds: int, Whitelist: [str]}
@returns(200) {Arn: str?, Authorization: Authorization?{CdnIdentifierSecret: str, SecretsRoleArn: str}, ChannelId: str?, CmafPackage: CmafPackage?{Encryption: CmafEncryption?{ConstantInitializationVector: str?, EncryptionMethod: str?, KeyRotationIntervalSeconds: int?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, HlsManifests: [HlsManifest]?, SegmentDurationSeconds: int?, SegmentPrefix: str?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}}, CreatedAt: str?, DashPackage: DashPackage?{AdTriggers: [str]?, AdsOnDeliveryRestrictions: str?, Encryption: DashEncryption?{KeyRotationIntervalSeconds: int?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, IncludeIframeOnlyStream: bool?, ManifestLayout: str?, ManifestWindowSeconds: int?, MinBufferTimeSeconds: int?, MinUpdatePeriodSeconds: int?, PeriodTriggers: [str]?, Profile: str?, SegmentDurationSeconds: int?, SegmentTemplateFormat: str?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}, SuggestedPresentationDelaySeconds: int?, UtcTiming: str?, UtcTimingUri: str?}, Description: str?, HlsPackage: HlsPackage?{AdMarkers: str?, AdTriggers: [str]?, AdsOnDeliveryRestrictions: str?, Encryption: HlsEncryption?{ConstantInitializationVector: str?, EncryptionMethod: str?, KeyRotationIntervalSeconds: int?, RepeatExtXKey: bool?, SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, IncludeDvbSubtitles: bool?, IncludeIframeOnlyStream: bool?, PlaylistType: str?, PlaylistWindowSeconds: int?, ProgramDateTimeIntervalSeconds: int?, SegmentDurationSeconds: int?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}, UseAudioRenditionGroup: bool?}, Id: str?, ManifestName: str?, MssPackage: MssPackage?{Encryption: MssEncryption?{SpekeKeyProvider: SpekeKeyProvider{CertificateArn: str?, EncryptionContractConfiguration: EncryptionContractConfiguration?, ResourceId: str, RoleArn: str, SystemIds: [str], Url: str}}, ManifestWindowSeconds: int?, SegmentDurationSeconds: int?, StreamSelection: StreamSelection?{MaxVideoBitsPerSecond: int?, MinVideoBitsPerSecond: int?, StreamOrder: str?}}, Origination: str?, StartoverWindowSeconds: int?, Tags: map<str,str>?, TimeDelaySeconds: int?, Url: str?, Whitelist: [str]?}

@endgroup

@end
