newrelic-lambda-cli 0.9.11__py2.py3-none-any.whl → 0.9.12__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- newrelic_lambda_cli/api.py +0 -2
- newrelic_lambda_cli/cli/layers.py +0 -6
- newrelic_lambda_cli/layers.py +14 -12
- {newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/METADATA +1 -1
- {newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/RECORD +9 -9
- {newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/WHEEL +0 -0
- {newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/entry_points.txt +0 -0
- {newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/licenses/LICENSE +0 -0
- {newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/top_level.txt +0 -0
newrelic_lambda_cli/api.py
CHANGED
|
@@ -362,8 +362,6 @@ def validate_gql_credentials(input):
|
|
|
362
362
|
|
|
363
363
|
def retrieve_license_key(gql):
|
|
364
364
|
global __cached_license_key
|
|
365
|
-
if gql is None and input and getattr(input, "nr_ingest_key", None):
|
|
366
|
-
return input.nr_ingest_key
|
|
367
365
|
|
|
368
366
|
if __cached_license_key:
|
|
369
367
|
return __cached_license_key
|
|
@@ -155,12 +155,6 @@ def register(group):
|
|
|
155
155
|
@click.pass_context
|
|
156
156
|
def install(ctx, **kwargs):
|
|
157
157
|
"""Install New Relic AWS Lambda Layers"""
|
|
158
|
-
|
|
159
|
-
if "nr_ingest_key" not in kwargs:
|
|
160
|
-
kwargs["nr_ingest_key"] = None
|
|
161
|
-
if "nr_api_key" not in kwargs:
|
|
162
|
-
kwargs["nr_api_key"] = None
|
|
163
|
-
|
|
164
158
|
input = LayerInstall(session=None, verbose=ctx.obj["VERBOSE"], **kwargs)
|
|
165
159
|
input = input._replace(
|
|
166
160
|
session=boto3.Session(
|
newrelic_lambda_cli/layers.py
CHANGED
|
@@ -267,10 +267,10 @@ def _add_new_relic(input, config, nr_license_key):
|
|
|
267
267
|
update_kwargs["Environment"]["Variables"][
|
|
268
268
|
"NEW_RELIC_LICENSE_KEY"
|
|
269
269
|
] = nr_license_key
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
else:
|
|
271
|
+
update_kwargs["Environment"]["Variables"][
|
|
272
|
+
"NEW_RELIC_LAMBDA_EXTENSION_ENABLED"
|
|
273
|
+
] = "false"
|
|
274
274
|
|
|
275
275
|
if "dotnet" in runtime:
|
|
276
276
|
update_kwargs["Environment"]["Variables"]["CORECLR_ENABLE_PROFILING"] = "1"
|
|
@@ -300,10 +300,6 @@ def install(input, function_arn):
|
|
|
300
300
|
raise click.UsageError(
|
|
301
301
|
"Please provide either the --nr-api-key or the --nr-ingest-key flag, but not both."
|
|
302
302
|
)
|
|
303
|
-
if not input.nr_api_key and not input.nr_ingest_key:
|
|
304
|
-
raise click.UsageError(
|
|
305
|
-
"Please provide either the --nr-api-key or the --nr-ingest-key flag."
|
|
306
|
-
)
|
|
307
303
|
assert isinstance(input, LayerInstall)
|
|
308
304
|
|
|
309
305
|
client = input.session.client("lambda")
|
|
@@ -323,6 +319,7 @@ def install(input, function_arn):
|
|
|
323
319
|
and nr_account_id
|
|
324
320
|
and nr_account_id != str(input.nr_account_id)
|
|
325
321
|
and not input.nr_api_key
|
|
322
|
+
and not input.nr_ingest_key
|
|
326
323
|
):
|
|
327
324
|
raise click.UsageError(
|
|
328
325
|
"A managed secret already exists in this region for New Relic account {0}. "
|
|
@@ -335,7 +332,12 @@ def install(input, function_arn):
|
|
|
335
332
|
nr_account_id, input.nr_account_id, utils.NR_DOCS_ACT_LINKING_URL
|
|
336
333
|
)
|
|
337
334
|
)
|
|
338
|
-
if
|
|
335
|
+
if (
|
|
336
|
+
input.enable_extension
|
|
337
|
+
and not policy_arn
|
|
338
|
+
and not input.nr_api_key
|
|
339
|
+
and not input.nr_ingest_key
|
|
340
|
+
):
|
|
339
341
|
raise click.UsageError(
|
|
340
342
|
"In order to use `--enable-extension`, you must first run "
|
|
341
343
|
"`newrelic-lambda integrations install` with the "
|
|
@@ -347,7 +349,9 @@ def install(input, function_arn):
|
|
|
347
349
|
)
|
|
348
350
|
|
|
349
351
|
nr_license_key = None
|
|
350
|
-
if
|
|
352
|
+
if input.nr_ingest_key:
|
|
353
|
+
nr_license_key = input.nr_ingest_key
|
|
354
|
+
elif (
|
|
351
355
|
not policy_arn
|
|
352
356
|
or nr_account_id != str(input.nr_account_id)
|
|
353
357
|
and input.nr_api_key
|
|
@@ -355,8 +359,6 @@ def install(input, function_arn):
|
|
|
355
359
|
):
|
|
356
360
|
gql = api.validate_gql_credentials(input)
|
|
357
361
|
nr_license_key = api.retrieve_license_key(gql)
|
|
358
|
-
elif input.nr_ingest_key:
|
|
359
|
-
nr_license_key = input.nr_ingest_key
|
|
360
362
|
|
|
361
363
|
update_kwargs = _add_new_relic(input, config, nr_license_key)
|
|
362
364
|
if isinstance(update_kwargs, bool):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
newrelic_lambda_cli/__init__.py,sha256=u4cy7hwbrNjK3xtldGQD_51aoNgSqGQ3IzFYsuvaIM4,149
|
|
2
|
-
newrelic_lambda_cli/api.py,sha256
|
|
2
|
+
newrelic_lambda_cli/api.py,sha256=-lRsWBNO0YWV2yHp-zUbS2vs4AYJCn9yJngOrKAvmuo,15133
|
|
3
3
|
newrelic_lambda_cli/cliutils.py,sha256=XDtvTlgbf2uVg01yCJrfJmmgxbF0nIL9x58ETyvefk8,685
|
|
4
4
|
newrelic_lambda_cli/functions.py,sha256=p57ZUw424BaSUA_Gw8DrYsJOYKROEHEaXgARadqwcP0,2800
|
|
5
5
|
newrelic_lambda_cli/integrations.py,sha256=r0gxfEqVHTGu3xbr4dOCDwm0-Yhoz3KntfeQRWvoWrQ,31266
|
|
6
|
-
newrelic_lambda_cli/layers.py,sha256=
|
|
6
|
+
newrelic_lambda_cli/layers.py,sha256=VKfZxFmyHF85VeTV2ju9GdJlUZUolh-zFwIH_nf05lI,19667
|
|
7
7
|
newrelic_lambda_cli/otel_ingestions.py,sha256=vi1Mlfc9nRvRWV7STwK7fDXZGozG8ufKohmpHcaWGic,9250
|
|
8
8
|
newrelic_lambda_cli/permissions.py,sha256=H7v5IMpKaJIWC4Dff2YcTis4BKAAFIJr9IHWUj1LnF4,9093
|
|
9
9
|
newrelic_lambda_cli/subscriptions.py,sha256=-BYkltqiDLdmhUB_Ot4w-5vvrKcQC6aHcTBLl1mlUlI,9564
|
|
@@ -13,15 +13,15 @@ newrelic_lambda_cli/cli/__init__.py,sha256=FciF2RVqQbpMKqEiN8qjO6qmdLB6Yv8LyyyPY
|
|
|
13
13
|
newrelic_lambda_cli/cli/decorators.py,sha256=a3agkVfy8omkUSL4aKblwSX95xtxYOGASULDYcJDPHk,1786
|
|
14
14
|
newrelic_lambda_cli/cli/functions.py,sha256=RSh2Cowe1_oQup8q5YRidp03z-BITo2uzvDh4zvLr4I,2601
|
|
15
15
|
newrelic_lambda_cli/cli/integrations.py,sha256=aQAWcCCU2kBmbF8fLKwKB9bzSY0uipvnojajjTkhqEs,10461
|
|
16
|
-
newrelic_lambda_cli/cli/layers.py,sha256=
|
|
16
|
+
newrelic_lambda_cli/cli/layers.py,sha256=LM_vMHcfFAjSCtnaH34P0Jn1ixY07s93EzOBsEgRQK0,7584
|
|
17
17
|
newrelic_lambda_cli/cli/otel_ingestions.py,sha256=4rTm9iYUo2qdMeqxJSrYLCA6ZXHy5bJnjDn9x54pCYc,6096
|
|
18
18
|
newrelic_lambda_cli/cli/subscriptions.py,sha256=bUupv5iv3mUkC8t31nnI3BahoKxDnUJ8Rgq4QHJcFNU,5890
|
|
19
19
|
newrelic_lambda_cli/templates/import-template.yaml,sha256=0r1yeoqpnqtEMggWomALkPG10NiANPWWBqz03rChch8,3771
|
|
20
20
|
newrelic_lambda_cli/templates/license-key-secret.yaml,sha256=ZldQaLXsyF1K2I4X_AsLdH7kRmLkPUYI3talmhqQyHg,1849
|
|
21
21
|
newrelic_lambda_cli/templates/nr-lambda-integration-role.yaml,sha256=s7T73B_k-mAwgzJrD2xn8YGUNgn2E1V7Exifrl81ViU,2874
|
|
22
|
-
newrelic_lambda_cli-0.9.
|
|
23
|
-
newrelic_lambda_cli-0.9.
|
|
24
|
-
newrelic_lambda_cli-0.9.
|
|
25
|
-
newrelic_lambda_cli-0.9.
|
|
26
|
-
newrelic_lambda_cli-0.9.
|
|
27
|
-
newrelic_lambda_cli-0.9.
|
|
22
|
+
newrelic_lambda_cli-0.9.12.dist-info/licenses/LICENSE,sha256=uuxDzQm0yfq_tNZX0tQYzsZUVRIF0jm3dBLZUojSYzI,11345
|
|
23
|
+
newrelic_lambda_cli-0.9.12.dist-info/METADATA,sha256=Fm4Z4Mp5o4rhZe34lZGIO6WGB4lq-NBvS-zVyKEF1Ew,28715
|
|
24
|
+
newrelic_lambda_cli-0.9.12.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
|
25
|
+
newrelic_lambda_cli-0.9.12.dist-info/entry_points.txt,sha256=iks2k9Y4WNgIecsDzreIvMV9pGCjwwKTf33LKKvl2A8,65
|
|
26
|
+
newrelic_lambda_cli-0.9.12.dist-info/top_level.txt,sha256=dxX2w58VgSUFiPD8C_lFuY-T2C1kjfeY0xi8iTh0r44,20
|
|
27
|
+
newrelic_lambda_cli-0.9.12.dist-info/RECORD,,
|
|
File without changes
|
{newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.11.dist-info → newrelic_lambda_cli-0.9.12.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|