use of software.amazon.awssdk.services.codecommit.model.CodeCommitException in project aws-doc-sdk-examples by awsdocs.
the class DeleteRepository method deleteRepo.
// snippet-start:[codecommit.java2.del_repo.main]
public static void deleteRepo(CodeCommitClient codeCommitClient, String repoName) {
try {
DeleteRepositoryRequest deleteRepositoryRequest = DeleteRepositoryRequest.builder().repositoryName(repoName).build();
codeCommitClient.deleteRepository(deleteRepositoryRequest);
} catch (CodeCommitException e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
use of software.amazon.awssdk.services.codecommit.model.CodeCommitException in project aws-doc-sdk-examples by awsdocs.
the class GetRepository method getRepInformation.
// snippet-start:[codecommit.java2.get_repo.main]
public static void getRepInformation(CodeCommitClient codeCommitClient, String repoName) {
try {
GetRepositoryRequest repositoryRequest = GetRepositoryRequest.builder().repositoryName(repoName).build();
GetRepositoryResponse repositoryResponse = codeCommitClient.getRepository(repositoryRequest);
System.out.println("The ARN of the " + repoName + " is " + repositoryResponse.repositoryMetadata().arn());
} catch (CodeCommitException e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations