Skip to content

Instantly share code, notes, and snippets.

@billy-bacon
Created November 21, 2013 17:58
Show Gist options
  • Save billy-bacon/7586390 to your computer and use it in GitHub Desktop.
Save billy-bacon/7586390 to your computer and use it in GitHub Desktop.
private CreatePlatformApplicationResult createPlatformApplication(String applicationName, Platform platform, String principal, String credential) {
CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest();
Map<String, String> attributes = new HashMap<String, String>();
attributes.put("PlatformPrincipal", principal == null ? "" : principal);
attributes.put("PlatformCredential", credential);
platformApplicationRequest.setAttributes(attributes);
platformApplicationRequest.setName(applicationName);
platformApplicationRequest.setPlatform(platform.name());
return snsClient.createPlatformApplication(platformApplicationRequest);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment