Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]Amazing new feature #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 166 additions & 18 deletions fc-open-20210406/core/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ public CreateAliasResponse CreateAliasWithOptions(string serviceName, CreateAlia
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ResolvePolicy))
{
body["resolvePolicy"] = request.ResolvePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.RoutePolicy.ToMap()))
{
body["routePolicy"] = request.RoutePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.VersionId))
{
body["versionId"] = request.VersionId;
Expand Down Expand Up @@ -150,6 +158,14 @@ public async Task<CreateAliasResponse> CreateAliasWithOptionsAsync(string servic
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ResolvePolicy))
{
body["resolvePolicy"] = request.ResolvePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.RoutePolicy.ToMap()))
{
body["routePolicy"] = request.RoutePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.VersionId))
{
body["versionId"] = request.VersionId;
Expand Down Expand Up @@ -3619,6 +3635,11 @@ public InvokeFunctionResponse InvokeFunctionWithOptions(string serviceName, stri
{
query["qualifier"] = request.Qualifier;
}
string body = "";
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Body))
{
body = AlibabaCloud.TeaUtil.Common.ToString(request.Body);
}
Dictionary<string, string> realHeaders = new Dictionary<string, string>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.CommonHeaders))
{
Expand Down Expand Up @@ -3652,7 +3673,7 @@ public InvokeFunctionResponse InvokeFunctionWithOptions(string serviceName, stri
{
Headers = realHeaders,
Query = AlibabaCloud.OpenApiUtil.Client.Query(query),
Body = AlibabaCloud.TeaUtil.Common.ToString(request.Body),
Body = body,
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Expand All @@ -3679,6 +3700,11 @@ public async Task<InvokeFunctionResponse> InvokeFunctionWithOptionsAsync(string
{
query["qualifier"] = request.Qualifier;
}
string body = "";
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Body))
{
body = AlibabaCloud.TeaUtil.Common.ToString(request.Body);
}
Dictionary<string, string> realHeaders = new Dictionary<string, string>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.CommonHeaders))
{
Expand Down Expand Up @@ -3712,7 +3738,7 @@ public async Task<InvokeFunctionResponse> InvokeFunctionWithOptionsAsync(string
{
Headers = realHeaders,
Query = AlibabaCloud.OpenApiUtil.Client.Query(query),
Body = AlibabaCloud.TeaUtil.Common.ToString(request.Body),
Body = body,
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Expand Down Expand Up @@ -4414,14 +4440,6 @@ public ListInstancesResponse ListInstancesWithOptions(string serviceName, string
{
realHeaders["X-Fc-Account-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcAccountId);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcDate))
{
realHeaders["X-Fc-Date"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcDate);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcTraceId))
{
realHeaders["X-Fc-Trace-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcTraceId);
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Headers = realHeaders,
Expand Down Expand Up @@ -4469,14 +4487,6 @@ public async Task<ListInstancesResponse> ListInstancesWithOptionsAsync(string se
{
realHeaders["X-Fc-Account-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcAccountId);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcDate))
{
realHeaders["X-Fc-Date"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcDate);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcTraceId))
{
realHeaders["X-Fc-Trace-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcTraceId);
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Headers = realHeaders,
Expand Down Expand Up @@ -4637,10 +4647,18 @@ public ListLayersResponse ListLayersWithOptions(ListLayersRequest request, ListL
{
query["nextToken"] = request.NextToken;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Official))
{
query["official"] = request.Official;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Prefix))
{
query["prefix"] = request.Prefix;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Public))
{
query["public"] = request.Public;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.StartKey))
{
query["startKey"] = request.StartKey;
Expand Down Expand Up @@ -4694,10 +4712,18 @@ public async Task<ListLayersResponse> ListLayersWithOptionsAsync(ListLayersReque
{
query["nextToken"] = request.NextToken;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Official))
{
query["official"] = request.Official;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Prefix))
{
query["prefix"] = request.Prefix;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Public))
{
query["public"] = request.Public;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.StartKey))
{
query["startKey"] = request.StartKey;
Expand Down Expand Up @@ -6395,6 +6421,112 @@ public async Task<PutFunctionOnDemandConfigResponse> PutFunctionOnDemandConfigWi
return TeaModel.ToObject<PutFunctionOnDemandConfigResponse>(await CallApiAsync(params_, req, runtime));
}

public PutLayerACLResponse PutLayerACL(string layerName, PutLayerACLRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
PutLayerACLHeaders headers = new PutLayerACLHeaders();
return PutLayerACLWithOptions(layerName, request, headers, runtime);
}

public async Task<PutLayerACLResponse> PutLayerACLAsync(string layerName, PutLayerACLRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
PutLayerACLHeaders headers = new PutLayerACLHeaders();
return await PutLayerACLWithOptionsAsync(layerName, request, headers, runtime);
}

public PutLayerACLResponse PutLayerACLWithOptions(string layerName, PutLayerACLRequest request, PutLayerACLHeaders headers, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
layerName = AlibabaCloud.OpenApiUtil.Client.GetEncodeParam(layerName);
Dictionary<string, object> query = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Public))
{
query["public"] = request.Public;
}
Dictionary<string, string> realHeaders = new Dictionary<string, string>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.CommonHeaders))
{
realHeaders = headers.CommonHeaders;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcAccountId))
{
realHeaders["X-Fc-Account-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcAccountId);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcDate))
{
realHeaders["X-Fc-Date"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcDate);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcTraceId))
{
realHeaders["X-Fc-Trace-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcTraceId);
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Headers = realHeaders,
Query = AlibabaCloud.OpenApiUtil.Client.Query(query),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "PutLayerACL",
Version = "2021-04-06",
Protocol = "HTTPS",
Pathname = "/2021-04-06/layers/" + layerName + "/acl",
Method = "PUT",
AuthType = "AK",
Style = "ROA",
ReqBodyType = "json",
BodyType = "string",
};
return TeaModel.ToObject<PutLayerACLResponse>(CallApi(params_, req, runtime));
}

public async Task<PutLayerACLResponse> PutLayerACLWithOptionsAsync(string layerName, PutLayerACLRequest request, PutLayerACLHeaders headers, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime)
{
AlibabaCloud.TeaUtil.Common.ValidateModel(request);
layerName = AlibabaCloud.OpenApiUtil.Client.GetEncodeParam(layerName);
Dictionary<string, object> query = new Dictionary<string, object>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Public))
{
query["public"] = request.Public;
}
Dictionary<string, string> realHeaders = new Dictionary<string, string>(){};
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.CommonHeaders))
{
realHeaders = headers.CommonHeaders;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcAccountId))
{
realHeaders["X-Fc-Account-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcAccountId);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcDate))
{
realHeaders["X-Fc-Date"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcDate);
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XFcTraceId))
{
realHeaders["X-Fc-Trace-Id"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XFcTraceId);
}
AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest
{
Headers = realHeaders,
Query = AlibabaCloud.OpenApiUtil.Client.Query(query),
};
AlibabaCloud.OpenApiClient.Models.Params params_ = new AlibabaCloud.OpenApiClient.Models.Params
{
Action = "PutLayerACL",
Version = "2021-04-06",
Protocol = "HTTPS",
Pathname = "/2021-04-06/layers/" + layerName + "/acl",
Method = "PUT",
AuthType = "AK",
Style = "ROA",
ReqBodyType = "json",
BodyType = "string",
};
return TeaModel.ToObject<PutLayerACLResponse>(await CallApiAsync(params_, req, runtime));
}

public PutProvisionConfigResponse PutProvisionConfig(string serviceName, string functionName, PutProvisionConfigRequest request)
{
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
Expand Down Expand Up @@ -7029,6 +7161,14 @@ public UpdateAliasResponse UpdateAliasWithOptions(string serviceName, string ali
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ResolvePolicy))
{
body["resolvePolicy"] = request.ResolvePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.RoutePolicy.ToMap()))
{
body["routePolicy"] = request.RoutePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.VersionId))
{
body["versionId"] = request.VersionId;
Expand Down Expand Up @@ -7088,6 +7228,14 @@ public async Task<UpdateAliasResponse> UpdateAliasWithOptionsAsync(string servic
{
body["description"] = request.Description;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ResolvePolicy))
{
body["resolvePolicy"] = request.ResolvePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.RoutePolicy.ToMap()))
{
body["routePolicy"] = request.RoutePolicy;
}
if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.VersionId))
{
body["versionId"] = request.VersionId;
Expand Down
3 changes: 0 additions & 3 deletions fc-open-20210406/core/Models/AccelerationInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
namespace AlibabaCloud.SDK.FC_Open20210406.Models
{
public class AccelerationInfo : TeaModel {
/// <summary>
/// 镜像加速状态,取值 Preparing 或 Ready
/// </summary>
[NameInMap("status")]
[Validation(Required=false)]
public string Status { get; set; }
Expand Down
9 changes: 0 additions & 9 deletions fc-open-20210406/core/Models/AsyncConfigMeta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,14 @@
namespace AlibabaCloud.SDK.FC_Open20210406.Models
{
public class AsyncConfigMeta : TeaModel {
/// <summary>
/// 异步配置所属函数名称。
/// </summary>
[NameInMap("functionName")]
[Validation(Required=false)]
public string FunctionName { get; set; }

/// <summary>
/// 异步配置所属服务版本/别名。
/// </summary>
[NameInMap("qualifier")]
[Validation(Required=false)]
public string Qualifier { get; set; }

/// <summary>
/// 异步配置所属服务名称。
/// </summary>
[NameInMap("serviceName")]
[Validation(Required=false)]
public string ServiceName { get; set; }
Expand Down
3 changes: 0 additions & 3 deletions fc-open-20210406/core/Models/AvailableAZ.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
namespace AlibabaCloud.SDK.FC_Open20210406.Models
{
public class AvailableAZ : TeaModel {
/// <summary>
/// az
/// </summary>
[NameInMap("availableAZs")]
[Validation(Required=false)]
public string AvailableAZs { get; set; }
Expand Down
12 changes: 0 additions & 12 deletions fc-open-20210406/core/Models/CDNEventsTriggerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,18 @@
namespace AlibabaCloud.SDK.FC_Open20210406.Models
{
public class CDNEventsTriggerConfig : TeaModel {
/// <summary>
/// eventName
/// </summary>
[NameInMap("eventName")]
[Validation(Required=false)]
public string EventName { get; set; }

/// <summary>
/// eventVersion
/// </summary>
[NameInMap("eventVersion")]
[Validation(Required=false)]
public string EventVersion { get; set; }

/// <summary>
/// filter
/// </summary>
[NameInMap("filter")]
[Validation(Required=false)]
public Dictionary<string, List<string>> Filter { get; set; }

/// <summary>
/// notes
/// </summary>
[NameInMap("notes")]
[Validation(Required=false)]
public string Notes { get; set; }
Expand Down
9 changes: 0 additions & 9 deletions fc-open-20210406/core/Models/CertConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,14 @@
namespace AlibabaCloud.SDK.FC_Open20210406.Models
{
public class CertConfig : TeaModel {
/// <summary>
/// 证书名称
/// </summary>
[NameInMap("certName")]
[Validation(Required=false)]
public string CertName { get; set; }

/// <summary>
/// 证书,如果是证书链则依次填写多个证书
/// </summary>
[NameInMap("certificate")]
[Validation(Required=false)]
public string Certificate { get; set; }

/// <summary>
/// 私钥
/// </summary>
[NameInMap("privateKey")]
[Validation(Required=false)]
public string PrivateKey { get; set; }
Expand Down
Loading