Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dogiogi25
Copy link

@Dogiogi25 Dogiogi25 commented Jun 30, 2025

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.

@github-actions github-actions bot added the Java-v2 This issue relates to the AWS SDK for Java V2 label Jun 30, 2025
@Dogiogi25 Dogiogi25 changed the title Adding basic SaaS code samples Java: Add basic SaaS code samples for CloudFront Jun 30, 2025
@ogiderek ogiderek force-pushed the saas-doc-updates branch 2 times, most recently from 2da9136 to ef2b492 Compare July 1, 2025 19:31
@scmacdon
Copy link
Contributor

scmacdon commented Jul 4, 2025

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;
Copy link
Contributor

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}}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue with main()

@Dogiogi25
Copy link
Author

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

@ogiderek ogiderek force-pushed the saas-doc-updates branch from 3c4b0e2 to 8d22239 Compare July 5, 2025 03:15
@Dogiogi25
Copy link
Author

And thanks, a new version of the commit has been pushed with the updated import list

Copy link
Collaborator

@tkhill-AWS tkhill-AWS left a 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)
);
Copy link
Collaborator

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 {
Copy link
Collaborator

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.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java-v2 This issue relates to the AWS SDK for Java V2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants