Skip to content

Commit

Permalink
Add validation pattern to S3KeyPrefix on the EnableLogging API
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sdk-dotnet-automation committed Oct 7, 2024
1 parent 64ef67a commit 885228b
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 46 deletions.
9 changes: 7 additions & 2 deletions generator/ServiceModels/redshift/redshift-2012-12-01.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -4509,7 +4509,7 @@
"members":{
"ClusterIdentifier":{"shape":"String"},
"BucketName":{"shape":"String"},
"S3KeyPrefix":{"shape":"String"},
"S3KeyPrefix":{"shape":"S3KeyPrefixValue"},
"LogDestinationType":{"shape":"LogDestinationType"},
"LogExports":{"shape":"LogTypeList"}
}
Expand Down Expand Up @@ -5551,7 +5551,7 @@
"members":{
"LoggingEnabled":{"shape":"Boolean"},
"BucketName":{"shape":"String"},
"S3KeyPrefix":{"shape":"String"},
"S3KeyPrefix":{"shape":"S3KeyPrefixValue"},
"LastSuccessfulDeliveryTime":{"shape":"TStamp"},
"LastFailureTime":{"shape":"TStamp"},
"LastFailureMessage":{"shape":"String"},
Expand Down Expand Up @@ -6789,6 +6789,11 @@
"Cluster":{"shape":"Cluster"}
}
},
"S3KeyPrefixValue":{
"type":"string",
"max":256,
"pattern":"[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*"
},
"SNSInvalidTopicFault":{
"type":"structure",
"members":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3027,6 +3027,13 @@
"refs": {
}
},
"S3KeyPrefixValue": {
"base": null,
"refs": {
"EnableLoggingMessage$S3KeyPrefix": "<p>The prefix applied to the log file names.</p> <p>Valid characters are any letter from any language, any whitespace character, any numeric character, and the following characters: underscore (<code>_</code>), period (<code>.</code>), colon (<code>:</code>), slash (<code>/</code>), equal (<code>=</code>), plus (<code>+</code>), backslash (<code>\\</code>), hyphen (<code>-</code>), at symbol (<code>@</code>).</p>",
"LoggingStatus$S3KeyPrefix": "<p>The prefix applied to the log file names.</p>"
}
},
"SNSInvalidTopicFault": {
"base": "<p>Amazon SNS has responded that there is a problem with the specified Amazon SNS topic.</p>",
"refs": {
Expand Down Expand Up @@ -3653,7 +3660,6 @@
"ElasticIpStatus$Status": "<p>The status of the elastic IP (EIP) address.</p>",
"EnableLoggingMessage$ClusterIdentifier": "<p>The identifier of the cluster on which logging is to be started.</p> <p>Example: <code>examplecluster</code> </p>",
"EnableLoggingMessage$BucketName": "<p>The name of an existing S3 bucket where the log files are to be stored.</p> <p>Constraints:</p> <ul> <li> <p>Must be in the same region as the cluster</p> </li> <li> <p>The cluster must have read bucket and put object permissions</p> </li> </ul>",
"EnableLoggingMessage$S3KeyPrefix": "<p>The prefix applied to the log file names.</p> <p>Constraints:</p> <ul> <li> <p>Cannot exceed 512 characters</p> </li> <li> <p>Cannot contain spaces( ), double quotes (\"), single quotes ('), a backslash (\\), or control characters. The hexadecimal codes for invalid characters are: </p> <ul> <li> <p>x00 to x20</p> </li> <li> <p>x22</p> </li> <li> <p>x27</p> </li> <li> <p>x5c</p> </li> <li> <p>x7f or larger</p> </li> </ul> </li> </ul>",
"EnableSnapshotCopyMessage$ClusterIdentifier": "<p>The unique identifier of the source cluster to copy snapshots from.</p> <p>Constraints: Must be the valid name of an existing cluster that does not already have cross-region snapshot copy enabled.</p>",
"EnableSnapshotCopyMessage$DestinationRegion": "<p>The destination Amazon Web Services Region that you want to copy snapshots to.</p> <p>Constraints: Must be the name of a valid Amazon Web Services Region. For more information, see <a href=\"https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region\">Regions and Endpoints</a> in the Amazon Web Services General Reference. </p>",
"EnableSnapshotCopyMessage$SnapshotCopyGrantName": "<p>The name of the snapshot copy grant to use when snapshots of an Amazon Web Services KMS-encrypted cluster are copied to the destination region.</p>",
Expand Down Expand Up @@ -3732,7 +3738,6 @@
"ListRecommendationsResult$Marker": "<p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the Marker parameter and retrying the command. If the Marker field is empty, all response records have been retrieved for the request. </p>",
"LogTypeList$member": null,
"LoggingStatus$BucketName": "<p>The name of the S3 bucket where the log files are stored.</p>",
"LoggingStatus$S3KeyPrefix": "<p>The prefix applied to the log file names.</p>",
"LoggingStatus$LastFailureMessage": "<p>The message indicating that logs failed to be delivered.</p>",
"MaintenanceTrack$MaintenanceTrackName": "<p>The name of the maintenance track. Possible values are <code>current</code> and <code>trailing</code>.</p>",
"MaintenanceTrack$DatabaseVersion": "<p>The version number for the cluster release.</p>",
Expand Down
11 changes: 8 additions & 3 deletions generator/ServiceModels/redshift/redshift-2012-12-01.normal.json
Original file line number Diff line number Diff line change
Expand Up @@ -6420,8 +6420,8 @@
"documentation":"<p>The name of an existing S3 bucket where the log files are to be stored.</p> <p>Constraints:</p> <ul> <li> <p>Must be in the same region as the cluster</p> </li> <li> <p>The cluster must have read bucket and put object permissions</p> </li> </ul>"
},
"S3KeyPrefix":{
"shape":"String",
"documentation":"<p>The prefix applied to the log file names.</p> <p>Constraints:</p> <ul> <li> <p>Cannot exceed 512 characters</p> </li> <li> <p>Cannot contain spaces( ), double quotes (\"), single quotes ('), a backslash (\\), or control characters. The hexadecimal codes for invalid characters are: </p> <ul> <li> <p>x00 to x20</p> </li> <li> <p>x22</p> </li> <li> <p>x27</p> </li> <li> <p>x5c</p> </li> <li> <p>x7f or larger</p> </li> </ul> </li> </ul>"
"shape":"S3KeyPrefixValue",
"documentation":"<p>The prefix applied to the log file names.</p> <p>Valid characters are any letter from any language, any whitespace character, any numeric character, and the following characters: underscore (<code>_</code>), period (<code>.</code>), colon (<code>:</code>), slash (<code>/</code>), equal (<code>=</code>), plus (<code>+</code>), backslash (<code>\\</code>), hyphen (<code>-</code>), at symbol (<code>@</code>).</p>"
},
"LogDestinationType":{
"shape":"LogDestinationType",
Expand Down Expand Up @@ -7916,7 +7916,7 @@
"documentation":"<p>The name of the S3 bucket where the log files are stored.</p>"
},
"S3KeyPrefix":{
"shape":"String",
"shape":"S3KeyPrefixValue",
"documentation":"<p>The prefix applied to the log file names.</p>"
},
"LastSuccessfulDeliveryTime":{
Expand Down Expand Up @@ -10201,6 +10201,11 @@
"Cluster":{"shape":"Cluster"}
}
},
"S3KeyPrefixValue":{
"type":"string",
"max":256,
"pattern":"[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*"
},
"SNSInvalidTopicFault":{
"type":"structure",
"members":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,8 @@
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.DescribeLoggingStatusResponse.S3KeyPrefix</property>
<max>2147483647</max>
<max>256</max>
<pattern>[\p{L}\p{Z}\p{N}_.:/=+\-@]*</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.DescribeNodeConfigurationOptionsRequest.ClusterIdentifier</property>
Expand Down Expand Up @@ -1274,7 +1275,8 @@
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.DisableLoggingResponse.S3KeyPrefix</property>
<max>2147483647</max>
<max>256</max>
<pattern>[\p{L}\p{Z}\p{N}_.:/=+\-@]*</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.DisableSnapshotCopyRequest.ClusterIdentifier</property>
Expand Down Expand Up @@ -1314,7 +1316,8 @@
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.EnableLoggingRequest.S3KeyPrefix</property>
<max>2147483647</max>
<max>256</max>
<pattern>[\p{L}\p{Z}\p{N}_.:/=+\-@]*</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.EnableLoggingResponse.BucketName</property>
Expand All @@ -1326,7 +1329,8 @@
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.EnableLoggingResponse.S3KeyPrefix</property>
<max>2147483647</max>
<max>256</max>
<pattern>[\p{L}\p{Z}\p{N}_.:/=+\-@]*</pattern>
</property-value-rule>
<property-value-rule>
<property>Amazon.Redshift.Model.EnableSnapshotCopyRequest.ClusterIdentifier</property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ internal bool IsSetLoggingEnabled()
/// The prefix applied to the log file names.
/// </para>
/// </summary>
[AWSProperty(Max=2147483647)]
[AWSProperty(Max=256)]
public string S3KeyPrefix
{
get { return this._s3KeyPrefix; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ internal bool IsSetLoggingEnabled()
/// The prefix applied to the log file names.
/// </para>
/// </summary>
[AWSProperty(Max=2147483647)]
[AWSProperty(Max=256)]
public string S3KeyPrefix
{
get { return this._s3KeyPrefix; }
Expand Down
37 changes: 5 additions & 32 deletions sdk/src/Services/Redshift/Generated/Model/EnableLoggingRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,40 +141,13 @@ internal bool IsSetLogExports()
/// </para>
///
/// <para>
/// Constraints:
/// </para>
/// <ul> <li>
/// <para>
/// Cannot exceed 512 characters
/// </para>
/// </li> <li>
/// <para>
/// Cannot contain spaces( ), double quotes ("), single quotes ('), a backslash (\), or
/// control characters. The hexadecimal codes for invalid characters are:
/// </para>
/// <ul> <li>
/// <para>
/// x00 to x20
/// Valid characters are any letter from any language, any whitespace character, any numeric
/// character, and the following characters: underscore (<c>_</c>), period (<c>.</c>),
/// colon (<c>:</c>), slash (<c>/</c>), equal (<c>=</c>), plus (<c>+</c>), backslash (<c>\</c>),
/// hyphen (<c>-</c>), at symbol (<c>@</c>).
/// </para>
/// </li> <li>
/// <para>
/// x22
/// </para>
/// </li> <li>
/// <para>
/// x27
/// </para>
/// </li> <li>
/// <para>
/// x5c
/// </para>
/// </li> <li>
/// <para>
/// x7f or larger
/// </para>
/// </li> </ul> </li> </ul>
/// </summary>
[AWSProperty(Max=2147483647)]
[AWSProperty(Max=256)]
public string S3KeyPrefix
{
get { return this._s3KeyPrefix; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ internal bool IsSetLoggingEnabled()
/// The prefix applied to the log file names.
/// </para>
/// </summary>
[AWSProperty(Max=2147483647)]
[AWSProperty(Max=256)]
public string S3KeyPrefix
{
get { return this._s3KeyPrefix; }
Expand Down

0 comments on commit 885228b

Please sign in to comment.