gpt4 book ai didi

php - 使用 php 任务调度程序创建堆栈

转载 作者:行者123 更新时间:2023-12-03 07:48:20 25 4
gpt4 key购买 nike

我使用 AWS CLI 创建了 CloudFormation 堆栈。有没有办法使用 PHP 任务调度程序创建堆栈?

我有一个托管在 AWS 中的在线工具学习网站,该网站使用 AWS 服务。我使用了这个 AWS CLI 命令:

aws cloudformation create-stack --stack-name $Event_name-$emp_Id --template-body https://s3.ap-south-1.amazonaws.com

在 Amazon CloudFormation 中创建堆栈。

任何人都可以帮助我创建 CloudFormaion 堆栈,而无需使用 AWS CLI 命令并使用 PHP 来安排任务吗?

最佳答案

您可以使用AWS SDK for PHP 3.x调用createStack() command :

$result = $client->createStack([
'Capabilities' => ['<string>', ...],
'ClientRequestToken' => '<string>',
'DisableRollback' => true || false,
'NotificationARNs' => ['<string>', ...],
'OnFailure' => 'DO_NOTHING|ROLLBACK|DELETE',
'Parameters' => [
[
'ParameterKey' => '<string>',
'ParameterValue' => '<string>',
'UsePreviousValue' => true || false,
],
// ...
],
'ResourceTypes' => ['<string>', ...],
'RoleARN' => '<string>',
'StackName' => '<string>', // REQUIRED
'StackPolicyBody' => '<string>',
'StackPolicyURL' => '<string>',
'Tags' => [
[
'Key' => '<string>',
'Value' => '<string>',
],
// ...
],
'TemplateBody' => '<string>',
'TemplateURL' => '<string>',
'TimeoutInMinutes' => <integer>,
]);

关于php - 使用 php 任务调度程序创建堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44498311/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com