-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Java: Add basic SaaS code samples for CloudFront #7501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
2da9136
to
ef2b492
Compare
I am reviewing this code |
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package com.example.cloudfront; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a lot of missing dependences.. This class does not have a main allowing users to run it either
.items(b3 -> b3 | ||
.domainName(originDomain) | ||
.id(originId) | ||
.originPath("/{{tenantName}}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue with main()
Regarding the main(), I was following our existing patterns here + writing them as utility-focused classes so I thought it wouldn't be necessary: https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/java_cloudfront_code_examples.html I can add if absolutely necessary, but I don't think it's necessary for this style of code snippet + scenario |
3c4b0e2
to
8d22239
Compare
And thanks, a new version of the commit has been pushed with the updated import list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration test is needed.
.value("myTenant")) | ||
.managedCertificateRequest(b3 -> b3 | ||
.validationTokenHost(ValidationTokenHost.SELF_HOSTED) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing parenthesis.
// snippet-end:[cloudfront.java2.createmultitenantdistribution.import] | ||
|
||
// snippet-start:[cloudfront.java2.createmultitenantdistribution.main] | ||
public class CreateMultiTenantDistribution { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two classes are named CreateMultiTenantDistribution
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks, fixed in the updated commit
This pull request adds code samples for new SaaS APIs in CloudFront for Javav2 SDK
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.