Skip to content

Commit b785e3e

Browse files
committed
lint
1 parent 6ee36f6 commit b785e3e

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

integration/resources/templates/single/basic_function_with_function_url_dual_auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Resources:
2121
MaxAge: 10
2222
Outputs:
2323
FunctionUrl:
24-
Description: "URL of the Lambda function"
24+
Description: URL of the Lambda function
2525
Value: !GetAtt MyLambdaFunctionUrl.FunctionUrl
2626
Metadata:
2727
SamTransformTest: true

integration/resources/templates/single/basic_function_with_function_url_with_autopuplishalias_dual_auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Resources:
2222
MaxAge: 10
2323
Outputs:
2424
FunctionUrl:
25-
Description: "URL of the Lambda function alias"
25+
Description: URL of the Lambda function alias
2626
Value: !GetAtt MyLambdaFunctionUrl.FunctionUrl
2727
Metadata:
2828
SamTransformTest: true

integration/single/test_basic_function.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def test_basic_function_with_url_config(self, file_name, qualifier):
130130
self.assertEqual(function_url_config["Cors"], cors_config)
131131
self._assert_invoke(lambda_client, function_name, qualifier, 200)
132132

133-
134133
@parameterized.expand(
135134
[
136135
("single/basic_function_with_function_url_dual_auth", None),
@@ -149,59 +148,55 @@ def test_basic_function_with_url_dual_auth(self, file_name, qualifier):
149148

150149
# Get Lambda permissions
151150
lambda_permissions = self.get_stack_resources("AWS::Lambda::Permission")
152-
151+
153152
# Verify we have exactly 2 permissions
154153
self.assertEqual(len(lambda_permissions), 2, "Expected exactly 2 Lambda permissions")
155-
154+
156155
# Check for the expected permission logical IDs
157156
invoke_function_url_permission = None
158157
invoke_permission = None
159-
158+
160159
for permission in lambda_permissions:
161160
logical_id = permission["LogicalResourceId"]
162161
if "MyLambdaFunctionUrlPublicPermissions" in logical_id:
163162
invoke_function_url_permission = permission
164163
elif "MyLambdaFunctionURLInvokeAllowPublicAccess" in logical_id:
165164
invoke_permission = permission
166-
165+
167166
# Verify both permissions exist
168167
self.assertIsNotNone(invoke_function_url_permission, "Expected MyLambdaFunctionUrlPublicPermissions to exist")
169168
self.assertIsNotNone(invoke_permission, "Expected MyLambdaFunctionURLInvokeAllowPublicAccess to exist")
170-
169+
171170
# Get the function name and URL
172171
function_name = self.get_physical_id_by_type("AWS::Lambda::Function")
173172
lambda_client = self.client_provider.lambda_client
174-
175173

176-
177174
# Get the function URL configuration to verify auth type
178175
function_url_config = (
179176
lambda_client.get_function_url_config(FunctionName=function_name, Qualifier=qualifier)
180177
if qualifier
181178
else lambda_client.get_function_url_config(FunctionName=function_name)
182179
)
183-
180+
184181
# Verify the auth type is NONE
185182
self.assertEqual(function_url_config["AuthType"], "NONE", "Expected AuthType to be NONE")
186-
183+
187184
# Get the template to check for InvokedViaFunctionUrl property
188185
cfn_client = self.client_provider.cfn_client
189186
template = cfn_client.get_template(StackName=self.stack_name)
190187
template_body = template["TemplateBody"]
191-
188+
192189
# Check if the InvokePermission has InvokedViaFunctionUrl: True
193190
# This is a bit hacky but we don't have direct access to the resource properties
194191
# We're checking if the string representation of the template contains this property
195192
template_str = str(template_body)
196-
self.assertIn("InvokedViaFunctionUrl", template_str,
197-
"Expected InvokedViaFunctionUrl property in the template")
198-
193+
self.assertIn("InvokedViaFunctionUrl", template_str, "Expected InvokedViaFunctionUrl property in the template")
194+
199195
# Get the function URL from stack outputs
200196
function_url = self.get_stack_output("FunctionUrl")["OutputValue"]
201197
# Invoke the function URL and verify the response
202198
self._verify_get_request(function_url, self.FUNCTION_OUTPUT)
203199

204-
205200
@skipIf(current_region_does_not_support([CODE_DEPLOY]), "CodeDeploy is not supported in this testing region")
206201
def test_function_with_deployment_preference_alarms_intrinsic_if(self):
207202
self.create_and_verify_stack("single/function_with_deployment_preference_alarms_intrinsic_if")

samtranslator/schema/schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41962,7 +41962,7 @@
4196241962
"type": "string"
4196341963
},
4196441964
"Type": {
41965-
"markdownDescription": "The type of webhook filter. There are nine webhook filter types: `EVENT` , `ACTOR_ACCOUNT_ID` , `HEAD_REF` , `BASE_REF` , `FILE_PATH` , `COMMIT_MESSAGE` , `TAG_NAME` , `RELEASE_NAME` , and `WORKFLOW_NAME` .\n\n- EVENT\n\n- A webhook event triggers a build when the provided `pattern` matches one of nine event types: `PUSH` , `PULL_REQUEST_CREATED` , `PULL_REQUEST_UPDATED` , `PULL_REQUEST_CLOSED` , `PULL_REQUEST_REOPENED` , `PULL_REQUEST_MERGED` , `RELEASED` , `PRERELEASED` , and `WORKFLOW_JOB_QUEUED` . The `EVENT` patterns are specified as a comma-separated string. For example, `PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED` filters all push, pull request created, and pull request updated events.\n\n> Types `PULL_REQUEST_REOPENED` and `WORKFLOW_JOB_QUEUED` work with GitHub and GitHub Enterprise only. Types `RELEASED` and `PRERELEASED` work with GitHub only.\n- ACTOR_ACCOUNT_ID\n\n- A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression `pattern` .\n- HEAD_REF\n\n- A webhook event triggers a build when the head reference matches the regular expression `pattern` . For example, `refs/heads/branch-name` and `refs/tags/tag-name` .\n\n> Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.\n- BASE_REF\n\n- A webhook event triggers a build when the base reference matches the regular expression `pattern` . For example, `refs/heads/branch-name` .\n\n> Works with pull request events only.\n- FILE_PATH\n\n- A webhook triggers a build when the path of a changed file matches the regular expression `pattern` .\n\n> Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.\n- COMMIT_MESSAGE\n\n- A webhook triggers a build when the head commit message matches the regular expression `pattern` .\n\n> Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.\n- TAG_NAME\n\n- A webhook triggers a build when the tag name of the release matches the regular expression `pattern` .\n\n> Works with `RELEASED` and `PRERELEASED` events only.\n- RELEASE_NAME\n\n- A webhook triggers a build when the release name matches the regular expression `pattern` .\n\n> Works with `RELEASED` and `PRERELEASED` events only.\n- REPOSITORY_NAME\n\n- A webhook triggers a build when the repository name matches the regular expression pattern.\n\n> Works with GitHub global or organization webhooks only.\n- WORKFLOW_NAME\n\n- A webhook triggers a build when the workflow name matches the regular expression `pattern` .\n\n> Works with `WORKFLOW_JOB_QUEUED` events only. > For CodeBuild-hosted Buildkite runner builds, WORKFLOW_NAME filters will filter by pipeline name.",
41965+
"markdownDescription": "The type of webhook filter. There are 11 webhook filter types: `EVENT` , `ACTOR_ACCOUNT_ID` , `HEAD_REF` , `BASE_REF` , `FILE_PATH` , `COMMIT_MESSAGE` , `TAG_NAME` , `RELEASE_NAME` , `REPOSITORY_NAME` , `ORGANIZATION_NAME` , and `WORKFLOW_NAME` .\n\n- EVENT\n\n- A webhook event triggers a build when the provided `pattern` matches one of nine event types: `PUSH` , `PULL_REQUEST_CREATED` , `PULL_REQUEST_UPDATED` , `PULL_REQUEST_CLOSED` , `PULL_REQUEST_REOPENED` , `PULL_REQUEST_MERGED` , `RELEASED` , `PRERELEASED` , and `WORKFLOW_JOB_QUEUED` . The `EVENT` patterns are specified as a comma-separated string. For example, `PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED` filters all push, pull request created, and pull request updated events.\n\n> Types `PULL_REQUEST_REOPENED` and `WORKFLOW_JOB_QUEUED` work with GitHub and GitHub Enterprise only. Types `RELEASED` and `PRERELEASED` work with GitHub only.\n- ACTOR_ACCOUNT_ID\n\n- A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression `pattern` .\n- HEAD_REF\n\n- A webhook event triggers a build when the head reference matches the regular expression `pattern` . For example, `refs/heads/branch-name` and `refs/tags/tag-name` .\n\n> Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.\n- BASE_REF\n\n- A webhook event triggers a build when the base reference matches the regular expression `pattern` . For example, `refs/heads/branch-name` .\n\n> Works with pull request events only.\n- FILE_PATH\n\n- A webhook triggers a build when the path of a changed file matches the regular expression `pattern` .\n\n> Works with push and pull request events only.\n- COMMIT_MESSAGE\n\n- A webhook triggers a build when the head commit message matches the regular expression `pattern` .\n\n> Works with push and pull request events only.\n- TAG_NAME\n\n- A webhook triggers a build when the tag name of the release matches the regular expression `pattern` .\n\n> Works with `RELEASED` and `PRERELEASED` events only.\n- RELEASE_NAME\n\n- A webhook triggers a build when the release name matches the regular expression `pattern` .\n\n> Works with `RELEASED` and `PRERELEASED` events only.\n- REPOSITORY_NAME\n\n- A webhook triggers a build when the repository name matches the regular expression `pattern` .\n\n> Works with GitHub global or organization webhooks only.\n- ORGANIZATION_NAME\n\n- A webhook triggers a build when the organization name matches the regular expression `pattern` .\n\n> Works with GitHub global webhooks only.\n- WORKFLOW_NAME\n\n- A webhook triggers a build when the workflow name matches the regular expression `pattern` .\n\n> Works with `WORKFLOW_JOB_QUEUED` events only. > For CodeBuild-hosted Buildkite runner builds, WORKFLOW_NAME filters will filter by pipeline name.",
4196641966
"title": "Type",
4196741967
"type": "string"
4196841968
}
@@ -62816,7 +62816,7 @@
6281662816
"type": "string"
6281762817
},
6281862818
"ServerHostname": {
62819-
"markdownDescription": "Specifies the domain name or IP address of the SMB file server that your DataSync agent will mount.\n\nRemember the following when configuring this parameter:\n\n- You can't specify an IP version 6 (IPv6) address.\n- If you're using Kerberos authentication, you must specify a domain name.",
62819+
"markdownDescription": "Specifies the domain name or IP address of the SMB file server that your DataSync agent connects to.\n\nRemember the following when configuring this parameter:\n\n- You can't specify an IP version 6 (IPv6) address.\n- If you're using Kerberos authentication, you must specify a domain name.",
6282062820
"title": "ServerHostname",
6282162821
"type": "string"
6282262822
},
@@ -93223,7 +93223,7 @@
9322393223
"type": "boolean"
9322493224
},
9322593225
"Mode": {
93226-
"markdownDescription": "The client certificate handling method. The possible values are `off` , `passthrough` , and `verify` . The default value is `off` .",
93226+
"markdownDescription": "The client certificate handling method. Options are `off` , `passthrough` or `verify` . The default value is `off` .",
9322793227
"title": "Mode",
9322893228
"type": "string"
9322993229
},

0 commit comments

Comments
 (0)