本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
CreateApplication
為 Apache Flink 應用程式建立受管理的服務。如需為 Apache Flink 應用程式建立受管理服務的相關資訊,請參閱建立應用程式。
請求語法
{
"ApplicationConfiguration": {
"ApplicationCodeConfiguration": {
"CodeContent": {
"S3ContentLocation": {
"BucketARN": "string
",
"FileKey": "string
",
"ObjectVersion": "string
"
},
"TextContent": "string
",
"ZipFileContent": blob
},
"CodeContentType": "string
"
},
"ApplicationSnapshotConfiguration": {
"SnapshotsEnabled": boolean
},
"ApplicationSystemRollbackConfiguration": {
"RollbackEnabled": boolean
},
"EnvironmentProperties": {
"PropertyGroups": [
{
"PropertyGroupId": "string
",
"PropertyMap": {
"string
" : "string
"
}
}
]
},
"FlinkApplicationConfiguration": {
"CheckpointConfiguration": {
"CheckpointingEnabled": boolean
,
"CheckpointInterval": number
,
"ConfigurationType": "string
",
"MinPauseBetweenCheckpoints": number
},
"MonitoringConfiguration": {
"ConfigurationType": "string
",
"LogLevel": "string
",
"MetricsLevel": "string
"
},
"ParallelismConfiguration": {
"AutoScalingEnabled": boolean
,
"ConfigurationType": "string
",
"Parallelism": number
,
"ParallelismPerKPU": number
}
},
"SqlApplicationConfiguration": {
"Inputs": [
{
"InputParallelism": {
"Count": number
},
"InputProcessingConfiguration": {
"InputLambdaProcessor": {
"ResourceARN": "string
"
}
},
"InputSchema": {
"RecordColumns": [
{
"Mapping": "string
",
"Name": "string
",
"SqlType": "string
"
}
],
"RecordEncoding": "string
",
"RecordFormat": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string
",
"RecordRowDelimiter": "string
"
},
"JSONMappingParameters": {
"RecordRowPath": "string
"
}
},
"RecordFormatType": "string
"
}
},
"KinesisFirehoseInput": {
"ResourceARN": "string
"
},
"KinesisStreamsInput": {
"ResourceARN": "string
"
},
"NamePrefix": "string
"
}
],
"Outputs": [
{
"DestinationSchema": {
"RecordFormatType": "string
"
},
"KinesisFirehoseOutput": {
"ResourceARN": "string
"
},
"KinesisStreamsOutput": {
"ResourceARN": "string
"
},
"LambdaOutput": {
"ResourceARN": "string
"
},
"Name": "string
"
}
],
"ReferenceDataSources": [
{
"ReferenceSchema": {
"RecordColumns": [
{
"Mapping": "string
",
"Name": "string
",
"SqlType": "string
"
}
],
"RecordEncoding": "string
",
"RecordFormat": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string
",
"RecordRowDelimiter": "string
"
},
"JSONMappingParameters": {
"RecordRowPath": "string
"
}
},
"RecordFormatType": "string
"
}
},
"S3ReferenceDataSource": {
"BucketARN": "string
",
"FileKey": "string
"
},
"TableName": "string
"
}
]
},
"VpcConfigurations": [
{
"SecurityGroupIds": [ "string
" ],
"SubnetIds": [ "string
" ]
}
],
"ZeppelinApplicationConfiguration": {
"CatalogConfiguration": {
"GlueDataCatalogConfiguration": {
"DatabaseARN": "string
"
}
},
"CustomArtifactsConfiguration": [
{
"ArtifactType": "string
",
"MavenReference": {
"ArtifactId": "string
",
"GroupId": "string
",
"Version": "string
"
},
"S3ContentLocation": {
"BucketARN": "string
",
"FileKey": "string
",
"ObjectVersion": "string
"
}
}
],
"DeployAsApplicationConfiguration": {
"S3ContentLocation": {
"BasePath": "string
",
"BucketARN": "string
"
}
},
"MonitoringConfiguration": {
"LogLevel": "string
"
}
}
},
"ApplicationDescription": "string
",
"ApplicationMode": "string
",
"ApplicationName": "string
",
"CloudWatchLoggingOptions": [
{
"LogStreamARN": "string
"
}
],
"RuntimeEnvironment": "string
",
"ServiceExecutionRole": "string
",
"Tags": [
{
"Key": "string
",
"Value": "string
"
}
]
}
請求參數
請求接受採用 JSON 格式的下列資料。
- ApplicationConfiguration
-
您可以使用此參數來設定應用程式。
類型:ApplicationConfiguration 物件
必要:否
- ApplicationDescription
-
應用程式的摘要說明。
類型:字串
長度限制:長度下限為 0。長度上限為 1024。
必要:否
- ApplicationMode
-
使用此
STREAMING
模式可為 Apache Flink 應用程式建立受管理的服務。若要建立 Apache Flink 工作室筆記本的受管理服務,請使用下列INTERACTIVE
模式。類型:字串
有效值:
STREAMING | INTERACTIVE
必要:否
- ApplicationName
-
應用程式的名稱 (例如,
sample-app
)。類型:字串
長度限制:長度下限為 1。長度上限為 128。
模式:
[a-zA-Z0-9_.-]+
必要:是
- CloudWatchLoggingOptions
-
使用此參數可設定 Amazon CloudWatch 日誌串流,以監控應用程式組態錯誤。
類型:CloudWatchLoggingOption 物件陣列
必要:否
- RuntimeEnvironment
-
應用程式的執行時間環境。
類型:字串
有效值:
SQL-1_0 | FLINK-1_6 | FLINK-1_8 | ZEPPELIN-FLINK-1_0 | FLINK-1_11 | FLINK-1_13 | ZEPPELIN-FLINK-2_0 | FLINK-1_15 | ZEPPELIN-FLINK-3_0 | FLINK-1_18 | FLINK-1_19
必要:是
- ServiceExecutionRole
-
應用程式用來存取 Kinesis 資料串流、Kinesis Data Firehose 交付串流、Amazon S3 物件和其他外部資源的 IAM 角色。
類型:字串
長度限制:長度下限為 1。長度上限為 2048。
模式:
arn:.*
必要:是
- Tags
-
要指派給應用程式的一或多個標籤的清單。標籤是識別應用程式的鍵/值對。請注意,應用程式標籤的數目上限包括系統標籤。使用者定義的應用程式的標籤數目上限為 50。如需詳細資訊,請參閱使用標記。
類型:Tag 物件陣列
陣列成員:項目數下限為 1。項目數上限為 200。
必要:否
回應語法
{
"ApplicationDetail": {
"ApplicationARN": "string",
"ApplicationConfigurationDescription": {
"ApplicationCodeConfigurationDescription": {
"CodeContentDescription": {
"CodeMD5": "string",
"CodeSize": number,
"S3ApplicationCodeLocationDescription": {
"BucketARN": "string",
"FileKey": "string",
"ObjectVersion": "string"
},
"TextContent": "string"
},
"CodeContentType": "string"
},
"ApplicationSnapshotConfigurationDescription": {
"SnapshotsEnabled": boolean
},
"ApplicationSystemRollbackConfigurationDescription": {
"RollbackEnabled": boolean
},
"EnvironmentPropertyDescriptions": {
"PropertyGroupDescriptions": [
{
"PropertyGroupId": "string",
"PropertyMap": {
"string" : "string"
}
}
]
},
"FlinkApplicationConfigurationDescription": {
"CheckpointConfigurationDescription": {
"CheckpointingEnabled": boolean,
"CheckpointInterval": number,
"ConfigurationType": "string",
"MinPauseBetweenCheckpoints": number
},
"JobPlanDescription": "string",
"MonitoringConfigurationDescription": {
"ConfigurationType": "string",
"LogLevel": "string",
"MetricsLevel": "string"
},
"ParallelismConfigurationDescription": {
"AutoScalingEnabled": boolean,
"ConfigurationType": "string",
"CurrentParallelism": number,
"Parallelism": number,
"ParallelismPerKPU": number
}
},
"RunConfigurationDescription": {
"ApplicationRestoreConfigurationDescription": {
"ApplicationRestoreType": "string",
"SnapshotName": "string"
},
"FlinkRunConfigurationDescription": {
"AllowNonRestoredState": boolean
}
},
"SqlApplicationConfigurationDescription": {
"InputDescriptions": [
{
"InAppStreamNames": [ "string" ],
"InputId": "string",
"InputParallelism": {
"Count": number
},
"InputProcessingConfigurationDescription": {
"InputLambdaProcessorDescription": {
"ResourceARN": "string",
"RoleARN": "string"
}
},
"InputSchema": {
"RecordColumns": [
{
"Mapping": "string",
"Name": "string",
"SqlType": "string"
}
],
"RecordEncoding": "string",
"RecordFormat": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string",
"RecordRowDelimiter": "string"
},
"JSONMappingParameters": {
"RecordRowPath": "string"
}
},
"RecordFormatType": "string"
}
},
"InputStartingPositionConfiguration": {
"InputStartingPosition": "string"
},
"KinesisFirehoseInputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"KinesisStreamsInputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"NamePrefix": "string"
}
],
"OutputDescriptions": [
{
"DestinationSchema": {
"RecordFormatType": "string"
},
"KinesisFirehoseOutputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"KinesisStreamsOutputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"LambdaOutputDescription": {
"ResourceARN": "string",
"RoleARN": "string"
},
"Name": "string",
"OutputId": "string"
}
],
"ReferenceDataSourceDescriptions": [
{
"ReferenceId": "string",
"ReferenceSchema": {
"RecordColumns": [
{
"Mapping": "string",
"Name": "string",
"SqlType": "string"
}
],
"RecordEncoding": "string",
"RecordFormat": {
"MappingParameters": {
"CSVMappingParameters": {
"RecordColumnDelimiter": "string",
"RecordRowDelimiter": "string"
},
"JSONMappingParameters": {
"RecordRowPath": "string"
}
},
"RecordFormatType": "string"
}
},
"S3ReferenceDataSourceDescription": {
"BucketARN": "string",
"FileKey": "string",
"ReferenceRoleARN": "string"
},
"TableName": "string"
}
]
},
"VpcConfigurationDescriptions": [
{
"SecurityGroupIds": [ "string" ],
"SubnetIds": [ "string" ],
"VpcConfigurationId": "string",
"VpcId": "string"
}
],
"ZeppelinApplicationConfigurationDescription": {
"CatalogConfigurationDescription": {
"GlueDataCatalogConfigurationDescription": {
"DatabaseARN": "string"
}
},
"CustomArtifactsConfigurationDescription": [
{
"ArtifactType": "string",
"MavenReferenceDescription": {
"ArtifactId": "string",
"GroupId": "string",
"Version": "string"
},
"S3ContentLocationDescription": {
"BucketARN": "string",
"FileKey": "string",
"ObjectVersion": "string"
}
}
],
"DeployAsApplicationConfigurationDescription": {
"S3ContentLocationDescription": {
"BasePath": "string",
"BucketARN": "string"
}
},
"MonitoringConfigurationDescription": {
"LogLevel": "string"
}
}
},
"ApplicationDescription": "string",
"ApplicationMaintenanceConfigurationDescription": {
"ApplicationMaintenanceWindowEndTime": "string",
"ApplicationMaintenanceWindowStartTime": "string"
},
"ApplicationMode": "string",
"ApplicationName": "string",
"ApplicationStatus": "string",
"ApplicationVersionCreateTimestamp": number,
"ApplicationVersionId": number,
"ApplicationVersionRolledBackFrom": number,
"ApplicationVersionRolledBackTo": number,
"ApplicationVersionUpdatedFrom": number,
"CloudWatchLoggingOptionDescriptions": [
{
"CloudWatchLoggingOptionId": "string",
"LogStreamARN": "string",
"RoleARN": "string"
}
],
"ConditionalToken": "string",
"CreateTimestamp": number,
"LastUpdateTimestamp": number,
"RuntimeEnvironment": "string",
"ServiceExecutionRole": "string"
}
}
回應元素
如果動作成功,則服務傳回 HTTP 200 回應。
服務會傳回下列 JSON 格式的資料。
- ApplicationDetail
-
為了回應您的
CreateApplication
要求,Apache Flink 的受管理服務會傳回回應,其中包含所建立之應用程式的詳細資訊。類型:ApplicationDetail 物件
錯誤
- CodeValidationException
-
使用者提供的應用程式程式碼 (query) 無效。這可能是一個簡單的語法錯誤。
HTTP 狀態碼:400
- ConcurrentModificationException
-
因應用程式並行修改而擲回的例外狀況。此錯誤可能是因為嘗試修改應用程式而不使用目前的應用程式 ID 所致。
HTTP 狀態碼:400
- InvalidArgumentException
-
指定的輸入參數值無效。
HTTP 狀態碼:400
- InvalidRequestException
-
請求 JSON 對該操作無效。
HTTP 狀態碼:400
- LimitExceededException
-
已超過允許的資源數量。
HTTP 狀態碼:400
- ResourceInUseException
-
該應用程序不適用於此操作。
HTTP 狀態碼:400
- TooManyTagsException
-
使用太多標籤建立的應用程式,或在應用程式中加入太多標籤。請注意,應用程式標籤的數目上限包括系統標籤。使用者定義的應用程式的標籤數目上限為 50。
HTTP 狀態碼:400
- UnsupportedOperationException
-
請求被拒絕,因為指定的參數不受支持,或指定的資源對此操作無效。
HTTP 狀態碼:400
另請參閱
如需在其中一個特定語言 AWS SDK 中使用此 API 的詳細資訊,請參閱下列內容: