Skip to content

Commit

Permalink
Modify ListAppInstance.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed May 9, 2023
1 parent dbd2366 commit 42d05c2
Show file tree
Hide file tree
Showing 45 changed files with 1,238 additions and 23 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2023-05-09 Version: 1.0.7
- Modify ListAppInstance.

2023-04-03 Version: 1.0.6
- Add ListAppInstances Open API.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": ">5.5",
"alibabacloud/tea-utils": "^0.2.17",
"alibabacloud/tea-utils": "^0.2.18",
"alibabacloud/darabonba-openapi": "^0.2.8",
"alibabacloud/openapi-util": "^0.1.10|^0.2.1",
"alibabacloud/endpoint-util": "^0.1.0"
Expand Down
131 changes: 131 additions & 0 deletions src/Appstreamcenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupRequest;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupResponse;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupShrinkRequest;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateImageFromAppInstanceGroupRequest;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateImageFromAppInstanceGroupResponse;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\DeleteAppInstanceGroupRequest;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\DeleteAppInstanceGroupResponse;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\DeleteAppInstancesRequest;
Expand All @@ -23,6 +25,8 @@
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetAppInstanceGroupResponse;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetConnectionTicketRequest;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetConnectionTicketResponse;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetDebugAppInstanceRequest;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetDebugAppInstanceResponse;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetOtaTaskByTaskIdRequest;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetOtaTaskByTaskIdResponse;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\GetResourcePriceRequest;
Expand Down Expand Up @@ -269,6 +273,12 @@ public function createAppInstanceGroupWithOptions($tmpReq, $runtime)
if (!Utils::isUnset($tmpReq->runtimePolicy)) {
$request->runtimePolicyShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->runtimePolicy, 'RuntimePolicy', 'json');
}
if (!Utils::isUnset($tmpReq->securityPolicy)) {
$request->securityPolicyShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->securityPolicy, 'SecurityPolicy', 'json');
}
if (!Utils::isUnset($tmpReq->storagePolicy)) {
$request->storagePolicyShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->storagePolicy, 'StoragePolicy', 'json');
}
if (!Utils::isUnset($tmpReq->userInfo)) {
$request->userInfoShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->userInfo, 'UserInfo', 'json');
}
Expand Down Expand Up @@ -318,9 +328,15 @@ public function createAppInstanceGroupWithOptions($tmpReq, $runtime)
if (!Utils::isUnset($request->runtimePolicyShrink)) {
$body['RuntimePolicy'] = $request->runtimePolicyShrink;
}
if (!Utils::isUnset($request->securityPolicyShrink)) {
$body['SecurityPolicy'] = $request->securityPolicyShrink;
}
if (!Utils::isUnset($request->sessionTimeout)) {
$body['SessionTimeout'] = $request->sessionTimeout;
}
if (!Utils::isUnset($request->storagePolicyShrink)) {
$body['StoragePolicy'] = $request->storagePolicyShrink;
}
if (!Utils::isUnset($request->userInfoShrink)) {
$body['UserInfo'] = $request->userInfoShrink;
}
Expand Down Expand Up @@ -357,6 +373,55 @@ public function createAppInstanceGroup($request)
return $this->createAppInstanceGroupWithOptions($request, $runtime);
}

/**
* @param CreateImageFromAppInstanceGroupRequest $request
* @param RuntimeOptions $runtime
*
* @return CreateImageFromAppInstanceGroupResponse
*/
public function createImageFromAppInstanceGroupWithOptions($request, $runtime)
{
Utils::validateModel($request);
$body = [];
if (!Utils::isUnset($request->appCenterImageName)) {
$body['AppCenterImageName'] = $request->appCenterImageName;
}
if (!Utils::isUnset($request->appInstanceGroupId)) {
$body['AppInstanceGroupId'] = $request->appInstanceGroupId;
}
if (!Utils::isUnset($request->productType)) {
$body['ProductType'] = $request->productType;
}
$req = new OpenApiRequest([
'body' => OpenApiUtilClient::parseToMap($body),
]);
$params = new Params([
'action' => 'CreateImageFromAppInstanceGroup',
'version' => '2021-09-01',
'protocol' => 'HTTPS',
'pathname' => '/',
'method' => 'POST',
'authType' => 'AK',
'style' => 'RPC',
'reqBodyType' => 'formData',
'bodyType' => 'json',
]);

return CreateImageFromAppInstanceGroupResponse::fromMap($this->callApi($params, $req, $runtime));
}

/**
* @param CreateImageFromAppInstanceGroupRequest $request
*
* @return CreateImageFromAppInstanceGroupResponse
*/
public function createImageFromAppInstanceGroup($request)
{
$runtime = new RuntimeOptions([]);

return $this->createImageFromAppInstanceGroupWithOptions($request, $runtime);
}

/**
* @param DeleteAppInstanceGroupRequest $request
* @param RuntimeOptions $runtime
Expand Down Expand Up @@ -565,6 +630,52 @@ public function getConnectionTicket($request)
return $this->getConnectionTicketWithOptions($request, $runtime);
}

/**
* @param GetDebugAppInstanceRequest $request
* @param RuntimeOptions $runtime
*
* @return GetDebugAppInstanceResponse
*/
public function getDebugAppInstanceWithOptions($request, $runtime)
{
Utils::validateModel($request);
$body = [];
if (!Utils::isUnset($request->appInstanceGroupId)) {
$body['AppInstanceGroupId'] = $request->appInstanceGroupId;
}
if (!Utils::isUnset($request->productType)) {
$body['ProductType'] = $request->productType;
}
$req = new OpenApiRequest([
'body' => OpenApiUtilClient::parseToMap($body),
]);
$params = new Params([
'action' => 'GetDebugAppInstance',
'version' => '2021-09-01',
'protocol' => 'HTTPS',
'pathname' => '/',
'method' => 'POST',
'authType' => 'AK',
'style' => 'RPC',
'reqBodyType' => 'formData',
'bodyType' => 'json',
]);

return GetDebugAppInstanceResponse::fromMap($this->callApi($params, $req, $runtime));
}

/**
* @param GetDebugAppInstanceRequest $request
*
* @return GetDebugAppInstanceResponse
*/
public function getDebugAppInstance($request)
{
$runtime = new RuntimeOptions([]);

return $this->getDebugAppInstanceWithOptions($request, $runtime);
}

/**
* @param GetOtaTaskByTaskIdRequest $request
* @param RuntimeOptions $runtime
Expand Down Expand Up @@ -806,13 +917,19 @@ public function listAppInstancesWithOptions($request, $runtime)
if (!Utils::isUnset($request->appInstanceId)) {
$query['AppInstanceId'] = $request->appInstanceId;
}
if (!Utils::isUnset($request->includeDeleted)) {
$query['IncludeDeleted'] = $request->includeDeleted;
}
if (!Utils::isUnset($request->pageNumber)) {
$query['PageNumber'] = $request->pageNumber;
}
if (!Utils::isUnset($request->pageSize)) {
$query['PageSize'] = $request->pageSize;
}
$body = [];
if (!Utils::isUnset($request->appInstanceIdList)) {
$body['AppInstanceIdList'] = $request->appInstanceIdList;
}
if (!Utils::isUnset($request->status)) {
$body['Status'] = $request->status;
}
Expand Down Expand Up @@ -1086,6 +1203,12 @@ public function modifyAppInstanceGroupAttributeWithOptions($tmpReq, $runtime)
if (!Utils::isUnset($tmpReq->nodePool)) {
$request->nodePoolShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->nodePool, 'NodePool', 'json');
}
if (!Utils::isUnset($tmpReq->securityPolicy)) {
$request->securityPolicyShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->securityPolicy, 'SecurityPolicy', 'json');
}
if (!Utils::isUnset($tmpReq->storagePolicy)) {
$request->storagePolicyShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->storagePolicy, 'StoragePolicy', 'json');
}
$query = [];
if (!Utils::isUnset($request->appInstanceGroupId)) {
$query['AppInstanceGroupId'] = $request->appInstanceGroupId;
Expand All @@ -1102,8 +1225,16 @@ public function modifyAppInstanceGroupAttributeWithOptions($tmpReq, $runtime)
if (!Utils::isUnset($request->sessionTimeout)) {
$query['SessionTimeout'] = $request->sessionTimeout;
}
$body = [];
if (!Utils::isUnset($request->securityPolicyShrink)) {
$body['SecurityPolicy'] = $request->securityPolicyShrink;
}
if (!Utils::isUnset($request->storagePolicyShrink)) {
$body['StoragePolicy'] = $request->storagePolicyShrink;
}
$req = new OpenApiRequest([
'query' => OpenApiUtilClient::query($query),
'body' => OpenApiUtilClient::parseToMap($body),
]);
$params = new Params([
'action' => 'ModifyAppInstanceGroupAttribute',
Expand Down
30 changes: 28 additions & 2 deletions src/Models/CreateAppInstanceGroupRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupRequest\network;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupRequest\nodePool;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupRequest\runtimePolicy;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupRequest\securityPolicy;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupRequest\storagePolicy;
use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CreateAppInstanceGroupRequest\userInfo;
use AlibabaCloud\Tea\Model;

Expand Down Expand Up @@ -77,13 +79,13 @@ class CreateAppInstanceGroupRequest extends Model
public $period;

/**
* @example Day
*
* @var string
*/
public $periodUnit;

/**
* @example cag-b2ron*******
*
* @var string
*/
public $preOpenAppId;
Expand All @@ -107,13 +109,23 @@ class CreateAppInstanceGroupRequest extends Model
*/
public $runtimePolicy;

/**
* @var securityPolicy
*/
public $securityPolicy;

/**
* @example 15
*
* @var int
*/
public $sessionTimeout;

/**
* @var storagePolicy
*/
public $storagePolicy;

/**
* @var userInfo
*/
Expand All @@ -139,7 +151,9 @@ class CreateAppInstanceGroupRequest extends Model
'productType' => 'ProductType',
'promotionId' => 'PromotionId',
'runtimePolicy' => 'RuntimePolicy',
'securityPolicy' => 'SecurityPolicy',
'sessionTimeout' => 'SessionTimeout',
'storagePolicy' => 'StoragePolicy',
'userInfo' => 'UserInfo',
'users' => 'Users',
];
Expand Down Expand Up @@ -196,9 +210,15 @@ public function toMap()
if (null !== $this->runtimePolicy) {
$res['RuntimePolicy'] = null !== $this->runtimePolicy ? $this->runtimePolicy->toMap() : null;
}
if (null !== $this->securityPolicy) {
$res['SecurityPolicy'] = null !== $this->securityPolicy ? $this->securityPolicy->toMap() : null;
}
if (null !== $this->sessionTimeout) {
$res['SessionTimeout'] = $this->sessionTimeout;
}
if (null !== $this->storagePolicy) {
$res['StoragePolicy'] = null !== $this->storagePolicy ? $this->storagePolicy->toMap() : null;
}
if (null !== $this->userInfo) {
$res['UserInfo'] = null !== $this->userInfo ? $this->userInfo->toMap() : null;
}
Expand Down Expand Up @@ -262,9 +282,15 @@ public static function fromMap($map = [])
if (isset($map['RuntimePolicy'])) {
$model->runtimePolicy = runtimePolicy::fromMap($map['RuntimePolicy']);
}
if (isset($map['SecurityPolicy'])) {
$model->securityPolicy = securityPolicy::fromMap($map['SecurityPolicy']);
}
if (isset($map['SessionTimeout'])) {
$model->sessionTimeout = $map['SessionTimeout'];
}
if (isset($map['StoragePolicy'])) {
$model->storagePolicy = storagePolicy::fromMap($map['StoragePolicy']);
}
if (isset($map['UserInfo'])) {
$model->userInfo = userInfo::fromMap($map['UserInfo']);
}
Expand Down
20 changes: 18 additions & 2 deletions src/Models/CreateAppInstanceGroupRequest/network.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,28 @@

class network extends Model
{
/**
* @example 60
*
* @var int
*/
public $ipExpireMinutes;

/**
* @var routes[]
*/
public $routes;

/**
* @example Shared
*
* @var string
*/
public $strategyType;
protected $_name = [
'routes' => 'Routes',
'strategyType' => 'StrategyType',
'ipExpireMinutes' => 'IpExpireMinutes',
'routes' => 'Routes',
'strategyType' => 'StrategyType',
];

public function validate()
Expand All @@ -30,6 +40,9 @@ public function validate()
public function toMap()
{
$res = [];
if (null !== $this->ipExpireMinutes) {
$res['IpExpireMinutes'] = $this->ipExpireMinutes;
}
if (null !== $this->routes) {
$res['Routes'] = [];
if (null !== $this->routes && \is_array($this->routes)) {
Expand All @@ -54,6 +67,9 @@ public function toMap()
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['IpExpireMinutes'])) {
$model->ipExpireMinutes = $map['IpExpireMinutes'];
}
if (isset($map['Routes'])) {
if (!empty($map['Routes'])) {
$model->routes = [];
Expand Down
4 changes: 4 additions & 0 deletions src/Models/CreateAppInstanceGroupRequest/network/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
class routes extends Model
{
/**
* @example 139.196.XX.XX/32
*
* @var string
*/
public $destination;

/**
* @example Shared
*
* @var string
*/
public $mode;
Expand Down
Loading

0 comments on commit 42d05c2

Please sign in to comment.