• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DeleteStackRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.amazonaws.services.cloudformation.model.DeleteStackRequest的典型用法代码示例。如果您正苦于以下问题:Java DeleteStackRequest类的具体用法?Java DeleteStackRequest怎么用?Java DeleteStackRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DeleteStackRequest类属于com.amazonaws.services.cloudformation.model包,在下文中一共展示了DeleteStackRequest类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: deleteFailedCreate

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
private void deleteFailedCreate(final String stackName, AmazonCloudFormation cf, int statusPollingIntervalMs) {
    {
        // delete an application in ROLLBACK_COMPLETE status

        ListStacksResult r = cf.listStacks();
        r.getStackSummaries() //
                .stream() //
                .filter(x -> x.getStackName().equals(stackName)) //
                .limit(1) //
                .filter(x -> StackStatus.ROLLBACK_COMPLETE.toString().equals(x.getStackStatus())) //
                .forEach(x -> {
                    log.info("Deleting stack with status " + x.getStackStatus()); //
                    cf.deleteStack(new DeleteStackRequest().withStackName(stackName));
                    waitForCompletion(cf, stackName, statusPollingIntervalMs, log);
                });

    }
}
 
开发者ID:davidmoten,项目名称:aws-maven-plugin,代码行数:19,代码来源:CloudFormationDeployer.java


示例2: after

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
@Override
protected void after() {
	this.cloudFormation.deleteStack(new DeleteStackRequest()
			.withStackName(this.stackName));
	try {
		waitForCompletion();
	}
	catch (InterruptedException e) {
		// Ignore the InterruptedException
	}
	finally {
		System.clearProperty("cloud.aws.credentials.accessKey");
		System.clearProperty("cloud.aws.credentials.secretKey");
	}
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-stream-app-starters,代码行数:16,代码来源:AwsIntegrationTestStackRule.java


示例3: removeClusterInfrastructure

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
@Override
public void removeClusterInfrastructure() {
    autoScaling.deletePolicy(new DeletePolicyRequest().withAutoScalingGroupName(getAutoScalingGroup().getAutoScalingGroupName()).withPolicyName(SCALE_UP_POLICY));
    autoScaling.deletePolicy(new DeletePolicyRequest().withAutoScalingGroupName(getAutoScalingGroup().getAutoScalingGroupName()).withPolicyName(SCALE_DOWN_POLICY));
    cloudWatch.deleteAlarms(new DeleteAlarmsRequest().withAlarmNames(ESS_OVERLOAD_ALARM, ESS_IDLE_ALARM));
    // CloudWatch metrics are stored for two weeks. Old data will be removed automatically.

    amazonSQS.deleteQueue(new DeleteQueueRequest().withQueueUrl(ESS_QUEUE_NAME));
    cloudFormation.deleteStack(new DeleteStackRequest().withStackName(SystemUtils.getCloudFormationStackName()));
}
 
开发者ID:SungardAS,项目名称:enhanced-snapshots,代码行数:11,代码来源:ClusterConfigurationServiceImpl.java


示例4: getStackResources

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
private DescribeStackResourcesResult getStackResources(String stackName) throws InterruptedException, IOException {
    try {
        DescribeStacksResult describeStacksResult = this.amazonCloudFormationClient.describeStacks(new DescribeStacksRequest().withStackName(stackName));
        for (Stack stack : describeStacksResult.getStacks()) {
            if (isAvailable(stack)) {
                return this.amazonCloudFormationClient.describeStackResources(new DescribeStackResourcesRequest().withStackName(stack.getStackName()));
            }
            if (isError(stack)) {
                if (this.stackCreatedByThisInstance) {
                    throw new IllegalArgumentException("Could not create stack");
                }
                this.amazonCloudFormationClient.deleteStack(new DeleteStackRequest().withStackName(stack.getStackName()));
                return getStackResources(stackName);
            }
            if (isInProgress(stack)) {
                //noinspection BusyWait
                Thread.sleep(5000L);
                return getStackResources(stackName);
            }
        }
    } catch (AmazonClientException e) {
        String templateBody = FileCopyUtils.copyToString(new InputStreamReader(new ClassPathResource(TEMPLATE_PATH).getInputStream()));
        this.amazonCloudFormationClient.createStack(new CreateStackRequest().withTemplateBody(templateBody).withOnFailure(OnFailure.DELETE).
                withStackName(stackName).withTags(new Tag().withKey("tag1").withValue("value1")).
                withParameters(new Parameter().withParameterKey("RdsPassword").withParameterValue(this.rdsPassword)));
        this.stackCreatedByThisInstance = true;
    }

    return getStackResources(stackName);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-aws,代码行数:31,代码来源:TestStackEnvironment.java


示例5: execute

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
public void execute() {
    checkParams();
    AmazonEC2Client ec2Client = getOrCreateClient(AmazonEC2Client.class);
    ec2Client
            .deleteKeyPair(new DeleteKeyPairRequest().withKeyName(keyName));
    AmazonCloudFormationClient cloudFormationClient = getOrCreateClient(AmazonCloudFormationClient.class);
    cloudFormationClient.deleteStack(new DeleteStackRequest()
            .withStackName(stackName));
}
 
开发者ID:awslabs,项目名称:aws-ant-tasks,代码行数:10,代码来源:TearDownCloudFormationTestsTask.java


示例6: deleteNetwork

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
@AfterSuite
@Parameters({ "regionName", "vpcStackName" })
public void deleteNetwork(String regionName, @Optional("it-vpc-stack") String vpcStackName) {
    AmazonCloudFormationClient client = new AmazonCloudFormationClient();
    client.setRegion(RegionUtils.getRegion(regionName));
    client.deleteStack(new DeleteStackRequest().withStackName(vpcStackName));
}
 
开发者ID:hortonworks,项目名称:cloudbreak,代码行数:8,代码来源:AwsDeleteVpcTest.java


示例7: requestDeletion

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
private void requestDeletion(List<String> deletionList) {
	for(String stackName : deletionList) {
		DeleteStackRequest request = new DeleteStackRequest();
		request.setStackName(stackName);
		cfnClient.deleteStack(request);
		logger.info("Requested deletion of " + stackName);
	}
}
 
开发者ID:cartwrightian,项目名称:cfnassist,代码行数:9,代码来源:DeletesStacks.java


示例8: deleteStack

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
public void deleteStack(String stackName) {
	LOG.info("Delete stack '{}'", stackName);
	cloudFormation.deleteStack(new DeleteStackRequest().withStackName(stackName));
}
 
开发者ID:kaklakariada,项目名称:aws-sam-gradle,代码行数:5,代码来源:CloudformationService.java


示例9: destroy

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
@Override
public void destroy() throws Exception {
    if (this.stackCreatedByThisInstance) {
        this.amazonCloudFormationClient.deleteStack(new DeleteStackRequest().withStackName(DEFAULT_STACK_NAME));
    }
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-aws,代码行数:7,代码来源:TestStackEnvironment.java


示例10: stackDelete

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
/**
 */
public Stack stackDelete() throws Exception {

	final DeleteStackRequest request = new DeleteStackRequest();

	request.withStackName(name);

	amazonClient.deleteStack(request);

	final Stack stack = waitForStackDelete();

	return stack;

}
 
开发者ID:jwrapper,项目名称:jwrapper-maven-plugin,代码行数:16,代码来源:CarrotCloudForm.java


示例11: deleteStack

import com.amazonaws.services.cloudformation.model.DeleteStackRequest; //导入依赖的package包/类
/**
 * Deletes an existing stack by name.
 *
 * @param stackId Stack ID.
 */
public void deleteStack(final String stackId) {
    final DeleteStackRequest request = new DeleteStackRequest().withStackName(stackId);
    cloudFormationClient.deleteStack(request);
}
 
开发者ID:Nike-Inc,项目名称:cerberus-lifecycle-cli,代码行数:10,代码来源:CloudFormationService.java



注:本文中的com.amazonaws.services.cloudformation.model.DeleteStackRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AnnotatedSelectByExampleWithBLOBsMethodGenerator类代码示例发布时间:2022-05-22
下一篇:
Java CompressionTestStrategy类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap