newrelic-lambda-cli 0.9.10__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.
@@ -362,6 +362,7 @@ def validate_gql_credentials(input):
362
362
 
363
363
  def retrieve_license_key(gql):
364
364
  global __cached_license_key
365
+
365
366
  if __cached_license_key:
366
367
  return __cached_license_key
367
368
  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",
@@ -258,7 +258,12 @@ 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 nr_license_key:
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
@@ -291,6 +296,10 @@ 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
+ )
294
303
  assert isinstance(input, LayerInstall)
295
304
 
296
305
  client = input.session.client("lambda")
@@ -310,6 +319,7 @@ def install(input, function_arn):
310
319
  and nr_account_id
311
320
  and nr_account_id != str(input.nr_account_id)
312
321
  and not input.nr_api_key
322
+ and not input.nr_ingest_key
313
323
  ):
314
324
  raise click.UsageError(
315
325
  "A managed secret already exists in this region for New Relic account {0}. "
@@ -322,7 +332,12 @@ def install(input, function_arn):
322
332
  nr_account_id, input.nr_account_id, utils.NR_DOCS_ACT_LINKING_URL
323
333
  )
324
334
  )
325
- if input.enable_extension and not policy_arn and not input.nr_api_key:
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
+ ):
326
341
  raise click.UsageError(
327
342
  "In order to use `--enable-extension`, you must first run "
328
343
  "`newrelic-lambda integrations install` with the "
@@ -334,7 +349,9 @@ def install(input, function_arn):
334
349
  )
335
350
 
336
351
  nr_license_key = None
337
- if (
352
+ if input.nr_ingest_key:
353
+ nr_license_key = input.nr_ingest_key
354
+ elif (
338
355
  not policy_arn
339
356
  or nr_account_id != str(input.nr_account_id)
340
357
  and input.nr_api_key
@@ -96,6 +96,7 @@ LAYER_INSTALL_KEYS = [
96
96
  "verbose",
97
97
  "nr_account_id",
98
98
  "nr_api_key",
99
+ "nr_ingest_key",
99
100
  "nr_region",
100
101
  "aws_profile",
101
102
  "aws_region",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: newrelic-lambda-cli
3
- Version: 0.9.10
3
+ Version: 0.9.12
4
4
  Summary: A CLI to install the New Relic AWS Lambda integration and layers.
5
5
  Home-page: https://github.com/newrelic/newrelic-lambda-cli
6
6
  Author: New Relic
@@ -1,27 +1,27 @@
1
1
  newrelic_lambda_cli/__init__.py,sha256=u4cy7hwbrNjK3xtldGQD_51aoNgSqGQ3IzFYsuvaIM4,149
2
- newrelic_lambda_cli/api.py,sha256=U3fqFs_fSSlVJ3CSF2SmY-Sm-rwJDusY0usK1iMjxx4,15132
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=F21P8JZJy-R56rf9hTLvTvxMHw2zDuJyoUnZDgQryeA,19062
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
10
- newrelic_lambda_cli/types.py,sha256=OVu8Ybls5XZdzb9wsuLbkCrf4q2wkLIEgiOlkGODLWY,3505
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=xIbunW2p03sAzcgfiD_OSBAvBWkqys9iDwMl4IezY1k,7397
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.10.dist-info/licenses/LICENSE,sha256=uuxDzQm0yfq_tNZX0tQYzsZUVRIF0jm3dBLZUojSYzI,11345
23
- newrelic_lambda_cli-0.9.10.dist-info/METADATA,sha256=25IfnT2AFWRLZxRARmDhM7zgUV2QzusEWZUG75QIL8s,28715
24
- newrelic_lambda_cli-0.9.10.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
25
- newrelic_lambda_cli-0.9.10.dist-info/entry_points.txt,sha256=iks2k9Y4WNgIecsDzreIvMV9pGCjwwKTf33LKKvl2A8,65
26
- newrelic_lambda_cli-0.9.10.dist-info/top_level.txt,sha256=dxX2w58VgSUFiPD8C_lFuY-T2C1kjfeY0xi8iTh0r44,20
27
- newrelic_lambda_cli-0.9.10.dist-info/RECORD,,
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,,