UploadMedia
This class encapsulates and extends the ROS resource type ALIYUN::ICE::UploadMedia
.
Initializers
import com.aliyun.ros.cdk.ice.UploadMedia;
UploadMedia.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .appId(java.lang.String)
// .appId(IResolvable)
// .entityId(java.lang.String)
// .entityId(IResolvable)
// .fileInfo(IResolvable)
// .fileInfo(java.util.Map<java.lang.String, java.lang.Object>)
// .mediaMetaData(IResolvable)
// .mediaMetaData(java.util.Map<java.lang.String, java.lang.Object>)
// .postProcessConfig(IResolvable)
// .postProcessConfig(java.util.Map<java.lang.String, java.lang.Object>)
// .uploadTargetConfig(IResolvable)
// .uploadTargetConfig(java.util.Map<java.lang.String, java.lang.Object>)
// .userData(IResolvable)
// .userData(java.util.Map<java.lang.String, java.lang.Object>)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
appId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property appId: The application ID. |
entityId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property entityId: The entity ID. |
fileInfo |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property fileInfo: The file information, which is in the JSON format and contains the following fields: Type: required. |
mediaMetaData |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property mediaMetaData: The metadata of the media asset, which is a JSON string that contains the following fields: Title: required. |
postProcessConfig |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property postProcessConfig: Type = video || audio There is a post-upload processing action. |
uploadTargetConfig |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property uploadTargetConfig: The destination storage address. |
userData |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property userData: The user data. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
appId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property appId: The application ID.
Default value: app-1000000.
entityId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property entityId: The entity ID.
You can call the CreateEntity operation to create an entity and specify a dynamic metadata structure.
fileInfo
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property fileInfo: The file information, which is in the JSON format and contains the following fields: Type: required.
The file type. Valid values: video, image, audio, text, and other. Name: required. The file name without the extension. Size: optional. The file size. Ext: required. The file name extension.
mediaMetaData
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property mediaMetaData: The metadata of the media asset, which is a JSON string that contains the following fields: Title: required.
The value can be up to 128 characters in length. The value must be encoded in UTF-8. Description: optional. The value can be up to 1,024 characters in length. The value must be encoded in UTF-8. CateId: optional. Tags: optional. BusinessType: required. Valid values: opening or ending if Type is set to video default or cover if Type is set to image subtitles or font if Type is set to text watermark if Type is set to material general CoverURL: optional. DynamicMetaData: The value is a string.
postProcessConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property postProcessConfig: Type = video || audio There is a post-upload processing action.
ProcessType Value: Workflow.
uploadTargetConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property uploadTargetConfig: The destination storage address.
Set StorageType to oss. Set StorageLocation to an address in ApsaraVideo VOD. You cannot set this field to an OSS URL.
userData
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property userData: The user data.
The value must be a JSON string. You can configure settings such as message callbacks.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.ice.UploadMedia;
UploadMedia.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrFileUrl |
com.aliyun.ros.cdk.core.IResolvable |
Attribute FileURL: The OSS URL of the file. |
attrMediaId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MediaId: The ID of the media asset. |
attrMediaUrl |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MediaURL: The URL of the media asset. |
attrUploadAddress |
com.aliyun.ros.cdk.core.IResolvable |
Attribute UploadAddress: The upload URL. |
attrUploadAuth |
com.aliyun.ros.cdk.core.IResolvable |
Attribute UploadAuth: The upload credential. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrFileUrl
Required
public IResolvable getAttrFileUrl();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute FileURL: The OSS URL of the file.
The URL does not contain the information used for authentication.
attrMediaId
Required
public IResolvable getAttrMediaId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MediaId: The ID of the media asset.
attrMediaUrl
Required
public IResolvable getAttrMediaUrl();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MediaURL: The URL of the media asset.
Note If a domain name for Alibaba Cloud CDN (CDN) is specified, a CDN URL is returned. Otherwise, an OSS URL is returned. If the HTTP status code 403 is returned when you access the URL from your browser, the URL authentication feature of ApsaraVideo VOD is enabled. To resolve this issue, disable URL authentication or generate an authentication signature.
attrUploadAddress
Required
public IResolvable getAttrUploadAddress();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute UploadAddress: The upload URL.
Note The returned upload URL is a Base64-encoded URL. You must decode the Base64-encoded upload URL before you use an SDK or call an API operation to upload media files. You need to parse UploadAddress only if you use OSS SDK or call an OSS API operation to upload media files.
attrUploadAuth
Required
public IResolvable getAttrUploadAuth();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute UploadAuth: The upload credential.
Note The returned upload credential is a Base64-encoded value. You must decode the Base64-encoded upload URL before you use an SDK or call an API operation to upload media files. You need to parse UploadAuth only if you use OSS SDK or call an OSS API operation to upload media files.