Resolve an Amazon Web Services Support case using an Amazon SDK - Amazon Web Services Support
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Resolve an Amazon Web Services Support case using an Amazon SDK

The following code examples show how to resolve an Amazon Web Services Support case.

.NET
Amazon SDK for .NET
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

/// <summary> /// Resolve a support case by caseId. /// </summary> /// <param name="caseId">Id for the support case.</param> /// <returns>The final status of the case after resolving.</returns> public async Task<string> ResolveCase(string caseId) { var response = await _amazonSupport.ResolveCaseAsync( new ResolveCaseRequest() { CaseId = caseId }); return response.FinalCaseStatus; }
  • For API details, see ResolveCase in Amazon SDK for .NET API Reference.

Java
SDK for Java 2.x
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

public static void resolveSupportCase(SupportClient supportClient, String caseId) { try { ResolveCaseRequest caseRequest = ResolveCaseRequest.builder() .caseId(caseId) .build(); ResolveCaseResponse response = supportClient.resolveCase(caseRequest); System.out.println("The status of case "+caseId +" is "+response.finalCaseStatus()); } catch (SupportException e) { System.out.println(e.getLocalizedMessage()); System.exit(1); } }
  • For API details, see ResolveCase in Amazon SDK for Java 2.x API Reference.

JavaScript
SDK for JavaScript V3
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

import { ResolveCaseCommand } from "@aws-sdk/client-support"; import { client } from "../libs/client.js"; const main = async () => { try { const response = await client.send( new ResolveCaseCommand({ caseId: "CASE_ID", }) ); console.log(response.finalCaseStatus); return response; } catch (err) { console.error(err); } };
  • For API details, see ResolveCase in Amazon SDK for JavaScript API Reference.

Kotlin
SDK for Kotlin
Note

This is prerelease documentation for a feature in preview release. It is subject to change.

Note

There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

suspend fun resolveSupportCase(caseIdVal: String) { val caseRequest = ResolveCaseRequest { caseId = caseIdVal } SupportClient { region = "us-west-2" }.use { supportClient -> val response = supportClient.resolveCase(caseRequest) println("The status of case $caseIdVal is ${response.finalCaseStatus}") } }
  • For API details, see ResolveCase in Amazon SDK for Kotlin API reference.

For a complete list of Amazon SDK developer guides and code examples, see Using Amazon Web Services Support with an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.