Skip to content

Commit d9c0ae2

Browse files
committed
Add PutLayerACL API.
1 parent 3c34f59 commit d9c0ae2

17 files changed

+759
-87
lines changed

fc-open-20210406/ChangeLog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2022-08-11 Version: 1.1.9
2+
- Add PutLayerACL API.
3+
- Update ListLayers.
4+
- Add arnV2 in Layer struct.
5+
16
2022-07-21 Version: 1.1.8
27
- Add instanceSoftConcurrency field for function meta.
38

fc-open-20210406/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.aliyun</groupId>
55
<artifactId>alibabacloud-fc_open20210406</artifactId>
6-
<version>1.1.8</version>
6+
<version>1.1.9</version>
77
<packaging>jar</packaging>
88
<name>alibabacloud-fc_open20210406</name>
99
<description>Alibaba Cloud FC-Open (20210406) Async SDK for Java

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/AsyncClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ static AsyncClient create() {
124124

125125
CompletableFuture<PutFunctionOnDemandConfigResponse> putFunctionOnDemandConfig(PutFunctionOnDemandConfigRequest request);
126126

127+
CompletableFuture<PutLayerACLResponse> putLayerACL(PutLayerACLRequest request);
128+
127129
CompletableFuture<PutProvisionConfigResponse> putProvisionConfig(PutProvisionConfigRequest request);
128130

129131
CompletableFuture<RegisterEventSourceResponse> registerEventSource(RegisterEventSourceRequest request);

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/DefaultAsyncClient.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,20 @@ public CompletableFuture<PutFunctionOnDemandConfigResponse> putFunctionOnDemandC
803803
}
804804
}
805805

806+
@Override
807+
public CompletableFuture<PutLayerACLResponse> putLayerACL(PutLayerACLRequest request) {
808+
try {
809+
this.handler.validateRequestModel(request);
810+
TeaRequest teaRequest = REQUEST.copy().setStyle(RequestStyle.RESTFUL).setAction("PutLayerACL").setMethod(HttpMethod.PUT).setPathRegex("/2021-04-06/layers/{layerName}/acl").setBodyType(BodyType.STRING).setBodyIsForm(false).setReqBodyType(BodyType.JSON).formModel(request);
811+
ClientExecutionParams params = new ClientExecutionParams().withInput(request).withRequest(teaRequest).withOutput(PutLayerACLResponse.create());
812+
return this.handler.execute(params);
813+
} catch (Exception e) {
814+
CompletableFuture<PutLayerACLResponse> future = new CompletableFuture<>();
815+
future.completeExceptionally(e);
816+
return future;
817+
}
818+
}
819+
806820
@Override
807821
public CompletableFuture<PutProvisionConfigResponse> putProvisionConfig(PutProvisionConfigRequest request) {
808822
try {

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/CreateAliasRequest.java

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ public class CreateAliasRequest extends Request {
4242
@NameInMap("description")
4343
private String description;
4444

45+
@Body
46+
@NameInMap("resolvePolicy")
47+
private String resolvePolicy;
48+
49+
@Body
50+
@NameInMap("routePolicy")
51+
private RoutePolicy routePolicy;
52+
4553
@Body
4654
@NameInMap("versionId")
4755
@Validation(required = true)
@@ -56,6 +64,8 @@ private CreateAliasRequest(Builder builder) {
5664
this.additionalVersionWeight = builder.additionalVersionWeight;
5765
this.aliasName = builder.aliasName;
5866
this.description = builder.description;
67+
this.resolvePolicy = builder.resolvePolicy;
68+
this.routePolicy = builder.routePolicy;
5969
this.versionId = builder.versionId;
6070
}
6171

@@ -121,6 +131,20 @@ public String getDescription() {
121131
return this.description;
122132
}
123133

134+
/**
135+
* @return resolvePolicy
136+
*/
137+
public String getResolvePolicy() {
138+
return this.resolvePolicy;
139+
}
140+
141+
/**
142+
* @return routePolicy
143+
*/
144+
public RoutePolicy getRoutePolicy() {
145+
return this.routePolicy;
146+
}
147+
124148
/**
125149
* @return versionId
126150
*/
@@ -136,6 +160,8 @@ public static final class Builder extends Request.Builder<CreateAliasRequest, Bu
136160
private java.util.Map < String, Float > additionalVersionWeight;
137161
private String aliasName;
138162
private String description;
163+
private String resolvePolicy;
164+
private RoutePolicy routePolicy;
139165
private String versionId;
140166

141167
private Builder() {
@@ -151,6 +177,8 @@ private Builder(CreateAliasRequest request) {
151177
this.additionalVersionWeight = request.additionalVersionWeight;
152178
this.aliasName = request.aliasName;
153179
this.description = request.description;
180+
this.resolvePolicy = request.resolvePolicy;
181+
this.routePolicy = request.routePolicy;
154182
this.versionId = request.versionId;
155183
}
156184

@@ -217,6 +245,28 @@ public Builder description(String description) {
217245
return this;
218246
}
219247

248+
/**
249+
* 灰度方式:随机灰度或者规则灰度,默认值为随机灰度
250+
* <p>
251+
* 枚举值:
252+
* Random
253+
* Content
254+
*/
255+
public Builder resolvePolicy(String resolvePolicy) {
256+
this.putBodyParameter("resolvePolicy", resolvePolicy);
257+
this.resolvePolicy = resolvePolicy;
258+
return this;
259+
}
260+
261+
/**
262+
* 灰度规则:满足灰度规则条件的流量,会被路由至灰度实例
263+
*/
264+
public Builder routePolicy(RoutePolicy routePolicy) {
265+
this.putBodyParameter("routePolicy", routePolicy);
266+
this.routePolicy = routePolicy;
267+
return this;
268+
}
269+
220270
/**
221271
* 版本ID
222272
*/

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/CreateServiceResponseBody.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ public class CreateServiceResponseBody extends TeaModel {
4242
@NameInMap("tracingConfig")
4343
private TracingConfig tracingConfig;
4444

45-
@NameInMap("vendorConfig")
46-
private VendorConfig vendorConfig;
47-
4845
@NameInMap("vpcConfig")
4946
private VPCConfig vpcConfig;
5047

@@ -59,7 +56,6 @@ private CreateServiceResponseBody(Builder builder) {
5956
this.serviceId = builder.serviceId;
6057
this.serviceName = builder.serviceName;
6158
this.tracingConfig = builder.tracingConfig;
62-
this.vendorConfig = builder.vendorConfig;
6359
this.vpcConfig = builder.vpcConfig;
6460
}
6561

@@ -141,13 +137,6 @@ public TracingConfig getTracingConfig() {
141137
return this.tracingConfig;
142138
}
143139

144-
/**
145-
* @return vendorConfig
146-
*/
147-
public VendorConfig getVendorConfig() {
148-
return this.vendorConfig;
149-
}
150-
151140
/**
152141
* @return vpcConfig
153142
*/
@@ -166,7 +155,6 @@ public static final class Builder {
166155
private String serviceId;
167156
private String serviceName;
168157
private TracingConfig tracingConfig;
169-
private VendorConfig vendorConfig;
170158
private VPCConfig vpcConfig;
171159

172160
/**
@@ -249,14 +237,6 @@ public Builder tracingConfig(TracingConfig tracingConfig) {
249237
return this;
250238
}
251239

252-
/**
253-
* vendorConfig.
254-
*/
255-
public Builder vendorConfig(VendorConfig vendorConfig) {
256-
this.vendorConfig = vendorConfig;
257-
return this;
258-
}
259-
260240
/**
261241
* vpcConfig.
262242
*/

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/GetAliasResponseBody.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ public class GetAliasResponseBody extends TeaModel {
2727
@NameInMap("lastModifiedTime")
2828
private String lastModifiedTime;
2929

30+
@NameInMap("resolvePolicy")
31+
private String resolvePolicy;
32+
33+
@NameInMap("routePolicy")
34+
private RoutePolicy routePolicy;
35+
3036
@NameInMap("versionId")
3137
private String versionId;
3238

@@ -36,6 +42,8 @@ private GetAliasResponseBody(Builder builder) {
3642
this.createdTime = builder.createdTime;
3743
this.description = builder.description;
3844
this.lastModifiedTime = builder.lastModifiedTime;
45+
this.resolvePolicy = builder.resolvePolicy;
46+
this.routePolicy = builder.routePolicy;
3947
this.versionId = builder.versionId;
4048
}
4149

@@ -82,6 +90,20 @@ public String getLastModifiedTime() {
8290
return this.lastModifiedTime;
8391
}
8492

93+
/**
94+
* @return resolvePolicy
95+
*/
96+
public String getResolvePolicy() {
97+
return this.resolvePolicy;
98+
}
99+
100+
/**
101+
* @return routePolicy
102+
*/
103+
public RoutePolicy getRoutePolicy() {
104+
return this.routePolicy;
105+
}
106+
85107
/**
86108
* @return versionId
87109
*/
@@ -95,6 +117,8 @@ public static final class Builder {
95117
private String createdTime;
96118
private String description;
97119
private String lastModifiedTime;
120+
private String resolvePolicy;
121+
private RoutePolicy routePolicy;
98122
private String versionId;
99123

100124
/**
@@ -137,6 +161,26 @@ public Builder lastModifiedTime(String lastModifiedTime) {
137161
return this;
138162
}
139163

164+
/**
165+
* 灰度方式:随机灰度或者规则灰度,默认值为随机灰度
166+
* <p>
167+
* 枚举值:
168+
* Random
169+
* Content
170+
*/
171+
public Builder resolvePolicy(String resolvePolicy) {
172+
this.resolvePolicy = resolvePolicy;
173+
return this;
174+
}
175+
176+
/**
177+
* 灰度规则:满足灰度规则条件的流量,会被路由至灰度实例
178+
*/
179+
public Builder routePolicy(RoutePolicy routePolicy) {
180+
this.routePolicy = routePolicy;
181+
return this;
182+
}
183+
140184
/**
141185
* 版本ID
142186
*/

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/Layer.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public class Layer extends TeaModel {
1818
@NameInMap("arn")
1919
private String arn;
2020

21+
@NameInMap("arnV2")
22+
private String arnV2;
23+
2124
@NameInMap("code")
2225
private LayerCode code;
2326

@@ -39,19 +42,24 @@ public class Layer extends TeaModel {
3942
@NameInMap("layerName")
4043
private String layerName;
4144

45+
@NameInMap("license")
46+
private String license;
47+
4248
@NameInMap("version")
4349
private Integer version;
4450

4551
private Layer(Builder builder) {
4652
this.acl = builder.acl;
4753
this.arn = builder.arn;
54+
this.arnV2 = builder.arnV2;
4855
this.code = builder.code;
4956
this.codeChecksum = builder.codeChecksum;
5057
this.codeSize = builder.codeSize;
5158
this.compatibleRuntime = builder.compatibleRuntime;
5259
this.createTime = builder.createTime;
5360
this.description = builder.description;
5461
this.layerName = builder.layerName;
62+
this.license = builder.license;
5563
this.version = builder.version;
5664
}
5765

@@ -77,6 +85,13 @@ public String getArn() {
7785
return this.arn;
7886
}
7987

88+
/**
89+
* @return arnV2
90+
*/
91+
public String getArnV2() {
92+
return this.arnV2;
93+
}
94+
8095
/**
8196
* @return code
8297
*/
@@ -126,6 +141,13 @@ public String getLayerName() {
126141
return this.layerName;
127142
}
128143

144+
/**
145+
* @return license
146+
*/
147+
public String getLicense() {
148+
return this.license;
149+
}
150+
129151
/**
130152
* @return version
131153
*/
@@ -136,13 +158,15 @@ public Integer getVersion() {
136158
public static final class Builder {
137159
private Integer acl;
138160
private String arn;
161+
private String arnV2;
139162
private LayerCode code;
140163
private String codeChecksum;
141164
private Long codeSize;
142165
private java.util.List < String > compatibleRuntime;
143166
private String createTime;
144167
private String description;
145168
private String layerName;
169+
private String license;
146170
private Integer version;
147171

148172
/**
@@ -161,6 +185,14 @@ public Builder arn(String arn) {
161185
return this;
162186
}
163187

188+
/**
189+
* arnV2
190+
*/
191+
public Builder arnV2(String arnV2) {
192+
this.arnV2 = arnV2;
193+
return this;
194+
}
195+
164196
/**
165197
* 层代码
166198
*/
@@ -217,6 +249,14 @@ public Builder layerName(String layerName) {
217249
return this;
218250
}
219251

252+
/**
253+
* 许可协议
254+
*/
255+
public Builder license(String license) {
256+
this.license = license;
257+
return this;
258+
}
259+
220260
/**
221261
* 层版本
222262
*/

0 commit comments

Comments
 (0)