You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --apn-id global arg for PRM user-agent attribution
Add a new --apn-id global CLI argument that appends an AWS Partner
Network identifier to the User-Agent header in the format
APN_1.1/<value>$ as required by the PRM onboarding guide.
The user provides the full identifier including the type prefix
(e.g. pc_PRODUCTCODE for product codes, ra_PARTNERID for referral
agents) to support current and future APN ID types.
The value is resolved from (highest precedence first):
1. --apn-id CLI flag
2. AWS_APN_ID environment variable
3. apn_id setting in the shared config file profile
The handler is registered on the session-initialized event rather
than top-level-args-parsed to ensure the profile has been applied
to the session before reading config file values.
Validation uses a simple character set check (no regex) to avoid
any ReDoS concerns: 1-255 ASCII alphanumeric chars plus _ and -.
Fixes: #10476
Copy file name to clipboardExpand all lines: awscli/data/cli.json
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,10 @@
97
97
"enhanced"
98
98
],
99
99
"help": "<p>The formatting style for error output. By default, errors are displayed in enhanced format.</p>"
100
+
},
101
+
"apn-id": {
102
+
"dest": "apn_id",
103
+
"help": "<p>An AWS Partner Network identifier used for Partner Revenue Measurement (PRM) attribution. The value should include the type prefix (e.g. <code>pc_PRODUCTCODE</code> for product codes or <code>ra_PARTNERID</code> for referral agents). The value is appended to the User-Agent header of all requests as <code>APN_1.1/<value>$</code>. Overrides the <code>AWS_APN_ID</code> environment variable and the <code>apn_id</code> setting in the shared config file. See <a href=\"https://docs.aws.amazon.com/PRM/latest/aws-prm-onboarding-guide/user-agent-string.html\">the PRM onboarding guide</a> for the canonical format.</p>"
Copy file name to clipboardExpand all lines: awscli/examples/global_options.rst
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,3 +116,7 @@
116
116
* enhanced
117
117
118
118
119
+
``--apn-id`` (string)
120
+
121
+
An AWS Partner Network identifier used for Partner Revenue Measurement (PRM) attribution. The value should include the type prefix (e.g. ``pc_PRODUCTCODE`` for product codes or ``ra_PARTNERID`` for referral agents). The value is appended to the User-Agent header of all requests as ``APN_1.1/<value>$``. Overrides the ``AWS_APN_ID`` environment variable and the ``apn_id`` setting in the shared config file. See `the PRM onboarding guide <https://docs.aws.amazon.com/PRM/latest/aws-prm-onboarding-guide/user-agent-string.html>`__ for the canonical format.
0 commit comments