newrelic-lambda-cli 0.9.10__py2.py3-none-any.whl → 0.9.11__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 +3 -0
- newrelic_lambda_cli/cli/layers.py +13 -0
- newrelic_lambda_cli/layers.py +20 -5
- newrelic_lambda_cli/types.py +1 -0
- {newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/METADATA +1 -1
- {newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/RECORD +10 -10
- {newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/WHEEL +0 -0
- {newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/entry_points.txt +0 -0
- {newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/licenses/LICENSE +0 -0
- {newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/top_level.txt +0 -0
newrelic_lambda_cli/api.py
CHANGED
|
@@ -362,6 +362,9 @@ 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
|
if __cached_license_key:
|
|
366
369
|
return __cached_license_key
|
|
367
370
|
assert isinstance(gql, NewRelicGQL)
|
|
@@ -42,6 +42,13 @@ def register(group):
|
|
|
42
42
|
metavar="<key>",
|
|
43
43
|
required=False,
|
|
44
44
|
)
|
|
45
|
+
@click.option(
|
|
46
|
+
"--nr-ingest-key",
|
|
47
|
+
envvar="NEW_RELIC_INGEST_KEY",
|
|
48
|
+
help="New Relic License/Ingest Key (alternative to --nr-api-key)",
|
|
49
|
+
metavar="<key>",
|
|
50
|
+
required=False,
|
|
51
|
+
)
|
|
45
52
|
@click.option(
|
|
46
53
|
"--nr-region",
|
|
47
54
|
default="us",
|
|
@@ -148,6 +155,12 @@ def register(group):
|
|
|
148
155
|
@click.pass_context
|
|
149
156
|
def install(ctx, **kwargs):
|
|
150
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
|
+
|
|
151
164
|
input = LayerInstall(session=None, verbose=ctx.obj["VERBOSE"], **kwargs)
|
|
152
165
|
input = input._replace(
|
|
153
166
|
session=boto3.Session(
|
newrelic_lambda_cli/layers.py
CHANGED
|
@@ -258,14 +258,19 @@ def _add_new_relic(input, config, nr_license_key):
|
|
|
258
258
|
"NEW_RELIC_LOG_ENDPOINT"
|
|
259
259
|
] = "https://staging-log-api.newrelic.com/log/v1"
|
|
260
260
|
|
|
261
|
-
if
|
|
261
|
+
if input.nr_ingest_key:
|
|
262
|
+
update_kwargs["Environment"]["Variables"][
|
|
263
|
+
"NEW_RELIC_LICENSE_KEY"
|
|
264
|
+
] = input.nr_ingest_key
|
|
265
|
+
success("Using New Relic ingest key for layer configuration")
|
|
266
|
+
elif nr_license_key:
|
|
262
267
|
update_kwargs["Environment"]["Variables"][
|
|
263
268
|
"NEW_RELIC_LICENSE_KEY"
|
|
264
269
|
] = nr_license_key
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
270
|
+
else:
|
|
271
|
+
update_kwargs["Environment"]["Variables"][
|
|
272
|
+
"NEW_RELIC_LAMBDA_EXTENSION_ENABLED"
|
|
273
|
+
] = "false"
|
|
269
274
|
|
|
270
275
|
if "dotnet" in runtime:
|
|
271
276
|
update_kwargs["Environment"]["Variables"]["CORECLR_ENABLE_PROFILING"] = "1"
|
|
@@ -291,6 +296,14 @@ def _add_new_relic(input, config, nr_license_key):
|
|
|
291
296
|
|
|
292
297
|
@catch_boto_errors
|
|
293
298
|
def install(input, function_arn):
|
|
299
|
+
if input.nr_api_key and input.nr_ingest_key:
|
|
300
|
+
raise click.UsageError(
|
|
301
|
+
"Please provide either the --nr-api-key or the --nr-ingest-key flag, but not both."
|
|
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
|
+
)
|
|
294
307
|
assert isinstance(input, LayerInstall)
|
|
295
308
|
|
|
296
309
|
client = input.session.client("lambda")
|
|
@@ -342,6 +355,8 @@ def install(input, function_arn):
|
|
|
342
355
|
):
|
|
343
356
|
gql = api.validate_gql_credentials(input)
|
|
344
357
|
nr_license_key = api.retrieve_license_key(gql)
|
|
358
|
+
elif input.nr_ingest_key:
|
|
359
|
+
nr_license_key = input.nr_ingest_key
|
|
345
360
|
|
|
346
361
|
update_kwargs = _add_new_relic(input, config, nr_license_key)
|
|
347
362
|
if isinstance(update_kwargs, bool):
|
newrelic_lambda_cli/types.py
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
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=EwsuxIKHCjrB7knksn8Z4DRT-LLDFeUhMiA2R-7uNpI,15240
|
|
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=kW5baQ71kd8nMu3nrHLzaI3xGsku1N5n2bl_oIP5Xe8,19760
|
|
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
|
|
10
|
-
newrelic_lambda_cli/types.py,sha256=
|
|
10
|
+
newrelic_lambda_cli/types.py,sha256=_nqOh4VU55CEu5EzUvPVtNeofIuOmF3_DIV1RcT6doA,3526
|
|
11
11
|
newrelic_lambda_cli/utils.py,sha256=_XU5tFx9SxEzvp_brFFQtspBz_qoUZ2H_HDxhB_Qr1U,5902
|
|
12
12
|
newrelic_lambda_cli/cli/__init__.py,sha256=FciF2RVqQbpMKqEiN8qjO6qmdLB6Yv8LyyyPYcfJNrc,622
|
|
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=dMc_r42uz26Jf3ePC9r4MYIPb7B6MlS7zALtr5_b6IQ,7734
|
|
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.11.dist-info/licenses/LICENSE,sha256=uuxDzQm0yfq_tNZX0tQYzsZUVRIF0jm3dBLZUojSYzI,11345
|
|
23
|
+
newrelic_lambda_cli-0.9.11.dist-info/METADATA,sha256=kDErJ6n2tOKpwmeC7z-Kz-pCFXMlSglw8LibRZdW7_I,28715
|
|
24
|
+
newrelic_lambda_cli-0.9.11.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
|
|
25
|
+
newrelic_lambda_cli-0.9.11.dist-info/entry_points.txt,sha256=iks2k9Y4WNgIecsDzreIvMV9pGCjwwKTf33LKKvl2A8,65
|
|
26
|
+
newrelic_lambda_cli-0.9.11.dist-info/top_level.txt,sha256=dxX2w58VgSUFiPD8C_lFuY-T2C1kjfeY0xi8iTh0r44,20
|
|
27
|
+
newrelic_lambda_cli-0.9.11.dist-info/RECORD,,
|
|
File without changes
|
{newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.10.dist-info → newrelic_lambda_cli-0.9.11.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|