AWS Security ChangesHomeSearch

AWS marketplace: Add renewal term and endTimeBehavior checks to AmendSaaSContract example

Service: marketplace · 2026-09-27 · Documentation low

File: marketplace/latest/developerguide/marketplace-agreement_example_marketplace-agreement_AmendSaaSContractRenewalTerm_section.md

Summary

Updates the AmendSaaSContractRenewalTerm code sample (Java, JavaScript, Python) to import/use new helper functions printRenewalTerm and printEndTimeBehavior, and adds explanatory comments about lockoutPeriod and endTimeBehavior governing agreement renewal. Also fixes a Java import path.

Security assessment

The change only adds business-logic visibility into agreement renewal terms (lockoutPeriod, endTimeBehavior) and refactors imports/helpers in a sample. It does not address any vulnerability, credential, encryption, or access-control concern.

Evidence

+            AgreementApiUtils.printRenewalTerm(

Diff

diff --git a/marketplace/latest/developerguide/marketplace-agreement_example_marketplace-agreement_AmendSaaSContractRenewalTerm_section.md b/marketplace/latest/developerguide/marketplace-agreement_example_marketplace-agreement_AmendSaaSContractRenewalTerm_section.md
index 08e5a550d..b9622be89 100644
--- a//marketplace/latest/developerguide/marketplace-agreement_example_marketplace-agreement_AmendSaaSContractRenewalTerm_section.md
+++ b//marketplace/latest/developerguide/marketplace-agreement_example_marketplace-agreement_AmendSaaSContractRenewalTerm_section.md
@@ -40 +40 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    import utils.AgreementApiUtils;
+    import com.example.awsmarketplace.agreementapi.buyer.utils.AgreementApiUtils;
@@ -49,0 +50,8 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+     * <p>The {@code lockoutPeriod} on the renewal term is what constrains this amendment. It is the
+     * renewal decision deadline, measured back from the end date of the agreement, and once it passes
+     * neither party can change whether the agreement renews. The sample reads the term with
+     * {@code GetAgreementTerms} before amending so that deadline is visible. It also reads
+     * {@code endTimeBehavior} from {@code DescribeAgreement} before and after the amendment, because
+     * {@code endTimeBehavior} is what determines whether the agreement renews, not
+     * {@code enableAutoRenew} on its own.
+     *
@@ -93,0 +102 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+         * 4. Confirm the change by reading endTimeBehavior before and after the amendment.
@@ -152,0 +162,6 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+            AgreementApiUtils.printRenewalTerm(
+                    marketplaceAgreementClient, acceptAgreementRequestResponse.agreementId());
+            AgreementApiUtils.printEndTimeBehavior(marketplaceAgreementClient,
+                                                   acceptAgreementRequestResponse.agreementId(),
+                                                   "Before amendment");
+    
@@ -153,0 +169,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+            // The lockoutPeriod printed above is the renewal decision deadline: once it passes,
+            // enableAutoRenew can no longer be changed.
@@ -180,0 +198,3 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+    
+            AgreementApiUtils.printEndTimeBehavior(
+                    marketplaceAgreementClient, aarResponse.agreementId(), "After amendment");
@@ -207 +227,7 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    const { generateClientToken, formatOutput, pollUntilEntitlementsAvailable } = require("./utils/AgreementApiUtils");
+    const {
+        generateClientToken,
+        formatOutput,
+        pollUntilEntitlementsAvailable,
+        printRenewalTerm,
+        printEndTimeBehavior,
+    } = require("./utils/AgreementApiUtils");
@@ -216,0 +243,7 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+     * The lockoutPeriod on the renewal term is what constrains this amendment. It is the renewal
+     * decision deadline, measured back from the end date of the agreement, and once it passes neither
+     * party can change whether the agreement renews. The sample reads the term with GetAgreementTerms
+     * before amending so that deadline is visible. It also reads endTimeBehavior from DescribeAgreement
+     * before and after the amendment, because endTimeBehavior is what determines whether the agreement
+     * renews, not enableAutoRenew on its own.
+     *
@@ -253,0 +287 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+     * 4. Confirm the change by reading endTimeBehavior before and after the amendment.
@@ -306,0 +341,3 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+        await printRenewalTerm(client, acceptAgreementRequestResponse.agreementId);
+        await printEndTimeBehavior(client, acceptAgreementRequestResponse.agreementId, "Before amendment");
+    
@@ -307,0 +345,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+        // The lockoutPeriod printed above is the renewal decision deadline: once it passes,
+        // enableAutoRenew can no longer be changed.
@@ -333,0 +373,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+    
+        await printEndTimeBehavior(client, aarResponse.agreementId, "After amendment");
@@ -363,0 +405,7 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+    The lockoutPeriod on the renewal term is what constrains this amendment. It is the renewal decision
+    deadline, measured back from the end date of the agreement, and once it passes neither party can
+    change whether the agreement renews. The sample reads the term with GetAgreementTerms before
+    amending so that deadline is visible. It also reads endTimeBehavior from DescribeAgreement before
+    and after the amendment, because endTimeBehavior is what determines whether the agreement renews,
+    not enableAutoRenew on its own.
+    
@@ -377,0 +426,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+        print_end_time_behavior,
+        print_renewal_term,
@@ -413,0 +464 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+            4. Confirm the change by reading endTimeBehavior before and after the amendment.
@@ -467,0 +519,3 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+            print_renewal_term(client, agreement_id)
+            print_end_time_behavior(client, agreement_id, "Before amendment")
+    
@@ -468,0 +523,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+            # The lockoutPeriod printed above is the renewal decision deadline: once it passes,
+            # enableAutoRenew can no longer be changed.
@@ -491,0 +548,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+            print_end_time_behavior(client, aar_response["agreementId"], "After amendment")
+