FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
aws-cli/awscli/customizations/iot.py at develop · rubythonode/aws-cli · GitHub
rubythonode
/
aws-cli
Public
forked from
aws/aws-cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
aws-cli
/
awscli
/
customizations
/
iot.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
52 lines (46 loc) · 2.34 KB
Breadcrumbs
aws-cli
/
awscli
/
customizations
/
iot.py
Copy path
File metadata and controls
52 lines (46 loc) · 2.34 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
"""
This customization makes it easier to save various pieces of data
returned from iot commands that would typically need to be saved to a
file. This customization adds the following options:
- aws iot create-certificate-from-csr
- ``--certificate-pem-outfile``: certificatePem
- aws iot create-keys-and-certificate
- ``--certificate-pem-outfile``: certificatePem
- ``--public-key-outfile``: keyPair.PublicKey
- ``--private-key-outfile``: keyPair.PrivateKey
"""
from
awscli
.
customizations
.
arguments
import
QueryOutFileArgument
def
register_create_keys_and_cert_arguments
(
session
,
argument_table
,
**
kwargs
):
"""Add outfile save arguments to create-keys-and-certificate
- ``--certificate-pem-outfile``
- ``--public-key-outfile``
- ``--private-key-outfile``
"""
after_event
=
'after-call.iot.CreateKeysAndCertificate'
argument_table
[
'certificate-pem-outfile'
]
=
QueryOutFileArgument
(
session
=
session
,
name
=
'certificate-pem-outfile'
,
query
=
'certificatePem'
,
after_call_event
=
after_event
,
perm
=
0o600
)
argument_table
[
'public-key-outfile'
]
=
QueryOutFileArgument
(
session
=
session
,
name
=
'public-key-outfile'
,
query
=
'keyPair.PublicKey'
,
after_call_event
=
after_event
,
perm
=
0o600
)
argument_table
[
'private-key-outfile'
]
=
QueryOutFileArgument
(
session
=
session
,
name
=
'private-key-outfile'
,
query
=
'keyPair.PrivateKey'
,
after_call_event
=
after_event
,
perm
=
0o600
)
def
register_create_keys_from_csr_arguments
(
session
,
argument_table
,
**
kwargs
):
"""Add certificate-pem-outfile to create-certificate-from-csr"""
argument_table
[
'certificate-pem-outfile'
]
=
QueryOutFileArgument
(
session
=
session
,
name
=
'certificate-pem-outfile'
,
query
=
'certificatePem'
,
after_call_event
=
'after-call.iot.CreateCertificateFromCsr'
,
perm
=
0o600
)
Back
|
FazBrowse Home
|
New Git URL