String projName = settings.getProject(); String bucketName = settings.getBucket();
System.out.println("Creating bucket, projName: "+projName+", bucketName: "+bucketName) ;
try {
@SuppressWarnings("unused")
Bucket createdBucket = storage.buckets().insert(projName,
new Bucket().setName(bucketName).setLocation("US")
).execute();
} catch (GoogleJsonResponseException e) {
GoogleJsonError error = e.getDetails();
if (error.getCode() == HTTP_CONFLICT
&& error.getMessage().contains("You already own this bucket.")) {
System.out.println("already exists");
} else {
System.out.println("Exception in tryCreateBucket: "+e);
throw e;
}
}
Output:
Creating bucket, projName: round-center-551, bucketName: 1904mybucketfoo
Exception in tryCreateBucket:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{ "code" : 403, "errors" : [ { "domain" : "global" "location" : "Authorization", "locationType" : "header", "message" : "The account for the specified project has been disabled.", "reason" : "accountDisabled" } ], "message" : "The account for the specified project has been disabled." } The account for the specified project has been disabled.
I have verified that Google Cloud Storage and Google Cloud Datastore API services are on. Any idea what should be done to enable the account?