生成预签名URL
AI-generatedSummary
Generate a presigned URL for an OSS object
Inputs
- bucket (required) — OSS 存储空间(Bucket)名称
- key (required) — 对象(文件)在 OSS 中的键名(路径)
- region (required) — 存储空间所在的区域,例如:oss-cn-hangzhou
- endpoint — 其他服务可用来访问 OSS 的域名(可选)
- expiresIn — 预签名 URL 的有效期,单位:秒,默认 3600 秒(1小时)
Output shape
a single object containing the presigned URL and metadata (url, bucket, key, region, expiresIn)
The response includes the generated URL and the input parameters; errors are handled separately and may return an error object.
Examples
Example 1: Create a temporary link to share an image
bucket: my-bucket, key: images/photo.jpg, region: oss-cn-beijing, expiresIn: 3600
Example 2: Generate a link with a longer expiration for a large file
bucket: archive, key: backups/2023.zip, region: oss-cn-shanghai, expiresIn: 86400