diff --git a/VERSION b/VERSION index ac16615..8cf7c24 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.24 +0.2.25 diff --git a/lib/services/ufile/index.d.ts b/lib/services/ufile/index.d.ts index b5160f8..10ba988 100644 --- a/lib/services/ufile/index.d.ts +++ b/lib/services/ufile/index.d.ts @@ -9,6 +9,30 @@ export default class UFileClient extends Client { config: ConfigOptions; credential: CredentialOptions; }); + /** + * AddCORSRule - 添加跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/add_cors_rule + */ + addCORSRule(request?: AddCORSRuleRequest): Promise; + /** + * AddUFileSSLCert - 给指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/add_ufile_ssl_cert + */ + addUFileSSLCert(request?: AddUFileSSLCertRequest): Promise; + /** + * BindBucketDomain - 绑定自定义域名 + * + * See also: https://docs.ucloud.cn/api/ufile-api/bind_bucket_domain + */ + bindBucketDomain(request?: BindBucketDomainRequest): Promise; + /** + * BuyUFilePkg - 购买流量包或存储包 + * + * See also: https://docs.ucloud.cn/api/ufile-api/buy_ufile_pkg + */ + buyUFilePkg(request?: BuyUFilePkgRequest): Promise; /** * CreateBucket - 创建Bucket * @@ -27,18 +51,42 @@ export default class UFileClient extends Client { * See also: https://docs.ucloud.cn/api/ufile-api/create_ufile_token */ createUFileToken(request?: CreateUFileTokenRequest): Promise; + /** + * CreateUdsRule - 针对对象存储的文件,进行自动触发解压。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_uds_rule + */ + createUdsRule(request?: CreateUdsRuleRequest): Promise; /** * DeleteBucket - 删除Bucket * * See also: https://docs.ucloud.cn/api/ufile-api/delete_bucket */ deleteBucket(request?: DeleteBucketRequest): Promise; + /** + * DeleteCORSRule - 删除跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_cors_rule + */ + deleteCORSRule(request?: DeleteCORSRuleRequest): Promise; /** * DeleteUFileLifeCycle - 删除生命周期管理 * * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_life_cycle */ deleteUFileLifeCycle(request?: DeleteUFileLifeCycleRequest): Promise; + /** + * DeleteUFilePkg - 删除资源包(退费) + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_pkg + */ + deleteUFilePkg(request?: DeleteUFilePkgRequest): Promise; + /** + * DeleteUFileSSLCert - 删除指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_ssl_cert + */ + deleteUFileSSLCert(request?: DeleteUFileSSLCertRequest): Promise; /** * DeleteUFileToken - 删除令牌 * @@ -51,24 +99,102 @@ export default class UFileClient extends Client { * See also: https://docs.ucloud.cn/api/ufile-api/describe_bucket */ describeBucket(request?: DescribeBucketRequest): Promise; + /** + * DescribeCORSRule - 获取跨域规则信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_cors_rule + */ + describeCORSRule(request?: DescribeCORSRuleRequest): Promise; + /** + * DescribeUFileAvailablePkg - 查询可购买的资源包列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_available_pkg + */ + describeUFileAvailablePkg(request?: DescribeUFileAvailablePkgRequest): Promise; /** * DescribeUFileLifeCycle - 获取生命周期信息 * * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_life_cycle */ describeUFileLifeCycle(request?: DescribeUFileLifeCycleRequest): Promise; + /** + * DescribeUFilePkg - 查询已购买的资源包列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_pkg + */ + describeUFilePkg(request?: DescribeUFilePkgRequest): Promise; + /** + * DescribeUFilePkgUsage - 查询资源包使用明细 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_pkg_usage + */ + describeUFilePkgUsage(request?: DescribeUFilePkgUsageRequest): Promise; + /** + * DescribeUFileReferer - 对象存储防盗链列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_referer + */ + describeUFileReferer(request?: DescribeUFileRefererRequest): Promise; + /** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_ssl_cert + */ + describeUFileSSLCert(request?: DescribeUFileSSLCertRequest): Promise; /** * DescribeUFileToken - 获取令牌信息 * * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_token */ describeUFileToken(request?: DescribeUFileTokenRequest): Promise; + /** + * DescribeUdsRule - 针对解压缩规则进行查询 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_uds_rule + */ + describeUdsRule(request?: DescribeUdsRuleRequest): Promise; + /** + * GetBucketQuota - 获取bucket配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_bucket_quota + */ + getBucketQuota(request?: GetBucketQuotaRequest): Promise; + /** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_bucket_static_page_rule + */ + getBucketStaticPageRule(request?: GetBucketStaticPageRuleRequest): Promise; + /** + * GetProjectRegionQuota - 获取项目地域配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_project_region_quota + */ + getProjectRegionQuota(request?: GetProjectRegionQuotaRequest): Promise; + /** + * GetUFileDailyBill - 获取bucket每日账单 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_daily_bill + */ + getUFileDailyBill(request?: GetUFileDailyBillRequest): Promise; /** * GetUFileDailyReport - 查看日消费报表 * * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_daily_report */ getUFileDailyReport(request?: GetUFileDailyReportRequest): Promise; + /** + * GetUFileMonthlyBill - 获取bucket月度账单 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_monthly_bill + */ + getUFileMonthlyBill(request?: GetUFileMonthlyBillRequest): Promise; + /** + * GetUFilePkgPrice - 获取对资源进行新购、续费、升级等操作的价格 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_pkg_price + */ + getUFilePkgPrice(request?: GetUFilePkgPriceRequest): Promise; /** * GetUFileQuota - 查看配额状态 * @@ -93,6 +219,24 @@ export default class UFileClient extends Client { * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_report */ getUFileReport(request?: GetUFileReportRequest): Promise; + /** + * RenewUFilePkg - 资源包续费 + * + * See also: https://docs.ucloud.cn/api/ufile-api/renew_ufile_pkg + */ + renewUFilePkg(request?: RenewUFilePkgRequest): Promise; + /** + * SetBucketQuota - 设置bucket配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_bucket_quota + */ + setBucketQuota(request?: SetBucketQuotaRequest): Promise; + /** + * SetProjectRegionQuota - 设置项目地域配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_project_region_quota + */ + setProjectRegionQuota(request?: SetProjectRegionQuotaRequest): Promise; /** * SetUFileReferer - 设置对象存储防盗链 * @@ -105,18 +249,178 @@ export default class UFileClient extends Client { * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket */ updateBucket(request?: UpdateBucketRequest): Promise; + /** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket_static_page_rule + */ + updateBucketStaticPageRule(request?: UpdateBucketStaticPageRuleRequest): Promise; + /** + * UpdateCORSRule - 更新跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_cors_rule + */ + updateCORSRule(request?: UpdateCORSRuleRequest): Promise; /** * UpdateUFileLifeCycle - 更新生命周期管理 * * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_life_cycle */ updateUFileLifeCycle(request?: UpdateUFileLifeCycleRequest): Promise; + /** + * UpdateUFileSSLCert - 更新指定域名证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_ssl_cert + */ + updateUFileSSLCert(request?: UpdateUFileSSLCertRequest): Promise; /** * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 * * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_token */ updateUFileToken(request?: UpdateUFileTokenRequest): Promise; + /** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_uds_rule + */ + updateUdsRule(request?: UpdateUdsRuleRequest): Promise; +} +/** + * AddCORSRule - 添加跨域规则 + */ +export interface AddCORSRuleRequest { + /** + * Bucket名称 + */ + BucketName: string; + /** + * 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + */ + AllowedOrigin: string; + /** + * 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + */ + AllowedMethod: string; + /** + * 指定允许的跨域请求头(多个Header用‘,’分隔) + */ + AllowedHeader?: string; + /** + * 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + */ + ExposeHeader?: string; +} +/** + * AddCORSRule - 添加跨域规则 + */ +export interface AddCORSRuleResponse { + /** + * 增加一条跨域规则的cors_id + */ + CORSId: string; +} +/** + * AddUFileSSLCert - 给指定域名添加证书 + */ +export interface AddUFileSSLCertRequest { + /** + * 存储桶名称,全局唯一 + */ + BucketName: string; + /** + * 域名 + */ + Domain: string; + /** + * SSL证书名称 + */ + CertificateName: string; + /** + * 填写SSL证书文件内容(PEM编码)。证书文件内容填写格式:如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + */ + Certificate?: string; + /** + * 填写SSL证书私钥内容(PEM编码)。私钥内容填写格式 RSA + */ + CertificateKey?: string; + /** + * ussl证书的资源ID + */ + USSLId?: string; +} +/** + * AddUFileSSLCert - 给指定域名添加证书 + */ +export interface AddUFileSSLCertResponse { +} +/** + * BindBucketDomain - 绑定自定义域名 + */ +export interface BindBucketDomainRequest { + /** + * 自定义域名对应的bucket名称 + */ + BucketName: string; + /** + * 自定义域名 + */ + Domain: string; +} +/** + * BindBucketDomain - 绑定自定义域名 + */ +export interface BindBucketDomainResponse { + /** + * 自定义域名对应的bucket名称 + */ + BucketName: string; + /** + * 自定义域名对应的Bucket的Id + */ + BucketId: string; +} +/** + * BuyUFilePkg - 购买流量包或存储包 + */ +export interface BuyUFilePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 资源包名称 + */ + PkgName: string; + /** + * 0: 标准存储包,1: 忙时流量包,2: 闲时流量包 + */ + PkgType: number; + /** + * 购买数量 + */ + Amount: number; + /** + * 数量单位,如 GB、TB 等 + */ + AmountUnit: string; + /** + * 购买时长 + */ + Duration: number; + /** + * 时长单位,如 Month、Year 等 + */ + DurationUnit: string; +} +/** + * BuyUFilePkg - 购买流量包或存储包 + */ +export interface BuyUFilePkgResponse { + /** + * 购买成功返回资源包Id + */ + ResourceId: string; } /** * CreateBucket - 创建Bucket @@ -130,6 +434,10 @@ export interface CreateBucketRequest { * Bucket访问类型,public或private; 默认为private */ Type?: string; + /** + * Bucket所属业务组,默认为default + */ + Tag?: string; } /** * CreateBucket - 创建Bucket @@ -176,6 +484,30 @@ export interface CreateUFileLifeCycleRequest { * 指定一个过期天数N,文件会在其最近更新时间点的N天后,自动变为低频存储类型;参数范围:[7,36500],0代表不启用 */ IADays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerDeleteDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerArchivalDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerIADays?: number; + /** + * Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,tag的最大数量为10 + */ + Tags?: string; + /** + * 文件的最小size + */ + MinSize?: number; + /** + * 文件的最大size + */ + MaxSize?: number; } /** * CreateUFileLifeCycle - 创建生命周期管理 @@ -195,7 +527,7 @@ export interface CreateUFileTokenRequest { */ TokenName: string; /** - * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + * 令牌允许执行的操作[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限 , TOKEN_ALLOW_WRITE 上传权限 , TOKEN_ALLOW_DELETE 删除权限 , TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限, TOKEN_DENY_UPDATE 禁止覆盖权限]。默认TOKEN_ALLOW_NONE */ AllowedOps?: string[]; /** @@ -210,59 +542,240 @@ export interface CreateUFileTokenRequest { * Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 */ ExpireTime?: number; + /** + * 令牌黑名单,支持ipv4,ipv6格式。 + */ + BlackIPList?: string[]; + /** + * 令牌白名单,支持ipv4,ipv6格式。 + */ + WhiteIPList?: string[]; } /** * CreateUFileToken - 创建US3令牌 */ export interface CreateUFileTokenResponse { /** - * 创建令牌的token_id + * 令牌唯一ID */ TokenId?: string; -} -/** - * DeleteBucket - 删除Bucket - */ -export interface DeleteBucketRequest { /** - * 待删除Bucket的名称 + * 创建令牌的详细信息 */ - BucketName: string; + UFileTokenSet?: { + /** + * 所属地区 + */ + Region: string; + /** + * 令牌ID + */ + TokenId: string; + /** + * 令牌名称 + */ + TokenName: string; + /** + * 令牌公钥 + */ + PublicKey: string; + /** + * 令牌私钥 + */ + PrivateKey: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] + */ + AllowedOps: string[]; + /** + * 令牌允许操作的key前缀 + */ + AllowedPrefixes: string[]; + /** + * 令牌允许操作的bucket + */ + AllowedBuckets: string[]; + /** + * 令牌的超时时间点 + */ + ExpireTime: number; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 修改时间 + */ + ModifyTime: number; + /** + * 令牌黑名单 + */ + BlackIPList?: string[]; + /** + * 令牌白名单 + */ + WhiteIPList?: string[]; + }; } /** - * DeleteBucket - 删除Bucket + * CreateUdsRule - 针对对象存储的文件,进行自动触发解压。 */ -export interface DeleteBucketResponse { +export interface CreateUdsRuleRequest { /** - * Bucket的名称 + * 规则名称 */ - BucketName?: string; + RuleName: string; /** - * Bucket的ID + * 源Bucket名字,全局唯一 */ - BucketId?: string; -} -/** - * DeleteUFileLifeCycle - 删除生命周期管理 - */ -export interface DeleteUFileLifeCycleRequest { + SrcBucket: string; /** - * 生命周期Id + * 源bucket的token之一的tokenId */ - LifeCycleId: string; + SrcTokenId: string; /** - * 存储空间名称 + * 目标Bucket名字,全局唯一 */ - BucketName: string; -} -/** - * DeleteUFileLifeCycle - 删除生命周期管理 - */ -export interface DeleteUFileLifeCycleResponse { -} -/** - * DeleteUFileToken - 删除令牌 - */ + DstBucket: string; + /** + * 目标bucket的token之一的tokenId + */ + DstTokenId: string; + /** + * 解压后的目标目录 + */ + DstDirectory: string; + /** + * 是否以压缩文件的前缀为最后一层目录 + */ + KeepUS3Name: boolean; + /** + * 解压缩触发的前缀 + */ + Prefixes: string; + /** + * 操作的ops数组,"Ops.0":"unzip" + */ + Ops: string[]; + /** + * 通知的事件数组 + */ + Events?: string[]; + /** + * 联系的用户组ID + */ + ContactGroupId?: string; + /** + * 通知的类型数组 + */ + NotificationTypes?: string[]; +} +/** + * CreateUdsRule - 针对对象存储的文件,进行自动触发解压。 + */ +export interface CreateUdsRuleResponse { + /** + * 创建规则的规则ID + */ + RuleId: string; +} +/** + * DeleteBucket - 删除Bucket + */ +export interface DeleteBucketRequest { + /** + * 待删除Bucket的名称 + */ + BucketName: string; +} +/** + * DeleteBucket - 删除Bucket + */ +export interface DeleteBucketResponse { + /** + * Bucket的名称 + */ + BucketName?: string; + /** + * Bucket的ID + */ + BucketId?: string; +} +/** + * DeleteCORSRule - 删除跨域规则 + */ +export interface DeleteCORSRuleRequest { + /** + * Bucket名称 + */ + BucketName: string; + /** + * 跨域规则ID + */ + CORSId: string; +} +/** + * DeleteCORSRule - 删除跨域规则 + */ +export interface DeleteCORSRuleResponse { +} +/** + * DeleteUFileLifeCycle - 删除生命周期管理 + */ +export interface DeleteUFileLifeCycleRequest { + /** + * 生命周期Id + */ + LifeCycleId: string; + /** + * 存储空间名称 + */ + BucketName: string; +} +/** + * DeleteUFileLifeCycle - 删除生命周期管理 + */ +export interface DeleteUFileLifeCycleResponse { +} +/** + * DeleteUFilePkg - 删除资源包(退费) + */ +export interface DeleteUFilePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 资源ID + */ + ResourceId: string; +} +/** + * DeleteUFilePkg - 删除资源包(退费) + */ +export interface DeleteUFilePkgResponse { +} +/** + * DeleteUFileSSLCert - 删除指定域名添加证书 + */ +export interface DeleteUFileSSLCertRequest { + /** + * 存储桶名称,全局唯一 + */ + BucketName: string; + /** + * 域名 + */ + Domain: string; +} +/** + * DeleteUFileSSLCert - 删除指定域名添加证书 + */ +export interface DeleteUFileSSLCertResponse { +} +/** + * DeleteUFileToken - 删除令牌 + */ export interface DeleteUFileTokenRequest { /** * 令牌ID @@ -303,6 +816,10 @@ export interface DescribeBucketResponse { * Bucket所属地域 */ Region?: string; + /** + * 默认存储类型 + */ + StorageClass?: string; /** * Bucket名称 */ @@ -362,6 +879,131 @@ export interface DescribeBucketResponse { HasUserDomain?: number; }[]; } +/** + * DescribeCORSRule - 获取跨域规则信息 + */ +export interface DescribeCORSRuleRequest { + /** + * Bucket名称 + */ + BucketName: string; + /** + * 跨域规则ID,不指定则返回所有跨域规则信息 + */ + CORSId?: string; +} +/** + * DescribeCORSRule - 获取跨域规则信息 + */ +export interface DescribeCORSRuleResponse { + /** + * 跨域规则信息集合 + */ + DataSet: { + /** + * 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + */ + AllowedOrigin: string; + /** + * 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + */ + AllowedMethod: string; + /** + * 跨域规则id + */ + CORSId: string; + /** + * 跨域规则创建时间 + */ + CreateTime: number; + /** + * 跨域规则最新修改时间 + */ + ModifyTime: number; + /** + * 指定允许的跨域请求头(多个Header用‘,’分隔) + */ + AllowedHeader: string; + /** + * 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + */ + ExposeHeader: string; + }[]; +} +/** + * DescribeUFileAvailablePkg - 查询可购买的资源包列表 + */ +export interface DescribeUFileAvailablePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; +} +/** + * DescribeUFileAvailablePkg - 查询可购买的资源包列表 + */ +export interface DescribeUFileAvailablePkgResponse { + /** + * 可购买的资源包规格 + */ + PkgList: { + /** + * 资源类型ID + */ + Type?: number; + /** + * 资源类型名称 + */ + Name?: string; + /** + * 支持购买的数量规格 + */ + Specs?: { + /** + * 仅针对当前规格生效的durations + */ + Durations: { + /** + * 折扣 + */ + Discount: number; + /** + * 购买时长 + */ + Duration?: number; + /** + * 时长单位,如: Month、Year + */ + Unit?: string; + }[]; + /** + * 购买数量 + */ + Amount?: number; + /** + * 数量的单位,如:GB,TB + */ + Unit?: string; + }[]; + /** + * 公共支持购买的时长,当一个Spec配了独立的Durations时,就按独立配置Durations生效;否者按CommonDurations生效 + */ + CommonDurations?: { + /** + * 折扣 + */ + Discount: number; + /** + * 购买时长 + */ + Duration?: number; + /** + * 时长单位,如: Month、Year + */ + Unit?: string; + }[]; + }[]; +} /** * DescribeUFileLifeCycle - 获取生命周期信息 */ @@ -382,7 +1024,15 @@ export interface DescribeUFileLifeCycleResponse { /** * 生命周期信息 */ - DateSet: { + DataSet: { + /** + * 文件的最小size + */ + MinSize: string; + /** + * 文件的最大size + */ + MaxSize: string; /** * 生命周期Id */ @@ -417,6 +1067,177 @@ export interface DescribeUFileLifeCycleResponse { IADays?: number; }[]; } +/** + * DescribeUFilePkg - 查询已购买的资源包列表 + */ +export interface DescribeUFilePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 查询指定的资源包,当指定ResourceId查询时,Region是必填的 + */ + ResourceId?: string; + /** + * 默认0表示查询全部已购买的资源包,1表示查询过期的,-1表示查询非过期的 + */ + Expired?: number; +} +/** + * DescribeUFilePkg - 查询已购买的资源包列表 + */ +export interface DescribeUFilePkgResponse { + /** + * 已购买的资源包 + */ + Pkgs: { + /** + * 资源包地域 + */ + Region: string; + /** + * 资源包ID + */ + ResourceId?: string; + /** + * 资源包名称 + */ + PkgName?: string; + /** + * 资源包类型ID + */ + PkgType?: number; + /** + * 资源包容量 + */ + Amount?: number; + /** + * 资源包剩余容量(仅支持流量包) + */ + RemainAmount?: string; + /** + * 资源包创建时间 + */ + CreateTime?: number; + /** + * 资源包失效时间 + */ + ExpiredTime?: number; + }[]; +} +/** + * DescribeUFilePkgUsage - 查询资源包使用明细 + */ +export interface DescribeUFilePkgUsageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 资源包ID + */ + ResourceId: string; + /** + * 开始时间,如 2023-09-01 + */ + StartDate: string; + /** + * 结束时间,如 2023-09-01 + */ + EndDate: string; +} +/** + * DescribeUFilePkgUsage - 查询资源包使用明细 + */ +export interface DescribeUFilePkgUsageResponse { + /** + * 按天返回的使用明细 + */ + Usage?: { + /** + * 日期 + */ + Date?: string; + /** + * 使用量,单位为B + */ + Cost?: string; + }[]; +} +/** + * DescribeUFileReferer - 对象存储防盗链列表 + */ +export interface DescribeUFileRefererRequest { + /** + * 存储空间名称 + */ + BucketName: string; +} +/** + * DescribeUFileReferer - 对象存储防盗链列表 + */ +export interface DescribeUFileRefererResponse { + /** + * 防盗链Referer类型,支持两种类型,1黑名单,2白名单;未开启referer时不返回此参数 + */ + RefererType: number; + /** + * 防盗链Referer规则列表;未开启referer时不返回此参数 + */ + RefererList: string[]; + /** + * ReferType为白名单时,NullRefer为false代表不允许NULL refer访问,为true代表允许Null refer访问; 未开启referer时不返回此参数 + */ + NullRefer: boolean; + /** + * 防盗链功能是否开启,"on"表示开启,"off"表示关闭 + */ + RefererStatus?: string; + /** + * 黑名单列表 + */ + BlackList?: string[]; + /** + * 白名单列表 + */ + WhiteList?: string[]; +} +/** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + */ +export interface DescribeUFileSSLCertRequest { + /** + * 存储桶名称,全局唯一 + */ + BucketName: string; +} +/** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + */ +export interface DescribeUFileSSLCertResponse { + /** + * 证书列表 + */ + DataSet?: { + /** + * 域名 + */ + Domain?: string; + /** + * SSL证书内容,和域名对应 + */ + Certificate?: string; + /** + * SSL证书对应的私钥 + */ + CertificateKey?: string; + /** + * SSL证书名称 + */ + CertificateName?: string; + }[]; +} /** * DescribeUFileToken - 获取令牌信息 */ @@ -442,6 +1263,10 @@ export interface DescribeUFileTokenResponse { * 令牌描述信息 */ DataSet: { + /** + * 所属地区 + */ + Region: string; /** * 令牌ID */ @@ -459,7 +1284,7 @@ export interface DescribeUFileTokenResponse { */ PrivateKey: string; /** - * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] */ AllowedOps: string[]; /** @@ -483,112 +1308,577 @@ export interface DescribeUFileTokenResponse { */ ModifyTime: number; /** - * 所属地区 + * 令牌黑名单 */ - Region: string; + BlackIPList?: string[]; + /** + * 令牌白名单 + */ + WhiteIPList?: string[]; + }[]; +} +/** + * DescribeUdsRule - 针对解压缩规则进行查询 + */ +export interface DescribeUdsRuleRequest { + /** + * 源BucketName + */ + BucketName: string; + /** + * 规则ID,不设置时,查询改bucket的所有规则 + */ + RuleId?: string; +} +/** + * DescribeUdsRule - 针对解压缩规则进行查询 + */ +export interface DescribeUdsRuleResponse { + /** + * 此次删除的规则的ID + */ + TotalCount: number; + /** + * 规则数组 + */ + DataSet?: string[]; +} +/** + * GetBucketQuota - 获取bucket配额 + */ +export interface GetBucketQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * bucket名称 + */ + BucketName: string; +} +/** + * GetBucketQuota - 获取bucket配额 + */ +export interface GetBucketQuotaResponse { + /** + * bucket配额 + */ + QuotaLimit: number; + /** + * bucket名称 + */ + BucketName: string; +} +/** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + */ +export interface GetBucketStaticPageRuleRequest { + /** + * 存储桶名称 + */ + Bucket: string; +} +/** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + */ +export interface GetBucketStaticPageRuleResponse { + /** + * 规则内容 + */ + Rule: { + /** + * 启用状态 + */ + Status?: string; + /** + * 默认网页 + */ + DefaultIndex?: string; + /** + * 子目录重定向功能的启用状态 + */ + SubDirRedirect?: string; + /** + * 404时的处理规则 + */ + RuleFor404?: string; + /** + * 默认404页面在存储桶的路径 + */ + DefaultPage404?: string; + }; +} +/** + * GetProjectRegionQuota - 获取项目地域配额 + */ +export interface GetProjectRegionQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; +} +/** + * GetProjectRegionQuota - 获取项目地域配额 + */ +export interface GetProjectRegionQuotaResponse { + /** + * 地域 + */ + Region: string; + /** + * 配额类型 + */ + QuotaType: string; + /** + * 配额数目 + */ + QuotaLimit: number; +} +/** + * GetUFileDailyBill - 获取bucket每日账单 + */ +export interface GetUFileDailyBillRequest { + /** + * 查询开始时间;unix时间戳,单位s + */ + StartTime: number; + /** + * 查询结束时间;unix时间戳,单位s + */ + EndTime: number; + /** + * 空间名称。此字段不为空,返回此Bucket日账单,否则,返回这个项目的日账单 + */ + BucketName?: string; +} +/** + * GetUFileDailyBill - 获取bucket每日账单 + */ +export interface GetUFileDailyBillResponse { + /** + * 消费情况 + */ + DataSet: { + /** + * bucket账单 + */ + BucketBills?: { + /** + * bucket对应的资源系统标签 + */ + Labels?: { + /** + * 标签对应key + */ + Key?: string; + /** + * 标签对应value + */ + Value?: string; + }[]; + /** + * 下载低频存储次数费用;分 + */ + GetCountIaBill?: number; + /** + * 下载标准存储次数费用;分 + */ + GetCountBill?: number; + /** + * 上传归档存储次数费用;分 + */ + PutCountAcBill?: number; + /** + * 上传低频存储次数费用;分 + */ + PutCountIaBill?: number; + /** + * 上传标准存储次数费用;分 + */ + PutCountBill?: number; + /** + * 对象标签费用: 分 + */ + ObjectTagCountBill?: number; + /** + * 标准-存储总容量费用;分 + */ + StorageBill?: number; + /** + * 低频-存储总容量费用;分 + */ + IaStorageBill?: number; + /** + * 归档-存储总容量费用;分 + */ + AcStorageBill?: number; + /** + * 低频-数据取回量,即低频文件的数据取回量费用;分 + */ + IaGetSizeBill?: number; + /** + * 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量费用; 分 + */ + AcRestoreBill?: number; + /** + * 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量费用; 分 + */ + AcExpeditedRetrievalBill?: number; + /** + * 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + */ + IaShortStorageBill?: number; + /** + * 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + */ + AcShortStorageBill?: number; + /** + * 基础图片处理量费用;分 + */ + ImageHandleFlowBill?: number; + /** + * 图片高级压缩次数费用;分 + */ + ImageCompressCountBill?: number; + /** + * 忙时流量费用;分;海外无此字段 + */ + BusyFlowBill?: number; + /** + * 闲时流量费用;分;海外无此字段 + */ + IdleFlowBill?: number; + /** + * cdn回源流量费用;分 + */ + CdnFlowBill?: number; + /** + * 下载流量费用:分;国内无此字段 + */ + FlowBill?: number; + /** + * 配额消费时间,unix时间戳;单位s,精确到日期 + */ + Date?: number; + /** + * 下载归档存储次数费用;分 + */ + GetCountAcBill?: number; + /** + * 总费用;分 + */ + TotalBill?: number; + }[]; + }[]; +} +/** + * GetUFileDailyReport - 查看日消费报表 + */ +export interface GetUFileDailyReportRequest { + /** + * 查询开始时间;unix时间戳,单位s + */ + StartTime: number; + /** + * 查询结束时间;unix时间戳,单位s + */ + EndTime: number; + /** + * 空间名称。此字段不为空,返回此Bucket日使用量;否则,返回这个项目的日使用量 + */ + BucketName?: string; +} +/** + * GetUFileDailyReport - 查看日消费报表 + */ +export interface GetUFileDailyReportResponse { + /** + * 消费情况 + */ + DataSet: { + /** + * 总消费情况 + */ + Total?: { + /** + * 下载流量:单位GB;国内无此字段 + */ + Flow?: number; + /** + * 闲时流量;单位GB;海外无此字段 + */ + IdleFlow?: number; + /** + * 忙时流量;单位GB;海外无此字段 + */ + BusyFlow?: number; + /** + * cdn回源流量;单位GB + */ + CdnFlow?: number; + /** + * API请求次数(万次) + */ + ApiTimes?: number; + }[]; + /** + * 日消费情况 + */ + Daily?: { + /** + * 标准-存储总容量;单位GB + */ + Storage?: number; + /** + * 低频-存储总容量;单位GB + */ + IaStorage?: number; + /** + * 归档-存储总容量;单位GB + */ + AcStorage?: number; + /** + * 低频-数据取回量,即低频文件的数据取回量;单位GB + */ + IaGetSize?: number; + /** + * 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量;单位GB + */ + AcRestore?: number; + /** + * 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量;单位GB + */ + AcExpeditedRetrieval?: number; + /** + * 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + */ + IaShortStorage?: number; + /** + * 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + */ + AcShortStorage?: number; + /** + * 基础图片处理量;单位GB + */ + ImageHandleFlow?: number; + /** + * 图片高级压缩次数;单位千次 + */ + ImageCompressCount?: number; + /** + * 忙时流量;单位GB;海外无此字段 + */ + BusyFlow?: number; + /** + * 闲时流量;单位GB;海外无此字段 + */ + IdleFlow?: number; + /** + * cdn回源流量;单位GB + */ + CdnFlow?: number; + /** + * 下载流量:单位GB;国内无此字段 + */ + Flow?: number; + /** + * 配额消费时间,unix时间戳;单位s,精确到日期 + */ + Date?: number; + /** + * 请求次数;单位万次 + */ + ApiTimes?: number; + /** + * 对象标签个数; 单位万个 + */ + ObjectTagCount?: number; + }[]; }[]; } /** - * GetUFileDailyReport - 查看日消费报表 + * GetUFileMonthlyBill - 获取bucket月度账单 */ -export interface GetUFileDailyReportRequest { +export interface GetUFileMonthlyBillRequest { /** - * 查询开始时间;unix时间戳,单位s + * 查询开始月份;例如"1994-07" */ - StartTime: number; + StartMonth: string; /** - * 查询结束时间;unix时间戳,单位s + * 查询结束时间;例如"1994-07" */ - EndTime: number; + EndMonth: string; /** - * 空间名称。此字段不为空,返回此Bucket日使用量;否则,返回这个项目的日使用量 + * 空间名称。此字段不为空,返回此Bucket日账单,否则,返回这个项目的日账单 */ BucketName?: string; } /** - * GetUFileDailyReport - 查看日消费报表 + * GetUFileMonthlyBill - 获取bucket月度账单 */ -export interface GetUFileDailyReportResponse { +export interface GetUFileMonthlyBillResponse { /** * 消费情况 */ DataSet: { /** - * 总消费情况 + * bucket账单 */ - Total?: { + BucketBills?: { /** - * 下载流量:单位byte;国内无此字段 + * bucket对应的资源系统标签 */ - Flow?: number; + Labels?: { + /** + * 标签对应key + */ + Key?: string; + /** + * 标签对应value + */ + Value?: string; + }[]; /** - * 闲时流量;单位byte;海外无此字段 + * 下载低频存储次数费用;分 */ - IdleFlow?: number; + GetCountIaBill?: number; /** - * 忙时流量;单位byte;海外无此字段 + * 下载标准存储次数费用;分 */ - BusyFlow?: number; + GetCountBill?: number; /** - * cdn回源流量;单位byte + * 上传归档存储次数费用;分 */ - CdnFlow?: number; + PutCountAcBill?: number; /** - * API请求次数(万次) + * 上传低频存储次数费用;分 */ - ApiTimes?: number; - }[]; - /** - * 日消费情况 - */ - Daily?: { + PutCountIaBill?: number; /** - * 标准存储量;单位byte + * 上传标准存储次数费用;分 */ - Storage?: number; + PutCountBill?: number; /** - * 低频存储量;单位byte + * 对象标签费用: 分 */ - IaStorage?: number; + ObjectTagCountBill?: number; /** - * 冷存(归档)存储量;单位byte + * 标准-存储总容量费用;分 */ - AcStorage?: number; + StorageBill?: number; /** - * 低频数据取回量;单位byte + * 低频-存储总容量费用;分 */ - IaGetSize?: number; + IaStorageBill?: number; /** - * 冷存激活量,即归档数据取回量;单位byte + * 归档-存储总容量费用;分 */ - AcRestore?: number; + AcStorageBill?: number; /** - * 忙时流量;单位byte;海外无此字段 + * 低频-数据取回量,即低频文件的数据取回量费用;分 */ - BusyFlow?: number; + IaGetSizeBill?: number; /** - * 闲时流量;单位byte;海外无此字段 + * 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量费用; 分 */ - IdleFlow?: number; + AcRestoreBill?: number; /** - * cdn回源流量;单位byte + * 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量费用; 分 */ - CdnFlow?: number; + AcExpeditedRetrievalBill?: number; /** - * 下载流量:单位byte;国内无此字段 + * 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 */ - Flow?: number; + IaShortStorageBill?: number; /** - * 配额消费时间,unix时间戳(单位s),精确到日期 + * 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 */ - Date?: number; + AcShortStorageBill?: number; /** - * API请求次数(万次) + * 基础图片处理量费用;分 */ - ApiTimes?: number; + ImageHandleFlowBill?: number; + /** + * 图片高级压缩次数费用;分 + */ + ImageCompressCountBill?: number; + /** + * 忙时流量费用;分;海外无此字段 + */ + BusyFlowBill?: number; + /** + * 闲时流量费用;分;海外无此字段 + */ + IdleFlowBill?: number; + /** + * cdn回源流量费用;分 + */ + CdnFlowBill?: number; + /** + * 下载流量费用:分;国内无此字段 + */ + FlowBill?: number; + /** + * 配额消费月份 + */ + Month?: string; + /** + * 下载归档存储次数费用;分 + */ + GetCountAcBill?: number; + /** + * 总费用;分 + */ + TotalBill?: number; }[]; }[]; } +/** + * GetUFilePkgPrice - 获取对资源进行新购、续费、升级等操作的价格 + */ +export interface GetUFilePkgPriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 操作类型,new:新购,upgrade:升级,renew:续费,delete:退费 + */ + InquiryType: string; + /** + * 新购和升级时必填 + */ + Amount?: number; + /** + * 新购和升级时必填 + */ + AmountUnit?: string; + /** + * 新购和续费时必填 + */ + Duration?: number; + /** + * 新购和续费时必填 + */ + DurationUnit?: string; + /** + * 资源id,升级续费退费时为必填 + */ + ResourceId?: string; +} +/** + * GetUFilePkgPrice - 获取对资源进行新购、续费、升级等操作的价格 + */ +export interface GetUFilePkgPriceResponse { + /** + * 实际价格 + */ + CustomPrice?: number; + /** + * 原始价格 + */ + OriginPrice?: number; +} /** * GetUFileQuota - 查看配额状态 */ @@ -726,6 +2016,88 @@ export interface GetUFileReportResponse { RequestCount?: number; }[]; } +/** + * RenewUFilePkg - 资源包续费 + */ +export interface RenewUFilePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型ID + */ + PkgType: number; + /** + * 续费时长 + */ + Duration: number; + /** + * 时长单位 + */ + DurationUnit: string; +} +/** + * RenewUFilePkg - 资源包续费 + */ +export interface RenewUFilePkgResponse { +} +/** + * SetBucketQuota - 设置bucket配额 + */ +export interface SetBucketQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * bucket名称 + */ + BucketName: string; + /** + * bucket配额 + */ + QuotaLimit: number; +} +/** + * SetBucketQuota - 设置bucket配额 + */ +export interface SetBucketQuotaResponse { +} +/** + * SetProjectRegionQuota - 设置项目地域配额 + */ +export interface SetProjectRegionQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 配额数目(单位是Byte) + */ + QuotaLimit: number; +} +/** + * SetProjectRegionQuota - 设置项目地域配额 + */ +export interface SetProjectRegionQuotaResponse { + /** + * 地域 + */ + Region: string; + /** + * 配额类型 + */ + QuotaType: string; + /** + * 配额数目(单位是Byte) + */ + QuotaLimit: string; +} /** * SetUFileReferer - 设置对象存储防盗链 */ @@ -743,13 +2115,21 @@ export interface SetUFileRefererRequest { */ RefererAllowNull?: boolean; /** - * 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; + * 防盗链Referer类型,支持三种类型,1代表设置黑名单、2代表设置白名单,3代表同时设置黑白名单; (其中1和2是为了向前兼容,后续调用只应该传递类型3)RefererStatus为"on"时此参数必填; */ RefererType?: number; /** - * 防盗链Referer规则,支持正则表达式(不支持符号';') + * 防盗链Referer规则,支持正则表达式(不支持符号';'),该字段已弃用,请使用WhiteList.n或BlackList.n */ Referers?: string[]; + /** + * 白名单列表中的一项 + */ + WhiteList?: string[]; + /** + * 黑名单列表中的一项 + */ + BlackList?: string[]; } /** * SetUFileReferer - 设置对象存储防盗链 @@ -767,7 +2147,11 @@ export interface UpdateBucketRequest { /** * Bucket访问类型;public或private */ - Type: string; + Type?: string; + /** + * 默认存储类型 + */ + StorageClass?: string; } /** * UpdateBucket - 更改Bucket的属性 @@ -782,6 +2166,74 @@ export interface UpdateBucketResponse { */ BucketId?: string; } +/** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + */ +export interface UpdateBucketStaticPageRuleRequest { + /** + * 存储桶名称 + */ + Bucket: string; + /** + * 启用状态(enable/disable,只有绑定了自定义域名才能开启) + */ + Status?: string; + /** + * 默认首页 + */ + DefaultIndex?: string; + /** + * 子目录是否启用重定向 + */ + SubDirRedirect?: string; + /** + * 404规则 + */ + RuleFor404?: string; + /** + * 404时的默认页面 + */ + DefaultPage404?: string; +} +/** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + */ +export interface UpdateBucketStaticPageRuleResponse { +} +/** + * UpdateCORSRule - 更新跨域规则 + */ +export interface UpdateCORSRuleRequest { + /** + * 跨域规则ID + */ + CORSId: string; + /** + * Bucket名称 + */ + BucketName: string; + /** + * 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + */ + AllowedOrigin: string; + /** + * 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + */ + AllowedMethod: string; + /** + * 指定允许的跨域请求头(多个Header用‘,’分隔) + */ + AllowedHeader?: string; + /** + * 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + */ + ExposeHeader?: string; +} +/** + * UpdateCORSRule - 更新跨域规则 + */ +export interface UpdateCORSRuleResponse { +} /** * UpdateUFileLifeCycle - 更新生命周期管理 */ @@ -818,12 +2270,66 @@ export interface UpdateUFileLifeCycleRequest { * 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动转换为低频存储类型;范围: [7,36500],0代表不启用 */ IADays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerDeleteDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerArchivalDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerIADays?: number; + /** + * Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,tag的最大数量为10 + */ + Tags?: string; + /** + * 文件的最小size + */ + MinSize?: number; + /** + * 文件的最大size + */ + MaxSize?: string; } /** * UpdateUFileLifeCycle - 更新生命周期管理 */ export interface UpdateUFileLifeCycleResponse { } +/** + * UpdateUFileSSLCert - 更新指定域名证书 + */ +export interface UpdateUFileSSLCertRequest { + /** + * 存储桶名称,全局唯一 + */ + BucketName: string; + /** + * 域名 + */ + Domain: string; + /** + * SSL证书名称 + */ + CertificateName: string; + /** + * 填写SSL证书文件内容(PEM编码)。 证书文件内容填写格式: 如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + */ + Certificate: string; + /** + * 填写SSL证书私钥内容(PEM编码)。 + */ + CertificateKey: string; +} +/** + * UpdateUFileSSLCert - 更新指定域名证书 + */ +export interface UpdateUFileSSLCertResponse { +} /** * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 */ @@ -858,3 +2364,73 @@ export interface UpdateUFileTokenRequest { */ export interface UpdateUFileTokenResponse { } +/** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + */ +export interface UpdateUdsRuleRequest { + /** + * 规则的唯一Id + */ + RuleId: string; + /** + * 规则名称 + */ + RuleName: string; + /** + * 源Bucket名字,全局唯一 + */ + SrcBucket: string; + /** + * 源bucket的token之一的tokenId + */ + SrcTokenId: string; + /** + * 目标Bucket名字,全局唯一 + */ + DstBucket: string; + /** + * 目标bucket的token之一的tokenId + */ + DstTokenId: string; + /** + * 解压后的目标目录 + */ + DstDirectory: string; + /** + * 是否以压缩文件的前缀为最后一层目录 + */ + KeepUS3Name: boolean; + /** + * 触发解压缩的前缀 + */ + Prefixes: string; + /** + * 操作的ops数组,"Ops.0":"unzip" + */ + Ops?: string[]; + /** + * 通知的事件数组 + */ + Events?: string[]; + /** + * 联系的用户组ID + */ + ContactGroupId?: string; + /** + * 通知的类型数组 + */ + NotificationTypes?: string[]; +} +/** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + */ +export interface UpdateUdsRuleResponse { + /** + * 返回规则的规则ID + */ + RuleId: string; + /** + * 该请求的消息成功或者失败的描述 + */ + Mesage?: string; +} diff --git a/lib/services/ufile/index.js b/lib/services/ufile/index.js index 62b283f..dd80621 100644 --- a/lib/services/ufile/index.js +++ b/lib/services/ufile/index.js @@ -12,6 +12,42 @@ class UFileClient extends client_1.default { constructor({ config, credential, }) { super({ config, credential }); } + /** + * AddCORSRule - 添加跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/add_cors_rule + */ + addCORSRule(request) { + const args = Object.assign({ Action: 'AddCORSRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * AddUFileSSLCert - 给指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/add_ufile_ssl_cert + */ + addUFileSSLCert(request) { + const args = Object.assign({ Action: 'AddUFileSSLCert' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BindBucketDomain - 绑定自定义域名 + * + * See also: https://docs.ucloud.cn/api/ufile-api/bind_bucket_domain + */ + bindBucketDomain(request) { + const args = Object.assign({ Action: 'BindBucketDomain' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * BuyUFilePkg - 购买流量包或存储包 + * + * See also: https://docs.ucloud.cn/api/ufile-api/buy_ufile_pkg + */ + buyUFilePkg(request) { + const args = Object.assign({ Action: 'BuyUFilePkg' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * CreateBucket - 创建Bucket * @@ -39,6 +75,15 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'CreateUFileToken' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * CreateUdsRule - 针对对象存储的文件,进行自动触发解压。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_uds_rule + */ + createUdsRule(request) { + const args = Object.assign({ Action: 'CreateUdsRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * DeleteBucket - 删除Bucket * @@ -48,6 +93,15 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'DeleteBucket' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * DeleteCORSRule - 删除跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_cors_rule + */ + deleteCORSRule(request) { + const args = Object.assign({ Action: 'DeleteCORSRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * DeleteUFileLifeCycle - 删除生命周期管理 * @@ -57,6 +111,24 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'DeleteUFileLifeCycle' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * DeleteUFilePkg - 删除资源包(退费) + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_pkg + */ + deleteUFilePkg(request) { + const args = Object.assign({ Action: 'DeleteUFilePkg' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DeleteUFileSSLCert - 删除指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_ssl_cert + */ + deleteUFileSSLCert(request) { + const args = Object.assign({ Action: 'DeleteUFileSSLCert' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * DeleteUFileToken - 删除令牌 * @@ -75,6 +147,24 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'DescribeBucket' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * DescribeCORSRule - 获取跨域规则信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_cors_rule + */ + describeCORSRule(request) { + const args = Object.assign({ Action: 'DescribeCORSRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUFileAvailablePkg - 查询可购买的资源包列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_available_pkg + */ + describeUFileAvailablePkg(request) { + const args = Object.assign({ Action: 'DescribeUFileAvailablePkg' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * DescribeUFileLifeCycle - 获取生命周期信息 * @@ -84,6 +174,42 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'DescribeUFileLifeCycle' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * DescribeUFilePkg - 查询已购买的资源包列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_pkg + */ + describeUFilePkg(request) { + const args = Object.assign({ Action: 'DescribeUFilePkg' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUFilePkgUsage - 查询资源包使用明细 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_pkg_usage + */ + describeUFilePkgUsage(request) { + const args = Object.assign({ Action: 'DescribeUFilePkgUsage' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUFileReferer - 对象存储防盗链列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_referer + */ + describeUFileReferer(request) { + const args = Object.assign({ Action: 'DescribeUFileReferer' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_ssl_cert + */ + describeUFileSSLCert(request) { + const args = Object.assign({ Action: 'DescribeUFileSSLCert' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * DescribeUFileToken - 获取令牌信息 * @@ -93,6 +219,51 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'DescribeUFileToken' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * DescribeUdsRule - 针对解压缩规则进行查询 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_uds_rule + */ + describeUdsRule(request) { + const args = Object.assign({ Action: 'DescribeUdsRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetBucketQuota - 获取bucket配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_bucket_quota + */ + getBucketQuota(request) { + const args = Object.assign({ Action: 'GetBucketQuota' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_bucket_static_page_rule + */ + getBucketStaticPageRule(request) { + const args = Object.assign({ Action: 'GetBucketStaticPageRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetProjectRegionQuota - 获取项目地域配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_project_region_quota + */ + getProjectRegionQuota(request) { + const args = Object.assign({ Action: 'GetProjectRegionQuota' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUFileDailyBill - 获取bucket每日账单 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_daily_bill + */ + getUFileDailyBill(request) { + const args = Object.assign({ Action: 'GetUFileDailyBill' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * GetUFileDailyReport - 查看日消费报表 * @@ -102,6 +273,24 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'GetUFileDailyReport' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * GetUFileMonthlyBill - 获取bucket月度账单 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_monthly_bill + */ + getUFileMonthlyBill(request) { + const args = Object.assign({ Action: 'GetUFileMonthlyBill' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * GetUFilePkgPrice - 获取对资源进行新购、续费、升级等操作的价格 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_pkg_price + */ + getUFilePkgPrice(request) { + const args = Object.assign({ Action: 'GetUFilePkgPrice' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * GetUFileQuota - 查看配额状态 * @@ -138,6 +327,33 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'GetUFileReport' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * RenewUFilePkg - 资源包续费 + * + * See also: https://docs.ucloud.cn/api/ufile-api/renew_ufile_pkg + */ + renewUFilePkg(request) { + const args = Object.assign({ Action: 'RenewUFilePkg' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetBucketQuota - 设置bucket配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_bucket_quota + */ + setBucketQuota(request) { + const args = Object.assign({ Action: 'SetBucketQuota' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * SetProjectRegionQuota - 设置项目地域配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_project_region_quota + */ + setProjectRegionQuota(request) { + const args = Object.assign({ Action: 'SetProjectRegionQuota' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * SetUFileReferer - 设置对象存储防盗链 * @@ -156,6 +372,24 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'UpdateBucket' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket_static_page_rule + */ + updateBucketStaticPageRule(request) { + const args = Object.assign({ Action: 'UpdateBucketStaticPageRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } + /** + * UpdateCORSRule - 更新跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_cors_rule + */ + updateCORSRule(request) { + const args = Object.assign({ Action: 'UpdateCORSRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * UpdateUFileLifeCycle - 更新生命周期管理 * @@ -165,6 +399,15 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'UpdateUFileLifeCycle' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * UpdateUFileSSLCert - 更新指定域名证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_ssl_cert + */ + updateUFileSSLCert(request) { + const args = Object.assign({ Action: 'UpdateUFileSSLCert' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } /** * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 * @@ -174,5 +417,14 @@ class UFileClient extends client_1.default { const args = Object.assign({ Action: 'UpdateUFileToken' }, (request || {})); return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); } + /** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_uds_rule + */ + updateUdsRule(request) { + const args = Object.assign({ Action: 'UpdateUdsRule' }, (request || {})); + return this.invoke(new request_1.default(args)).then((resp) => resp.toObject()); + } } exports.default = UFileClient; diff --git a/lib/services/ukms/index.d.ts b/lib/services/ukms/index.d.ts index 372a202..fc1d478 100644 --- a/lib/services/ukms/index.d.ts +++ b/lib/services/ukms/index.d.ts @@ -307,7 +307,7 @@ export interface DecryptRequest { */ KeyId?: string; /** - * 加密上下文,JSON Object。 + * 加密上下文,JSON Object。该参数内容会记录在日志中,请勿传入密码、密钥、令牌等敏感信息。 */ EncryptionContext?: string; /** @@ -518,7 +518,7 @@ export interface EncryptRequest { */ Plaintext: string; /** - * 加密上下文,JSON Object。 + * 加密上下文,JSON Object。该参数内容会记录在日志中,请勿传入密码、密钥、令牌等敏感信息。 */ EncryptionContext?: string; /** diff --git a/package-lock.json b/package-lock.json index 4c26cd5..bea4dbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@ucloud-sdks/ucloud-sdk-js", - "version": "0.2.23", + "version": "0.2.24", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2f9c2a0..246b0fe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@ucloud-sdks/ucloud-sdk-js", "description": "ucloud-sdk-js", - "version": "0.2.24", + "version": "0.2.25", "author": "oas@ucloud.cn", "license": "MIT", "private": false, diff --git a/src/services/ufile/index.ts b/src/services/ufile/index.ts index 3a92d54..25f66cb 100644 --- a/src/services/ufile/index.ts +++ b/src/services/ufile/index.ts @@ -17,6 +17,58 @@ export default class UFileClient extends Client { super({ config, credential }); } + /** + * AddCORSRule - 添加跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/add_cors_rule + */ + addCORSRule(request?: AddCORSRuleRequest): Promise { + const args = { Action: 'AddCORSRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddCORSRuleResponse + ); + } + + /** + * AddUFileSSLCert - 给指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/add_ufile_ssl_cert + */ + addUFileSSLCert( + request?: AddUFileSSLCertRequest + ): Promise { + const args = { Action: 'AddUFileSSLCert', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as AddUFileSSLCertResponse + ); + } + + /** + * BindBucketDomain - 绑定自定义域名 + * + * See also: https://docs.ucloud.cn/api/ufile-api/bind_bucket_domain + */ + bindBucketDomain( + request?: BindBucketDomainRequest + ): Promise { + const args = { Action: 'BindBucketDomain', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BindBucketDomainResponse + ); + } + + /** + * BuyUFilePkg - 购买流量包或存储包 + * + * See also: https://docs.ucloud.cn/api/ufile-api/buy_ufile_pkg + */ + buyUFilePkg(request?: BuyUFilePkgRequest): Promise { + const args = { Action: 'BuyUFilePkg', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as BuyUFilePkgResponse + ); + } + /** * CreateBucket - 创建Bucket * @@ -57,6 +109,20 @@ export default class UFileClient extends Client { ); } + /** + * CreateUdsRule - 针对对象存储的文件,进行自动触发解压。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/create_uds_rule + */ + createUdsRule( + request?: CreateUdsRuleRequest + ): Promise { + const args = { Action: 'CreateUdsRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as CreateUdsRuleResponse + ); + } + /** * DeleteBucket - 删除Bucket * @@ -69,6 +135,20 @@ export default class UFileClient extends Client { ); } + /** + * DeleteCORSRule - 删除跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_cors_rule + */ + deleteCORSRule( + request?: DeleteCORSRuleRequest + ): Promise { + const args = { Action: 'DeleteCORSRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteCORSRuleResponse + ); + } + /** * DeleteUFileLifeCycle - 删除生命周期管理 * @@ -83,6 +163,34 @@ export default class UFileClient extends Client { ); } + /** + * DeleteUFilePkg - 删除资源包(退费) + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_pkg + */ + deleteUFilePkg( + request?: DeleteUFilePkgRequest + ): Promise { + const args = { Action: 'DeleteUFilePkg', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUFilePkgResponse + ); + } + + /** + * DeleteUFileSSLCert - 删除指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_ssl_cert + */ + deleteUFileSSLCert( + request?: DeleteUFileSSLCertRequest + ): Promise { + const args = { Action: 'DeleteUFileSSLCert', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DeleteUFileSSLCertResponse + ); + } + /** * DeleteUFileToken - 删除令牌 * @@ -111,6 +219,34 @@ export default class UFileClient extends Client { ); } + /** + * DescribeCORSRule - 获取跨域规则信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_cors_rule + */ + describeCORSRule( + request?: DescribeCORSRuleRequest + ): Promise { + const args = { Action: 'DescribeCORSRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeCORSRuleResponse + ); + } + + /** + * DescribeUFileAvailablePkg - 查询可购买的资源包列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_available_pkg + */ + describeUFileAvailablePkg( + request?: DescribeUFileAvailablePkgRequest + ): Promise { + const args = { Action: 'DescribeUFileAvailablePkg', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUFileAvailablePkgResponse + ); + } + /** * DescribeUFileLifeCycle - 获取生命周期信息 * @@ -125,6 +261,62 @@ export default class UFileClient extends Client { ); } + /** + * DescribeUFilePkg - 查询已购买的资源包列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_pkg + */ + describeUFilePkg( + request?: DescribeUFilePkgRequest + ): Promise { + const args = { Action: 'DescribeUFilePkg', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUFilePkgResponse + ); + } + + /** + * DescribeUFilePkgUsage - 查询资源包使用明细 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_pkg_usage + */ + describeUFilePkgUsage( + request?: DescribeUFilePkgUsageRequest + ): Promise { + const args = { Action: 'DescribeUFilePkgUsage', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUFilePkgUsageResponse + ); + } + + /** + * DescribeUFileReferer - 对象存储防盗链列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_referer + */ + describeUFileReferer( + request?: DescribeUFileRefererRequest + ): Promise { + const args = { Action: 'DescribeUFileReferer', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUFileRefererResponse + ); + } + + /** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_ssl_cert + */ + describeUFileSSLCert( + request?: DescribeUFileSSLCertRequest + ): Promise { + const args = { Action: 'DescribeUFileSSLCert', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUFileSSLCertResponse + ); + } + /** * DescribeUFileToken - 获取令牌信息 * @@ -139,6 +331,76 @@ export default class UFileClient extends Client { ); } + /** + * DescribeUdsRule - 针对解压缩规则进行查询 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_uds_rule + */ + describeUdsRule( + request?: DescribeUdsRuleRequest + ): Promise { + const args = { Action: 'DescribeUdsRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as DescribeUdsRuleResponse + ); + } + + /** + * GetBucketQuota - 获取bucket配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_bucket_quota + */ + getBucketQuota( + request?: GetBucketQuotaRequest + ): Promise { + const args = { Action: 'GetBucketQuota', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetBucketQuotaResponse + ); + } + + /** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_bucket_static_page_rule + */ + getBucketStaticPageRule( + request?: GetBucketStaticPageRuleRequest + ): Promise { + const args = { Action: 'GetBucketStaticPageRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetBucketStaticPageRuleResponse + ); + } + + /** + * GetProjectRegionQuota - 获取项目地域配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_project_region_quota + */ + getProjectRegionQuota( + request?: GetProjectRegionQuotaRequest + ): Promise { + const args = { Action: 'GetProjectRegionQuota', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetProjectRegionQuotaResponse + ); + } + + /** + * GetUFileDailyBill - 获取bucket每日账单 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_daily_bill + */ + getUFileDailyBill( + request?: GetUFileDailyBillRequest + ): Promise { + const args = { Action: 'GetUFileDailyBill', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUFileDailyBillResponse + ); + } + /** * GetUFileDailyReport - 查看日消费报表 * @@ -153,6 +415,34 @@ export default class UFileClient extends Client { ); } + /** + * GetUFileMonthlyBill - 获取bucket月度账单 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_monthly_bill + */ + getUFileMonthlyBill( + request?: GetUFileMonthlyBillRequest + ): Promise { + const args = { Action: 'GetUFileMonthlyBill', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUFileMonthlyBillResponse + ); + } + + /** + * GetUFilePkgPrice - 获取对资源进行新购、续费、升级等操作的价格 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_pkg_price + */ + getUFilePkgPrice( + request?: GetUFilePkgPriceRequest + ): Promise { + const args = { Action: 'GetUFilePkgPrice', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as GetUFilePkgPriceResponse + ); + } + /** * GetUFileQuota - 查看配额状态 * @@ -209,6 +499,48 @@ export default class UFileClient extends Client { ); } + /** + * RenewUFilePkg - 资源包续费 + * + * See also: https://docs.ucloud.cn/api/ufile-api/renew_ufile_pkg + */ + renewUFilePkg( + request?: RenewUFilePkgRequest + ): Promise { + const args = { Action: 'RenewUFilePkg', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as RenewUFilePkgResponse + ); + } + + /** + * SetBucketQuota - 设置bucket配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_bucket_quota + */ + setBucketQuota( + request?: SetBucketQuotaRequest + ): Promise { + const args = { Action: 'SetBucketQuota', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetBucketQuotaResponse + ); + } + + /** + * SetProjectRegionQuota - 设置项目地域配额 + * + * See also: https://docs.ucloud.cn/api/ufile-api/set_project_region_quota + */ + setProjectRegionQuota( + request?: SetProjectRegionQuotaRequest + ): Promise { + const args = { Action: 'SetProjectRegionQuota', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as SetProjectRegionQuotaResponse + ); + } + /** * SetUFileReferer - 设置对象存储防盗链 * @@ -235,6 +567,34 @@ export default class UFileClient extends Client { ); } + /** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket_static_page_rule + */ + updateBucketStaticPageRule( + request?: UpdateBucketStaticPageRuleRequest + ): Promise { + const args = { Action: 'UpdateBucketStaticPageRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateBucketStaticPageRuleResponse + ); + } + + /** + * UpdateCORSRule - 更新跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_cors_rule + */ + updateCORSRule( + request?: UpdateCORSRuleRequest + ): Promise { + const args = { Action: 'UpdateCORSRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateCORSRuleResponse + ); + } + /** * UpdateUFileLifeCycle - 更新生命周期管理 * @@ -249,6 +609,20 @@ export default class UFileClient extends Client { ); } + /** + * UpdateUFileSSLCert - 更新指定域名证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_ssl_cert + */ + updateUFileSSLCert( + request?: UpdateUFileSSLCertRequest + ): Promise { + const args = { Action: 'UpdateUFileSSLCert', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUFileSSLCertResponse + ); + } + /** * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 * @@ -262,96 +636,281 @@ export default class UFileClient extends Client { (resp) => resp.toObject() as UpdateUFileTokenResponse ); } + + /** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_uds_rule + */ + updateUdsRule( + request?: UpdateUdsRuleRequest + ): Promise { + const args = { Action: 'UpdateUdsRule', ...(request || {}) }; + return this.invoke(new Request(args)).then( + (resp) => resp.toObject() as UpdateUdsRuleResponse + ); + } } /** - * CreateBucket - 创建Bucket + * AddCORSRule - 添加跨域规则 */ -export interface CreateBucketRequest { +export interface AddCORSRuleRequest { /** - * 待创建Bucket的名称,具有全局唯一性 + * Bucket名称 */ BucketName: string; /** - * Bucket访问类型,public或private; 默认为private + * 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) */ - Type?: string; + AllowedOrigin: string; + /** + * 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + */ + AllowedMethod: string; + /** + * 指定允许的跨域请求头(多个Header用‘,’分隔) + */ + AllowedHeader?: string; + /** + * 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + */ + ExposeHeader?: string; } /** - * CreateBucket - 创建Bucket + * AddCORSRule - 添加跨域规则 */ -export interface CreateBucketResponse { - /** - * 已创建Bucket的名称 - */ - BucketName?: string; +export interface AddCORSRuleResponse { /** - * 已创建Bucket的ID + * 增加一条跨域规则的cors_id */ - BucketId?: string; + CORSId: string; } /** - * CreateUFileLifeCycle - 创建生命周期管理 + * AddUFileSSLCert - 给指定域名添加证书 */ -export interface CreateUFileLifeCycleRequest { +export interface AddUFileSSLCertRequest { /** - * 生命周期名称 + * 存储桶名称,全局唯一 */ - LifeCycleName: string; + BucketName: string; /** - * 生命周期所适用的前缀;*为整个存储空间文件;一条规则只支持一个文件前缀; + * 域名 */ - Prefix: string; + Domain: string; /** - * Enabled -- 启用,Disabled -- 不启用 + * SSL证书名称 */ - Status: string; + CertificateName: string; /** - * 存储空间名称 + * 填写SSL证书文件内容(PEM编码)。证书文件内容填写格式:如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 */ - BucketName: string; + Certificate?: string; /** - * 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;参数范围:[7,36500],0代表不启用 + * 填写SSL证书私钥内容(PEM编码)。私钥内容填写格式 RSA */ - Days?: number; + CertificateKey?: string; /** - * 指定一个过期天数N,文件会在其最近更新时间点的N天后,自动变为归档存储类型;参数范围:[7,36500],0代表不启用 + * ussl证书的资源ID */ - ArchivalDays?: number; + USSLId?: string; +} + +/** + * AddUFileSSLCert - 给指定域名添加证书 + */ +export interface AddUFileSSLCertResponse {} + +/** + * BindBucketDomain - 绑定自定义域名 + */ +export interface BindBucketDomainRequest { /** - * 指定一个过期天数N,文件会在其最近更新时间点的N天后,自动变为低频存储类型;参数范围:[7,36500],0代表不启用 + * 自定义域名对应的bucket名称 */ - IADays?: number; + BucketName: string; + /** + * 自定义域名 + */ + Domain: string; } /** - * CreateUFileLifeCycle - 创建生命周期管理 + * BindBucketDomain - 绑定自定义域名 */ -export interface CreateUFileLifeCycleResponse { +export interface BindBucketDomainResponse { /** - * 生命周期Id + * 自定义域名对应的bucket名称 */ - LifeCycleId: string; + BucketName: string; + /** + * 自定义域名对应的Bucket的Id + */ + BucketId: string; } /** - * CreateUFileToken - 创建US3令牌 + * BuyUFilePkg - 购买流量包或存储包 */ -export interface CreateUFileTokenRequest { +export interface BuyUFilePkgRequest { /** - * 令牌名称 + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) */ - TokenName: string; + Zone?: string; /** - * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + * 资源包名称 */ - AllowedOps?: string[]; + PkgName: string; /** - * 令牌允许操作的key前缀,默认*表示全部 + * 0: 标准存储包,1: 忙时流量包,2: 闲时流量包 */ - AllowedPrefixes?: string[]; + PkgType: number; + /** + * 购买数量 + */ + Amount: number; + /** + * 数量单位,如 GB、TB 等 + */ + AmountUnit: string; + /** + * 购买时长 + */ + Duration: number; + /** + * 时长单位,如 Month、Year 等 + */ + DurationUnit: string; +} + +/** + * BuyUFilePkg - 购买流量包或存储包 + */ +export interface BuyUFilePkgResponse { + /** + * 购买成功返回资源包Id + */ + ResourceId: string; +} + +/** + * CreateBucket - 创建Bucket + */ +export interface CreateBucketRequest { + /** + * 待创建Bucket的名称,具有全局唯一性 + */ + BucketName: string; + /** + * Bucket访问类型,public或private; 默认为private + */ + Type?: string; + /** + * Bucket所属业务组,默认为default + */ + Tag?: string; +} + +/** + * CreateBucket - 创建Bucket + */ +export interface CreateBucketResponse { + /** + * 已创建Bucket的名称 + */ + BucketName?: string; + /** + * 已创建Bucket的ID + */ + BucketId?: string; +} + +/** + * CreateUFileLifeCycle - 创建生命周期管理 + */ +export interface CreateUFileLifeCycleRequest { + /** + * 生命周期名称 + */ + LifeCycleName: string; + /** + * 生命周期所适用的前缀;*为整个存储空间文件;一条规则只支持一个文件前缀; + */ + Prefix: string; + /** + * Enabled -- 启用,Disabled -- 不启用 + */ + Status: string; + /** + * 存储空间名称 + */ + BucketName: string; + /** + * 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;参数范围:[7,36500],0代表不启用 + */ + Days?: number; + /** + * 指定一个过期天数N,文件会在其最近更新时间点的N天后,自动变为归档存储类型;参数范围:[7,36500],0代表不启用 + */ + ArchivalDays?: number; + /** + * 指定一个过期天数N,文件会在其最近更新时间点的N天后,自动变为低频存储类型;参数范围:[7,36500],0代表不启用 + */ + IADays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerDeleteDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerArchivalDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerIADays?: number; + /** + * Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,tag的最大数量为10 + */ + Tags?: string; + /** + * 文件的最小size + */ + MinSize?: number; + /** + * 文件的最大size + */ + MaxSize?: number; +} + +/** + * CreateUFileLifeCycle - 创建生命周期管理 + */ +export interface CreateUFileLifeCycleResponse { + /** + * 生命周期Id + */ + LifeCycleId: string; +} + +/** + * CreateUFileToken - 创建US3令牌 + */ +export interface CreateUFileTokenRequest { + /** + * 令牌名称 + */ + TokenName: string; + /** + * 令牌允许执行的操作[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限 , TOKEN_ALLOW_WRITE 上传权限 , TOKEN_ALLOW_DELETE 删除权限 , TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限, TOKEN_DENY_UPDATE 禁止覆盖权限]。默认TOKEN_ALLOW_NONE + */ + AllowedOps?: string[]; + /** + * 令牌允许操作的key前缀,默认*表示全部 + */ + AllowedPrefixes?: string[]; /** * 令牌允许操作的bucket,默认*表示全部 */ @@ -360,6 +919,14 @@ export interface CreateUFileTokenRequest { * Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 */ ExpireTime?: number; + /** + * 令牌黑名单,支持ipv4,ipv6格式。 + */ + BlackIPList?: string[]; + /** + * 令牌白名单,支持ipv4,ipv6格式。 + */ + WhiteIPList?: string[]; } /** @@ -367,9 +934,130 @@ export interface CreateUFileTokenRequest { */ export interface CreateUFileTokenResponse { /** - * 创建令牌的token_id + * 令牌唯一ID */ TokenId?: string; + /** + * 创建令牌的详细信息 + */ + UFileTokenSet?: { + /** + * 所属地区 + */ + Region: string; + /** + * 令牌ID + */ + TokenId: string; + /** + * 令牌名称 + */ + TokenName: string; + /** + * 令牌公钥 + */ + PublicKey: string; + /** + * 令牌私钥 + */ + PrivateKey: string; + /** + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] + */ + AllowedOps: string[]; + /** + * 令牌允许操作的key前缀 + */ + AllowedPrefixes: string[]; + /** + * 令牌允许操作的bucket + */ + AllowedBuckets: string[]; + /** + * 令牌的超时时间点 + */ + ExpireTime: number; + /** + * 创建时间 + */ + CreateTime: number; + /** + * 修改时间 + */ + ModifyTime: number; + /** + * 令牌黑名单 + */ + BlackIPList?: string[]; + /** + * 令牌白名单 + */ + WhiteIPList?: string[]; + }; +} + +/** + * CreateUdsRule - 针对对象存储的文件,进行自动触发解压。 + */ +export interface CreateUdsRuleRequest { + /** + * 规则名称 + */ + RuleName: string; + /** + * 源Bucket名字,全局唯一 + */ + SrcBucket: string; + /** + * 源bucket的token之一的tokenId + */ + SrcTokenId: string; + /** + * 目标Bucket名字,全局唯一 + */ + DstBucket: string; + /** + * 目标bucket的token之一的tokenId + */ + DstTokenId: string; + /** + * 解压后的目标目录 + */ + DstDirectory: string; + /** + * 是否以压缩文件的前缀为最后一层目录 + */ + KeepUS3Name: boolean; + /** + * 解压缩触发的前缀 + */ + Prefixes: string; + /** + * 操作的ops数组,"Ops.0":"unzip" + */ + Ops: string[]; + /** + * 通知的事件数组 + */ + Events?: string[]; + /** + * 联系的用户组ID + */ + ContactGroupId?: string; + /** + * 通知的类型数组 + */ + NotificationTypes?: string[]; +} + +/** + * CreateUdsRule - 针对对象存储的文件,进行自动触发解压。 + */ +export interface CreateUdsRuleResponse { + /** + * 创建规则的规则ID + */ + RuleId: string; } /** @@ -396,6 +1084,25 @@ export interface DeleteBucketResponse { BucketId?: string; } +/** + * DeleteCORSRule - 删除跨域规则 + */ +export interface DeleteCORSRuleRequest { + /** + * Bucket名称 + */ + BucketName: string; + /** + * 跨域规则ID + */ + CORSId: string; +} + +/** + * DeleteCORSRule - 删除跨域规则 + */ +export interface DeleteCORSRuleResponse {} + /** * DeleteUFileLifeCycle - 删除生命周期管理 */ @@ -415,6 +1122,44 @@ export interface DeleteUFileLifeCycleRequest { */ export interface DeleteUFileLifeCycleResponse {} +/** + * DeleteUFilePkg - 删除资源包(退费) + */ +export interface DeleteUFilePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 资源ID + */ + ResourceId: string; +} + +/** + * DeleteUFilePkg - 删除资源包(退费) + */ +export interface DeleteUFilePkgResponse {} + +/** + * DeleteUFileSSLCert - 删除指定域名添加证书 + */ +export interface DeleteUFileSSLCertRequest { + /** + * 存储桶名称,全局唯一 + */ + BucketName: string; + /** + * 域名 + */ + Domain: string; +} + +/** + * DeleteUFileSSLCert - 删除指定域名添加证书 + */ +export interface DeleteUFileSSLCertResponse {} + /** * DeleteUFileToken - 删除令牌 */ @@ -460,6 +1205,10 @@ export interface DescribeBucketResponse { * Bucket所属地域 */ Region?: string; + /** + * 默认存储类型 + */ + StorageClass?: string; /** * Bucket名称 */ @@ -521,39 +1270,176 @@ export interface DescribeBucketResponse { } /** - * DescribeUFileLifeCycle - 获取生命周期信息 + * DescribeCORSRule - 获取跨域规则信息 */ -export interface DescribeUFileLifeCycleRequest { +export interface DescribeCORSRuleRequest { /** - * 存储空间名称 + * Bucket名称 */ BucketName: string; /** - * 生命周期Id;不传递此参数拉取存储空间下面的所有生命周期信息 + * 跨域规则ID,不指定则返回所有跨域规则信息 */ - LifeCycleId?: string; + CORSId?: string; } /** - * DescribeUFileLifeCycle - 获取生命周期信息 + * DescribeCORSRule - 获取跨域规则信息 */ -export interface DescribeUFileLifeCycleResponse { +export interface DescribeCORSRuleResponse { /** - * 生命周期信息 + * 跨域规则信息集合 */ - DateSet: { + DataSet: { /** - * 生命周期Id + * 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) */ - LifeCycleId?: string; + AllowedOrigin: string; /** - * 生命周期名称 + * 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) */ - LifeCycleName?: string; + AllowedMethod: string; /** - * 生命周期所适用的前缀;*为整个存储空间文件; + * 跨域规则id */ - Prefix?: string; + CORSId: string; + /** + * 跨域规则创建时间 + */ + CreateTime: number; + /** + * 跨域规则最新修改时间 + */ + ModifyTime: number; + /** + * 指定允许的跨域请求头(多个Header用‘,’分隔) + */ + AllowedHeader: string; + /** + * 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + */ + ExposeHeader: string; + }[]; +} + +/** + * DescribeUFileAvailablePkg - 查询可购买的资源包列表 + */ +export interface DescribeUFileAvailablePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; +} + +/** + * DescribeUFileAvailablePkg - 查询可购买的资源包列表 + */ +export interface DescribeUFileAvailablePkgResponse { + /** + * 可购买的资源包规格 + */ + PkgList: { + /** + * 资源类型ID + */ + Type?: number; + /** + * 资源类型名称 + */ + Name?: string; + /** + * 支持购买的数量规格 + */ + Specs?: { + /** + * 仅针对当前规格生效的durations + */ + Durations: { + /** + * 折扣 + */ + Discount: number; + /** + * 购买时长 + */ + Duration?: number; + /** + * 时长单位,如: Month、Year + */ + Unit?: string; + }[]; + /** + * 购买数量 + */ + Amount?: number; + /** + * 数量的单位,如:GB,TB + */ + Unit?: string; + }[]; + /** + * 公共支持购买的时长,当一个Spec配了独立的Durations时,就按独立配置Durations生效;否者按CommonDurations生效 + */ + CommonDurations?: { + /** + * 折扣 + */ + Discount: number; + /** + * 购买时长 + */ + Duration?: number; + /** + * 时长单位,如: Month、Year + */ + Unit?: string; + }[]; + }[]; +} + +/** + * DescribeUFileLifeCycle - 获取生命周期信息 + */ +export interface DescribeUFileLifeCycleRequest { + /** + * 存储空间名称 + */ + BucketName: string; + /** + * 生命周期Id;不传递此参数拉取存储空间下面的所有生命周期信息 + */ + LifeCycleId?: string; +} + +/** + * DescribeUFileLifeCycle - 获取生命周期信息 + */ +export interface DescribeUFileLifeCycleResponse { + /** + * 生命周期信息 + */ + DataSet: { + /** + * 文件的最小size + */ + MinSize: string; + /** + * 文件的最大size + */ + MaxSize: string; + /** + * 生命周期Id + */ + LifeCycleId?: string; + /** + * 生命周期名称 + */ + LifeCycleName?: string; + /** + * 生命周期所适用的前缀;*为整个存储空间文件; + */ + Prefix?: string; /** * 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动删除,0代表不启用; */ @@ -577,6 +1463,185 @@ export interface DescribeUFileLifeCycleResponse { }[]; } +/** + * DescribeUFilePkg - 查询已购买的资源包列表 + */ +export interface DescribeUFilePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 查询指定的资源包,当指定ResourceId查询时,Region是必填的 + */ + ResourceId?: string; + /** + * 默认0表示查询全部已购买的资源包,1表示查询过期的,-1表示查询非过期的 + */ + Expired?: number; +} + +/** + * DescribeUFilePkg - 查询已购买的资源包列表 + */ +export interface DescribeUFilePkgResponse { + /** + * 已购买的资源包 + */ + Pkgs: { + /** + * 资源包地域 + */ + Region: string; + /** + * 资源包ID + */ + ResourceId?: string; + /** + * 资源包名称 + */ + PkgName?: string; + /** + * 资源包类型ID + */ + PkgType?: number; + /** + * 资源包容量 + */ + Amount?: number; + /** + * 资源包剩余容量(仅支持流量包) + */ + RemainAmount?: string; + /** + * 资源包创建时间 + */ + CreateTime?: number; + /** + * 资源包失效时间 + */ + ExpiredTime?: number; + }[]; +} + +/** + * DescribeUFilePkgUsage - 查询资源包使用明细 + */ +export interface DescribeUFilePkgUsageRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 资源包ID + */ + ResourceId: string; + /** + * 开始时间,如 2023-09-01 + */ + StartDate: string; + /** + * 结束时间,如 2023-09-01 + */ + EndDate: string; +} + +/** + * DescribeUFilePkgUsage - 查询资源包使用明细 + */ +export interface DescribeUFilePkgUsageResponse { + /** + * 按天返回的使用明细 + */ + Usage?: { + /** + * 日期 + */ + Date?: string; + /** + * 使用量,单位为B + */ + Cost?: string; + }[]; +} + +/** + * DescribeUFileReferer - 对象存储防盗链列表 + */ +export interface DescribeUFileRefererRequest { + /** + * 存储空间名称 + */ + BucketName: string; +} + +/** + * DescribeUFileReferer - 对象存储防盗链列表 + */ +export interface DescribeUFileRefererResponse { + /** + * 防盗链Referer类型,支持两种类型,1黑名单,2白名单;未开启referer时不返回此参数 + */ + RefererType: number; + /** + * 防盗链Referer规则列表;未开启referer时不返回此参数 + */ + RefererList: string[]; + /** + * ReferType为白名单时,NullRefer为false代表不允许NULL refer访问,为true代表允许Null refer访问; 未开启referer时不返回此参数 + */ + NullRefer: boolean; + /** + * 防盗链功能是否开启,"on"表示开启,"off"表示关闭 + */ + RefererStatus?: string; + /** + * 黑名单列表 + */ + BlackList?: string[]; + /** + * 白名单列表 + */ + WhiteList?: string[]; +} + +/** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + */ +export interface DescribeUFileSSLCertRequest { + /** + * 存储桶名称,全局唯一 + */ + BucketName: string; +} + +/** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + */ +export interface DescribeUFileSSLCertResponse { + /** + * 证书列表 + */ + DataSet?: { + /** + * 域名 + */ + Domain?: string; + /** + * SSL证书内容,和域名对应 + */ + Certificate?: string; + /** + * SSL证书对应的私钥 + */ + CertificateKey?: string; + /** + * SSL证书名称 + */ + CertificateName?: string; + }[]; +} + /** * DescribeUFileToken - 获取令牌信息 */ @@ -603,6 +1668,10 @@ export interface DescribeUFileTokenResponse { * 令牌描述信息 */ DataSet: { + /** + * 所属地区 + */ + Region: string; /** * 令牌ID */ @@ -620,7 +1689,7 @@ export interface DescribeUFileTokenResponse { */ PrivateKey: string; /** - * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] */ AllowedOps: string[]; /** @@ -644,115 +1713,594 @@ export interface DescribeUFileTokenResponse { */ ModifyTime: number; /** - * 所属地区 + * 令牌黑名单 */ - Region: string; + BlackIPList?: string[]; + /** + * 令牌白名单 + */ + WhiteIPList?: string[]; + }[]; +} + +/** + * DescribeUdsRule - 针对解压缩规则进行查询 + */ +export interface DescribeUdsRuleRequest { + /** + * 源BucketName + */ + BucketName: string; + /** + * 规则ID,不设置时,查询改bucket的所有规则 + */ + RuleId?: string; +} + +/** + * DescribeUdsRule - 针对解压缩规则进行查询 + */ +export interface DescribeUdsRuleResponse { + /** + * 此次删除的规则的ID + */ + TotalCount: number; + /** + * 规则数组 + */ + DataSet?: string[]; +} + +/** + * GetBucketQuota - 获取bucket配额 + */ +export interface GetBucketQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * bucket名称 + */ + BucketName: string; +} + +/** + * GetBucketQuota - 获取bucket配额 + */ +export interface GetBucketQuotaResponse { + /** + * bucket配额 + */ + QuotaLimit: number; + /** + * bucket名称 + */ + BucketName: string; +} + +/** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + */ +export interface GetBucketStaticPageRuleRequest { + /** + * 存储桶名称 + */ + Bucket: string; +} + +/** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + */ +export interface GetBucketStaticPageRuleResponse { + /** + * 规则内容 + */ + Rule: { + /** + * 启用状态 + */ + Status?: string; + /** + * 默认网页 + */ + DefaultIndex?: string; + /** + * 子目录重定向功能的启用状态 + */ + SubDirRedirect?: string; + /** + * 404时的处理规则 + */ + RuleFor404?: string; + /** + * 默认404页面在存储桶的路径 + */ + DefaultPage404?: string; + }; +} + +/** + * GetProjectRegionQuota - 获取项目地域配额 + */ +export interface GetProjectRegionQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; +} + +/** + * GetProjectRegionQuota - 获取项目地域配额 + */ +export interface GetProjectRegionQuotaResponse { + /** + * 地域 + */ + Region: string; + /** + * 配额类型 + */ + QuotaType: string; + /** + * 配额数目 + */ + QuotaLimit: number; +} + +/** + * GetUFileDailyBill - 获取bucket每日账单 + */ +export interface GetUFileDailyBillRequest { + /** + * 查询开始时间;unix时间戳,单位s + */ + StartTime: number; + /** + * 查询结束时间;unix时间戳,单位s + */ + EndTime: number; + /** + * 空间名称。此字段不为空,返回此Bucket日账单,否则,返回这个项目的日账单 + */ + BucketName?: string; +} + +/** + * GetUFileDailyBill - 获取bucket每日账单 + */ +export interface GetUFileDailyBillResponse { + /** + * 消费情况 + */ + DataSet: { + /** + * bucket账单 + */ + BucketBills?: { + /** + * bucket对应的资源系统标签 + */ + Labels?: { + /** + * 标签对应key + */ + Key?: string; + /** + * 标签对应value + */ + Value?: string; + }[]; + /** + * 下载低频存储次数费用;分 + */ + GetCountIaBill?: number; + /** + * 下载标准存储次数费用;分 + */ + GetCountBill?: number; + /** + * 上传归档存储次数费用;分 + */ + PutCountAcBill?: number; + /** + * 上传低频存储次数费用;分 + */ + PutCountIaBill?: number; + /** + * 上传标准存储次数费用;分 + */ + PutCountBill?: number; + /** + * 对象标签费用: 分 + */ + ObjectTagCountBill?: number; + /** + * 标准-存储总容量费用;分 + */ + StorageBill?: number; + /** + * 低频-存储总容量费用;分 + */ + IaStorageBill?: number; + /** + * 归档-存储总容量费用;分 + */ + AcStorageBill?: number; + /** + * 低频-数据取回量,即低频文件的数据取回量费用;分 + */ + IaGetSizeBill?: number; + /** + * 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量费用; 分 + */ + AcRestoreBill?: number; + /** + * 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量费用; 分 + */ + AcExpeditedRetrievalBill?: number; + /** + * 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + */ + IaShortStorageBill?: number; + /** + * 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + */ + AcShortStorageBill?: number; + /** + * 基础图片处理量费用;分 + */ + ImageHandleFlowBill?: number; + /** + * 图片高级压缩次数费用;分 + */ + ImageCompressCountBill?: number; + /** + * 忙时流量费用;分;海外无此字段 + */ + BusyFlowBill?: number; + /** + * 闲时流量费用;分;海外无此字段 + */ + IdleFlowBill?: number; + /** + * cdn回源流量费用;分 + */ + CdnFlowBill?: number; + /** + * 下载流量费用:分;国内无此字段 + */ + FlowBill?: number; + /** + * 配额消费时间,unix时间戳;单位s,精确到日期 + */ + Date?: number; + /** + * 下载归档存储次数费用;分 + */ + GetCountAcBill?: number; + /** + * 总费用;分 + */ + TotalBill?: number; + }[]; + }[]; +} + +/** + * GetUFileDailyReport - 查看日消费报表 + */ +export interface GetUFileDailyReportRequest { + /** + * 查询开始时间;unix时间戳,单位s + */ + StartTime: number; + /** + * 查询结束时间;unix时间戳,单位s + */ + EndTime: number; + /** + * 空间名称。此字段不为空,返回此Bucket日使用量;否则,返回这个项目的日使用量 + */ + BucketName?: string; +} + +/** + * GetUFileDailyReport - 查看日消费报表 + */ +export interface GetUFileDailyReportResponse { + /** + * 消费情况 + */ + DataSet: { + /** + * 总消费情况 + */ + Total?: { + /** + * 下载流量:单位GB;国内无此字段 + */ + Flow?: number; + /** + * 闲时流量;单位GB;海外无此字段 + */ + IdleFlow?: number; + /** + * 忙时流量;单位GB;海外无此字段 + */ + BusyFlow?: number; + /** + * cdn回源流量;单位GB + */ + CdnFlow?: number; + /** + * API请求次数(万次) + */ + ApiTimes?: number; + }[]; + /** + * 日消费情况 + */ + Daily?: { + /** + * 标准-存储总容量;单位GB + */ + Storage?: number; + /** + * 低频-存储总容量;单位GB + */ + IaStorage?: number; + /** + * 归档-存储总容量;单位GB + */ + AcStorage?: number; + /** + * 低频-数据取回量,即低频文件的数据取回量;单位GB + */ + IaGetSize?: number; + /** + * 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量;单位GB + */ + AcRestore?: number; + /** + * 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量;单位GB + */ + AcExpeditedRetrieval?: number; + /** + * 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + */ + IaShortStorage?: number; + /** + * 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + */ + AcShortStorage?: number; + /** + * 基础图片处理量;单位GB + */ + ImageHandleFlow?: number; + /** + * 图片高级压缩次数;单位千次 + */ + ImageCompressCount?: number; + /** + * 忙时流量;单位GB;海外无此字段 + */ + BusyFlow?: number; + /** + * 闲时流量;单位GB;海外无此字段 + */ + IdleFlow?: number; + /** + * cdn回源流量;单位GB + */ + CdnFlow?: number; + /** + * 下载流量:单位GB;国内无此字段 + */ + Flow?: number; + /** + * 配额消费时间,unix时间戳;单位s,精确到日期 + */ + Date?: number; + /** + * 请求次数;单位万次 + */ + ApiTimes?: number; + /** + * 对象标签个数; 单位万个 + */ + ObjectTagCount?: number; + }[]; }[]; } /** - * GetUFileDailyReport - 查看日消费报表 + * GetUFileMonthlyBill - 获取bucket月度账单 */ -export interface GetUFileDailyReportRequest { +export interface GetUFileMonthlyBillRequest { /** - * 查询开始时间;unix时间戳,单位s + * 查询开始月份;例如"1994-07" */ - StartTime: number; + StartMonth: string; /** - * 查询结束时间;unix时间戳,单位s + * 查询结束时间;例如"1994-07" */ - EndTime: number; + EndMonth: string; /** - * 空间名称。此字段不为空,返回此Bucket日使用量;否则,返回这个项目的日使用量 + * 空间名称。此字段不为空,返回此Bucket日账单,否则,返回这个项目的日账单 */ BucketName?: string; } /** - * GetUFileDailyReport - 查看日消费报表 + * GetUFileMonthlyBill - 获取bucket月度账单 */ -export interface GetUFileDailyReportResponse { +export interface GetUFileMonthlyBillResponse { /** * 消费情况 */ DataSet: { /** - * 总消费情况 + * bucket账单 */ - Total?: { + BucketBills?: { /** - * 下载流量:单位byte;国内无此字段 + * bucket对应的资源系统标签 */ - Flow?: number; + Labels?: { + /** + * 标签对应key + */ + Key?: string; + /** + * 标签对应value + */ + Value?: string; + }[]; /** - * 闲时流量;单位byte;海外无此字段 + * 下载低频存储次数费用;分 */ - IdleFlow?: number; + GetCountIaBill?: number; /** - * 忙时流量;单位byte;海外无此字段 + * 下载标准存储次数费用;分 */ - BusyFlow?: number; + GetCountBill?: number; /** - * cdn回源流量;单位byte + * 上传归档存储次数费用;分 */ - CdnFlow?: number; + PutCountAcBill?: number; /** - * API请求次数(万次) + * 上传低频存储次数费用;分 */ - ApiTimes?: number; - }[]; - /** - * 日消费情况 - */ - Daily?: { + PutCountIaBill?: number; /** - * 标准存储量;单位byte + * 上传标准存储次数费用;分 */ - Storage?: number; + PutCountBill?: number; /** - * 低频存储量;单位byte + * 对象标签费用: 分 */ - IaStorage?: number; + ObjectTagCountBill?: number; /** - * 冷存(归档)存储量;单位byte + * 标准-存储总容量费用;分 */ - AcStorage?: number; + StorageBill?: number; /** - * 低频数据取回量;单位byte + * 低频-存储总容量费用;分 */ - IaGetSize?: number; + IaStorageBill?: number; /** - * 冷存激活量,即归档数据取回量;单位byte + * 归档-存储总容量费用;分 */ - AcRestore?: number; + AcStorageBill?: number; /** - * 忙时流量;单位byte;海外无此字段 + * 低频-数据取回量,即低频文件的数据取回量费用;分 */ - BusyFlow?: number; + IaGetSizeBill?: number; /** - * 闲时流量;单位byte;海外无此字段 + * 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量费用; 分 */ - IdleFlow?: number; + AcRestoreBill?: number; /** - * cdn回源流量;单位byte + * 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量费用; 分 */ - CdnFlow?: number; + AcExpeditedRetrievalBill?: number; /** - * 下载流量:单位byte;国内无此字段 + * 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 */ - Flow?: number; + IaShortStorageBill?: number; /** - * 配额消费时间,unix时间戳(单位s),精确到日期 + * 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 */ - Date?: number; + AcShortStorageBill?: number; /** - * API请求次数(万次) + * 基础图片处理量费用;分 */ - ApiTimes?: number; + ImageHandleFlowBill?: number; + /** + * 图片高级压缩次数费用;分 + */ + ImageCompressCountBill?: number; + /** + * 忙时流量费用;分;海外无此字段 + */ + BusyFlowBill?: number; + /** + * 闲时流量费用;分;海外无此字段 + */ + IdleFlowBill?: number; + /** + * cdn回源流量费用;分 + */ + CdnFlowBill?: number; + /** + * 下载流量费用:分;国内无此字段 + */ + FlowBill?: number; + /** + * 配额消费月份 + */ + Month?: string; + /** + * 下载归档存储次数费用;分 + */ + GetCountAcBill?: number; + /** + * 总费用;分 + */ + TotalBill?: number; }[]; }[]; } +/** + * GetUFilePkgPrice - 获取对资源进行新购、续费、升级等操作的价格 + */ +export interface GetUFilePkgPriceRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 操作类型,new:新购,upgrade:升级,renew:续费,delete:退费 + */ + InquiryType: string; + /** + * 新购和升级时必填 + */ + Amount?: number; + /** + * 新购和升级时必填 + */ + AmountUnit?: string; + /** + * 新购和续费时必填 + */ + Duration?: number; + /** + * 新购和续费时必填 + */ + DurationUnit?: string; + /** + * 资源id,升级续费退费时为必填 + */ + ResourceId?: string; +} + +/** + * GetUFilePkgPrice - 获取对资源进行新购、续费、升级等操作的价格 + */ +export interface GetUFilePkgPriceResponse { + /** + * 实际价格 + */ + CustomPrice?: number; + /** + * 原始价格 + */ + OriginPrice?: number; +} + /** * GetUFileQuota - 查看配额状态 */ @@ -898,6 +2446,92 @@ export interface GetUFileReportResponse { }[]; } +/** + * RenewUFilePkg - 资源包续费 + */ +export interface RenewUFilePkgRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 资源ID + */ + ResourceId: string; + /** + * 资源类型ID + */ + PkgType: number; + /** + * 续费时长 + */ + Duration: number; + /** + * 时长单位 + */ + DurationUnit: string; +} + +/** + * RenewUFilePkg - 资源包续费 + */ +export interface RenewUFilePkgResponse {} + +/** + * SetBucketQuota - 设置bucket配额 + */ +export interface SetBucketQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone: string; + /** + * bucket名称 + */ + BucketName: string; + /** + * bucket配额 + */ + QuotaLimit: number; +} + +/** + * SetBucketQuota - 设置bucket配额 + */ +export interface SetBucketQuotaResponse {} + +/** + * SetProjectRegionQuota - 设置项目地域配额 + */ +export interface SetProjectRegionQuotaRequest { + /** + * 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + */ + Zone?: string; + /** + * 配额数目(单位是Byte) + */ + QuotaLimit: number; +} + +/** + * SetProjectRegionQuota - 设置项目地域配额 + */ +export interface SetProjectRegionQuotaResponse { + /** + * 地域 + */ + Region: string; + /** + * 配额类型 + */ + QuotaType: string; + /** + * 配额数目(单位是Byte) + */ + QuotaLimit: string; +} + /** * SetUFileReferer - 设置对象存储防盗链 */ @@ -915,13 +2549,21 @@ export interface SetUFileRefererRequest { */ RefererAllowNull?: boolean; /** - * 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; + * 防盗链Referer类型,支持三种类型,1代表设置黑名单、2代表设置白名单,3代表同时设置黑白名单; (其中1和2是为了向前兼容,后续调用只应该传递类型3)RefererStatus为"on"时此参数必填; */ RefererType?: number; /** - * 防盗链Referer规则,支持正则表达式(不支持符号';') + * 防盗链Referer规则,支持正则表达式(不支持符号';'),该字段已弃用,请使用WhiteList.n或BlackList.n */ Referers?: string[]; + /** + * 白名单列表中的一项 + */ + WhiteList?: string[]; + /** + * 黑名单列表中的一项 + */ + BlackList?: string[]; } /** @@ -940,7 +2582,11 @@ export interface UpdateBucketRequest { /** * Bucket访问类型;public或private */ - Type: string; + Type?: string; + /** + * 默认存储类型 + */ + StorageClass?: string; } /** @@ -957,6 +2603,76 @@ export interface UpdateBucketResponse { BucketId?: string; } +/** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + */ +export interface UpdateBucketStaticPageRuleRequest { + /** + * 存储桶名称 + */ + Bucket: string; + /** + * 启用状态(enable/disable,只有绑定了自定义域名才能开启) + */ + Status?: string; + /** + * 默认首页 + */ + DefaultIndex?: string; + /** + * 子目录是否启用重定向 + */ + SubDirRedirect?: string; + /** + * 404规则 + */ + RuleFor404?: string; + /** + * 404时的默认页面 + */ + DefaultPage404?: string; +} + +/** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + */ +export interface UpdateBucketStaticPageRuleResponse {} + +/** + * UpdateCORSRule - 更新跨域规则 + */ +export interface UpdateCORSRuleRequest { + /** + * 跨域规则ID + */ + CORSId: string; + /** + * Bucket名称 + */ + BucketName: string; + /** + * 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + */ + AllowedOrigin: string; + /** + * 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + */ + AllowedMethod: string; + /** + * 指定允许的跨域请求头(多个Header用‘,’分隔) + */ + AllowedHeader?: string; + /** + * 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + */ + ExposeHeader?: string; +} + +/** + * UpdateCORSRule - 更新跨域规则 + */ +export interface UpdateCORSRuleResponse {} + /** * UpdateUFileLifeCycle - 更新生命周期管理 */ @@ -993,6 +2709,30 @@ export interface UpdateUFileLifeCycleRequest { * 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动转换为低频存储类型;范围: [7,36500],0代表不启用 */ IADays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerDeleteDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerArchivalDays?: number; + /** + * 指定一个历史文件过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] + */ + HistVerIADays?: number; + /** + * Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,tag的最大数量为10 + */ + Tags?: string; + /** + * 文件的最小size + */ + MinSize?: number; + /** + * 文件的最大size + */ + MaxSize?: string; } /** @@ -1000,6 +2740,37 @@ export interface UpdateUFileLifeCycleRequest { */ export interface UpdateUFileLifeCycleResponse {} +/** + * UpdateUFileSSLCert - 更新指定域名证书 + */ +export interface UpdateUFileSSLCertRequest { + /** + * 存储桶名称,全局唯一 + */ + BucketName: string; + /** + * 域名 + */ + Domain: string; + /** + * SSL证书名称 + */ + CertificateName: string; + /** + * 填写SSL证书文件内容(PEM编码)。 证书文件内容填写格式: 如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + */ + Certificate: string; + /** + * 填写SSL证书私钥内容(PEM编码)。 + */ + CertificateKey: string; +} + +/** + * UpdateUFileSSLCert - 更新指定域名证书 + */ +export interface UpdateUFileSSLCertResponse {} + /** * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 */ @@ -1034,3 +2805,75 @@ export interface UpdateUFileTokenRequest { * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 */ export interface UpdateUFileTokenResponse {} + +/** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + */ +export interface UpdateUdsRuleRequest { + /** + * 规则的唯一Id + */ + RuleId: string; + /** + * 规则名称 + */ + RuleName: string; + /** + * 源Bucket名字,全局唯一 + */ + SrcBucket: string; + /** + * 源bucket的token之一的tokenId + */ + SrcTokenId: string; + /** + * 目标Bucket名字,全局唯一 + */ + DstBucket: string; + /** + * 目标bucket的token之一的tokenId + */ + DstTokenId: string; + /** + * 解压后的目标目录 + */ + DstDirectory: string; + /** + * 是否以压缩文件的前缀为最后一层目录 + */ + KeepUS3Name: boolean; + /** + * 触发解压缩的前缀 + */ + Prefixes: string; + /** + * 操作的ops数组,"Ops.0":"unzip" + */ + Ops?: string[]; + /** + * 通知的事件数组 + */ + Events?: string[]; + /** + * 联系的用户组ID + */ + ContactGroupId?: string; + /** + * 通知的类型数组 + */ + NotificationTypes?: string[]; +} + +/** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + */ +export interface UpdateUdsRuleResponse { + /** + * 返回规则的规则ID + */ + RuleId: string; + /** + * 该请求的消息成功或者失败的描述 + */ + Mesage?: string; +} diff --git a/src/services/ukms/index.ts b/src/services/ukms/index.ts index c468fea..5f0a29c 100644 --- a/src/services/ukms/index.ts +++ b/src/services/ukms/index.ts @@ -534,7 +534,7 @@ export interface DecryptRequest { */ KeyId?: string; /** - * 加密上下文,JSON Object。 + * 加密上下文,JSON Object。该参数内容会记录在日志中,请勿传入密码、密钥、令牌等敏感信息。 */ EncryptionContext?: string; /** @@ -754,7 +754,7 @@ export interface EncryptRequest { */ Plaintext: string; /** - * 加密上下文,JSON Object。 + * 加密上下文,JSON Object。该参数内容会记录在日志中,请勿传入密码、密钥、令牌等敏感信息。 */ EncryptionContext?: string; /**