Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
64784db8
Commit
64784db8
authored
Nov 23, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cloudwatch): adds access and secret key to edit config page
parent
c3075a9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
139 additions
and
77 deletions
+139
-77
pkg/api/cloudwatch/cloudwatch.go
+34
-9
pkg/api/cloudwatch/metrics.go
+61
-38
public/app/plugins/datasource/cloudwatch/partials/config.html
+44
-30
No files found.
pkg/api/cloudwatch/cloudwatch.go
View file @
64784db8
...
...
@@ -53,11 +53,21 @@ type cache struct {
expiration
*
time
.
Time
}
type
CloudwatchDatasource
struct
{
Profile
string
Region
string
AssumeRoleArn
string
Namespace
string
AccessKey
string
SecretKey
string
}
var
awsCredentialCache
map
[
string
]
cache
=
make
(
map
[
string
]
cache
)
var
credentialCacheLock
sync
.
RWMutex
func
getCredentials
(
profile
string
,
region
string
,
assumeRoleArn
string
)
*
credentials
.
Credentials
{
cacheKey
:=
profile
+
":"
+
a
ssumeRoleArn
func
getCredentials
(
cwDatasource
*
CloudwatchDatasource
)
*
credentials
.
Credentials
{
cacheKey
:=
cwDatasource
.
Profile
+
":"
+
cwDatasource
.
A
ssumeRoleArn
credentialCacheLock
.
RLock
()
if
_
,
ok
:=
awsCredentialCache
[
cacheKey
];
ok
{
if
awsCredentialCache
[
cacheKey
]
.
expiration
!=
nil
&&
...
...
@@ -74,9 +84,9 @@ func getCredentials(profile string, region string, assumeRoleArn string) *creden
sessionToken
:=
""
var
expiration
*
time
.
Time
expiration
=
nil
if
strings
.
Index
(
a
ssumeRoleArn
,
"arn:aws:iam:"
)
==
0
{
if
strings
.
Index
(
cwDatasource
.
A
ssumeRoleArn
,
"arn:aws:iam:"
)
==
0
{
params
:=
&
sts
.
AssumeRoleInput
{
RoleArn
:
aws
.
String
(
a
ssumeRoleArn
),
RoleArn
:
aws
.
String
(
cwDatasource
.
A
ssumeRoleArn
),
RoleSessionName
:
aws
.
String
(
"GrafanaSession"
),
DurationSeconds
:
aws
.
Int64
(
900
),
}
...
...
@@ -85,13 +95,14 @@ func getCredentials(profile string, region string, assumeRoleArn string) *creden
stsCreds
:=
credentials
.
NewChainCredentials
(
[]
credentials
.
Provider
{
&
credentials
.
EnvProvider
{},
&
credentials
.
SharedCredentialsProvider
{
Filename
:
""
,
Profile
:
p
rofile
},
&
credentials
.
SharedCredentialsProvider
{
Filename
:
""
,
Profile
:
cwDatasource
.
P
rofile
},
&
ec2rolecreds
.
EC2RoleProvider
{
Client
:
ec2metadata
.
New
(
stsSess
),
ExpiryWindow
:
5
*
time
.
Minute
},
})
stsConfig
:=
&
aws
.
Config
{
Region
:
aws
.
String
(
r
egion
),
Region
:
aws
.
String
(
cwDatasource
.
R
egion
),
Credentials
:
stsCreds
,
}
svc
:=
sts
.
New
(
session
.
New
(
stsConfig
),
stsConfig
)
resp
,
err
:=
svc
.
AssumeRole
(
params
)
if
err
!=
nil
{
...
...
@@ -115,9 +126,14 @@ func getCredentials(profile string, region string, assumeRoleArn string) *creden
SessionToken
:
sessionToken
,
}},
&
credentials
.
EnvProvider
{},
&
credentials
.
SharedCredentialsProvider
{
Filename
:
""
,
Profile
:
profile
},
&
credentials
.
StaticProvider
{
Value
:
credentials
.
Value
{
AccessKeyID
:
cwDatasource
.
AccessKey
,
SecretAccessKey
:
cwDatasource
.
SecretKey
,
}},
&
credentials
.
SharedCredentialsProvider
{
Filename
:
""
,
Profile
:
cwDatasource
.
Profile
},
&
ec2rolecreds
.
EC2RoleProvider
{
Client
:
ec2metadata
.
New
(
sess
),
ExpiryWindow
:
5
*
time
.
Minute
},
})
credentialCacheLock
.
Lock
()
awsCredentialCache
[
cacheKey
]
=
cache
{
credential
:
creds
,
...
...
@@ -130,9 +146,18 @@ func getCredentials(profile string, region string, assumeRoleArn string) *creden
func
getAwsConfig
(
req
*
cwRequest
)
*
aws
.
Config
{
assumeRoleArn
:=
req
.
DataSource
.
JsonData
.
Get
(
"assumeRoleArn"
)
.
MustString
()
accessKey
:=
req
.
DataSource
.
JsonData
.
Get
(
"accessKey"
)
.
MustString
()
secretKey
:=
req
.
DataSource
.
JsonData
.
Get
(
"secretKey"
)
.
MustString
()
cfg
:=
&
aws
.
Config
{
Region
:
aws
.
String
(
req
.
Region
),
Credentials
:
getCredentials
(
req
.
DataSource
.
Database
,
req
.
Region
,
assumeRoleArn
),
Region
:
aws
.
String
(
req
.
Region
),
Credentials
:
getCredentials
(
&
CloudwatchDatasource
{
AccessKey
:
accessKey
,
SecretKey
:
secretKey
,
Region
:
req
.
Region
,
Profile
:
req
.
DataSource
.
Database
,
AssumeRoleArn
:
assumeRoleArn
,
}),
}
return
cfg
}
...
...
pkg/api/cloudwatch/metrics.go
View file @
64784db8
...
...
@@ -193,7 +193,19 @@ func handleGetMetrics(req *cwRequest, c *middleware.Context) {
}
else
{
var
err
error
assumeRoleArn
:=
req
.
DataSource
.
JsonData
.
Get
(
"assumeRoleArn"
)
.
MustString
()
if
namespaceMetrics
,
err
=
getMetricsForCustomMetrics
(
req
.
Region
,
reqParam
.
Parameters
.
Namespace
,
req
.
DataSource
.
Database
,
assumeRoleArn
,
getAllMetrics
);
err
!=
nil
{
accessKey
:=
req
.
DataSource
.
JsonData
.
Get
(
"accessKey"
)
.
MustString
()
secretKey
:=
req
.
DataSource
.
JsonData
.
Get
(
"secretKey"
)
.
MustString
()
cwData
:=
&
CloudwatchDatasource
{
AssumeRoleArn
:
assumeRoleArn
,
Region
:
req
.
Region
,
Namespace
:
reqParam
.
Parameters
.
Namespace
,
Profile
:
req
.
DataSource
.
Database
,
AccessKey
:
accessKey
,
SecretKey
:
secretKey
,
}
if
namespaceMetrics
,
err
=
getMetricsForCustomMetrics
(
cwData
,
getAllMetrics
);
err
!=
nil
{
c
.
JsonApiErr
(
500
,
"Unable to call AWS API"
,
err
)
return
}
...
...
@@ -227,7 +239,18 @@ func handleGetDimensions(req *cwRequest, c *middleware.Context) {
}
else
{
var
err
error
assumeRoleArn
:=
req
.
DataSource
.
JsonData
.
Get
(
"assumeRoleArn"
)
.
MustString
()
if
dimensionValues
,
err
=
getDimensionsForCustomMetrics
(
req
.
Region
,
reqParam
.
Parameters
.
Namespace
,
req
.
DataSource
.
Database
,
assumeRoleArn
,
getAllMetrics
);
err
!=
nil
{
accessKey
:=
req
.
DataSource
.
JsonData
.
Get
(
"accessKey"
)
.
MustString
()
secretKey
:=
req
.
DataSource
.
JsonData
.
Get
(
"secretKey"
)
.
MustString
()
cwDatasource
:=
&
CloudwatchDatasource
{
Region
:
req
.
Region
,
Namespace
:
reqParam
.
Parameters
.
Namespace
,
Profile
:
req
.
DataSource
.
Database
,
AssumeRoleArn
:
assumeRoleArn
,
AccessKey
:
accessKey
,
SecretKey
:
secretKey
,
}
if
dimensionValues
,
err
=
getDimensionsForCustomMetrics
(
cwDatasource
,
getAllMetrics
);
err
!=
nil
{
c
.
JsonApiErr
(
500
,
"Unable to call AWS API"
,
err
)
return
}
...
...
@@ -242,16 +265,16 @@ func handleGetDimensions(req *cwRequest, c *middleware.Context) {
c
.
JSON
(
200
,
result
)
}
func
getAllMetrics
(
region
string
,
namespace
string
,
database
string
,
assumeRoleArn
string
)
(
cloudwatch
.
ListMetricsOutput
,
error
)
{
func
getAllMetrics
(
cwData
*
CloudwatchDatasource
)
(
cloudwatch
.
ListMetricsOutput
,
error
)
{
cfg
:=
&
aws
.
Config
{
Region
:
aws
.
String
(
r
egion
),
Credentials
:
getCredentials
(
database
,
region
,
assumeRoleArn
),
Region
:
aws
.
String
(
cwData
.
R
egion
),
Credentials
:
getCredentials
(
cwData
),
}
svc
:=
cloudwatch
.
New
(
session
.
New
(
cfg
),
cfg
)
params
:=
&
cloudwatch
.
ListMetricsInput
{
Namespace
:
aws
.
String
(
n
amespace
),
Namespace
:
aws
.
String
(
cwData
.
N
amespace
),
}
var
resp
cloudwatch
.
ListMetricsOutput
...
...
@@ -272,8 +295,8 @@ func getAllMetrics(region string, namespace string, database string, assumeRoleA
var
metricsCacheLock
sync
.
Mutex
func
getMetricsForCustomMetrics
(
region
string
,
namespace
string
,
database
string
,
assumeRoleArn
string
,
getAllMetrics
func
(
string
,
string
,
string
,
string
)
(
cloudwatch
.
ListMetricsOutput
,
error
))
([]
string
,
error
)
{
result
,
err
:=
getAllMetrics
(
region
,
namespace
,
database
,
assumeRoleArn
)
func
getMetricsForCustomMetrics
(
cwDatasource
*
CloudwatchDatasource
,
getAllMetrics
func
(
*
CloudwatchDatasource
)
(
cloudwatch
.
ListMetricsOutput
,
error
))
([]
string
,
error
)
{
result
,
err
:=
getAllMetrics
(
cwDatasource
)
if
err
!=
nil
{
return
[]
string
{},
err
}
...
...
@@ -281,37 +304,37 @@ func getMetricsForCustomMetrics(region string, namespace string, database string
metricsCacheLock
.
Lock
()
defer
metricsCacheLock
.
Unlock
()
if
_
,
ok
:=
customMetricsMetricsMap
[
databas
e
];
!
ok
{
customMetricsMetricsMap
[
databas
e
]
=
make
(
map
[
string
]
map
[
string
]
*
CustomMetricsCache
)
if
_
,
ok
:=
customMetricsMetricsMap
[
cwDatasource
.
Profil
e
];
!
ok
{
customMetricsMetricsMap
[
cwDatasource
.
Profil
e
]
=
make
(
map
[
string
]
map
[
string
]
*
CustomMetricsCache
)
}
if
_
,
ok
:=
customMetricsMetricsMap
[
database
][
r
egion
];
!
ok
{
customMetricsMetricsMap
[
database
][
r
egion
]
=
make
(
map
[
string
]
*
CustomMetricsCache
)
if
_
,
ok
:=
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
R
egion
];
!
ok
{
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
R
egion
]
=
make
(
map
[
string
]
*
CustomMetricsCache
)
}
if
_
,
ok
:=
customMetricsMetricsMap
[
database
][
region
][
n
amespace
];
!
ok
{
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
=
&
CustomMetricsCache
{}
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Cache
=
make
([]
string
,
0
)
if
_
,
ok
:=
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
];
!
ok
{
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
=
&
CustomMetricsCache
{}
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
=
make
([]
string
,
0
)
}
if
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Expire
.
After
(
time
.
Now
())
{
return
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
nil
if
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Expire
.
After
(
time
.
Now
())
{
return
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
nil
}
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Cache
=
make
([]
string
,
0
)
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Expire
=
time
.
Now
()
.
Add
(
5
*
time
.
Minute
)
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
=
make
([]
string
,
0
)
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Expire
=
time
.
Now
()
.
Add
(
5
*
time
.
Minute
)
for
_
,
metric
:=
range
result
.
Metrics
{
if
isDuplicate
(
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
*
metric
.
MetricName
)
{
if
isDuplicate
(
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
*
metric
.
MetricName
)
{
continue
}
customMetricsMetricsMap
[
database
][
region
][
namespace
]
.
Cache
=
append
(
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
*
metric
.
MetricName
)
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
Namespace
]
.
Cache
=
append
(
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
*
metric
.
MetricName
)
}
return
customMetricsMetricsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
nil
return
customMetricsMetricsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
nil
}
var
dimensionsCacheLock
sync
.
Mutex
func
getDimensionsForCustomMetrics
(
region
string
,
namespace
string
,
database
string
,
assumeRoleArn
string
,
getAllMetrics
func
(
string
,
string
,
string
,
string
)
(
cloudwatch
.
ListMetricsOutput
,
error
))
([]
string
,
error
)
{
result
,
err
:=
getAllMetrics
(
region
,
namespace
,
database
,
assumeRoleArn
)
func
getDimensionsForCustomMetrics
(
cwDatasource
*
CloudwatchDatasource
,
getAllMetrics
func
(
*
CloudwatchDatasource
)
(
cloudwatch
.
ListMetricsOutput
,
error
))
([]
string
,
error
)
{
result
,
err
:=
getAllMetrics
(
cwDatasource
)
if
err
!=
nil
{
return
[]
string
{},
err
}
...
...
@@ -319,33 +342,33 @@ func getDimensionsForCustomMetrics(region string, namespace string, database str
dimensionsCacheLock
.
Lock
()
defer
dimensionsCacheLock
.
Unlock
()
if
_
,
ok
:=
customMetricsDimensionsMap
[
databas
e
];
!
ok
{
customMetricsDimensionsMap
[
databas
e
]
=
make
(
map
[
string
]
map
[
string
]
*
CustomMetricsCache
)
if
_
,
ok
:=
customMetricsDimensionsMap
[
cwDatasource
.
Profil
e
];
!
ok
{
customMetricsDimensionsMap
[
cwDatasource
.
Profil
e
]
=
make
(
map
[
string
]
map
[
string
]
*
CustomMetricsCache
)
}
if
_
,
ok
:=
customMetricsDimensionsMap
[
database
][
r
egion
];
!
ok
{
customMetricsDimensionsMap
[
database
][
r
egion
]
=
make
(
map
[
string
]
*
CustomMetricsCache
)
if
_
,
ok
:=
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
R
egion
];
!
ok
{
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
R
egion
]
=
make
(
map
[
string
]
*
CustomMetricsCache
)
}
if
_
,
ok
:=
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
];
!
ok
{
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
=
&
CustomMetricsCache
{}
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Cache
=
make
([]
string
,
0
)
if
_
,
ok
:=
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
];
!
ok
{
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
=
&
CustomMetricsCache
{}
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
=
make
([]
string
,
0
)
}
if
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Expire
.
After
(
time
.
Now
())
{
return
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
nil
if
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Expire
.
After
(
time
.
Now
())
{
return
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
nil
}
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Cache
=
make
([]
string
,
0
)
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Expire
=
time
.
Now
()
.
Add
(
5
*
time
.
Minute
)
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
=
make
([]
string
,
0
)
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Expire
=
time
.
Now
()
.
Add
(
5
*
time
.
Minute
)
for
_
,
metric
:=
range
result
.
Metrics
{
for
_
,
dimension
:=
range
metric
.
Dimensions
{
if
isDuplicate
(
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
*
dimension
.
Name
)
{
if
isDuplicate
(
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
*
dimension
.
Name
)
{
continue
}
customMetricsDimensionsMap
[
database
][
region
][
namespace
]
.
Cache
=
append
(
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
*
dimension
.
Name
)
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
Namespace
]
.
Cache
=
append
(
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
*
dimension
.
Name
)
}
}
return
customMetricsDimensionsMap
[
database
][
region
][
n
amespace
]
.
Cache
,
nil
return
customMetricsDimensionsMap
[
cwDatasource
.
Profile
][
cwDatasource
.
Region
][
cwDatasource
.
N
amespace
]
.
Cache
,
nil
}
func
isDuplicate
(
nameList
[]
string
,
target
string
)
bool
{
...
...
public/app/plugins/datasource/cloudwatch/partials/config.html
View file @
64784db8
<h3
class=
"page-heading"
>
CloudWatch details
</h3>
<div
class=
"gf-form-group max-width-30"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Credentials profile name
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.database'
placeholder=
"default"
></input>
<info-popover
mode=
"right-absolute"
>
Credentials profile name, as specified in ~/.aws/credentials, leave blank for default
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Default Region
</label>
<div
class=
"gf-form-select-wrapper max-width-18 gf-form-select-wrapper--has-help-icon"
>
<select
class=
"gf-form-input"
ng-model=
"ctrl.current.jsonData.defaultRegion"
ng-options=
"region for region in ['ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'cn-north-1', 'eu-central-1', 'eu-west-1', 'sa-east-1', 'us-east-1', 'us-east-2', 'us-gov-west-1', 'us-west-1', 'us-west-2']"
></select>
<info-popover
mode=
"right-absolute"
>
Specify the region, such as for US West (Oregon) use ` us-west-2 ` as the region.
</info-popover>
</div>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Custom Metrics namespace
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.customMetricsNamespaces'
placeholder=
"Namespace1,Namespace2"
></input>
<info-popover
mode=
"right-absolute"
>
Namespaces of Custom Metrics
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Assume Role ARN
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.assumeRoleArn'
placeholder=
"arn:aws:iam:*"
></input>
<info-popover
mode=
"right-absolute"
>
ARN of Assume Role
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Credentials profile name
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.database'
placeholder=
"default"
></input>
<info-popover
mode=
"right-absolute"
>
Credentials profile name, as specified in ~/.aws/credentials, leave blank for default
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Credentials Access key
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.accessKey'
placeholder=
"default"
></input>
<info-popover
mode=
"right-absolute"
>
Accesskey
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Credentials Secret key
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.secretKey'
placeholder=
"default"
></input>
<info-popover
mode=
"right-absolute"
>
Secret key
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Default Region
</label>
<div
class=
"gf-form-select-wrapper max-width-18 gf-form-select-wrapper--has-help-icon"
>
<select
class=
"gf-form-input"
ng-model=
"ctrl.current.jsonData.defaultRegion"
ng-options=
"region for region in ['ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'cn-north-1', 'eu-central-1', 'eu-west-1', 'sa-east-1', 'us-east-1', 'us-east-2', 'us-gov-west-1', 'us-west-1', 'us-west-2']"
></select>
<info-popover
mode=
"right-absolute"
>
Specify the region, such as for US West (Oregon) use ` us-west-2 ` as the region.
</info-popover>
</div>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Custom Metrics namespace
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.customMetricsNamespaces'
placeholder=
"Namespace1,Namespace2"
></input>
<info-popover
mode=
"right-absolute"
>
Namespaces of Custom Metrics
</info-popover>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Assume Role ARN
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.assumeRoleArn'
placeholder=
"arn:aws:iam:*"
></input>
<info-popover
mode=
"right-absolute"
>
ARN of Assume Role
</info-popover>
</div>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment