forked from ThePhalcons/AmazonWebServicesBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AmazonWebServices.php
156 lines (139 loc) · 3.56 KB
/
AmazonWebServices.php
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php
/**
* @package AmazonWebServicesBundle
* @author Mark Badolato <[email protected]>
* @copyright Copyright (c) CyberNox Technologies. All rights reserved.
* @license http://www.opensource.org/licenses/BSD-2-Clause BSD License
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cybernox\AmazonWebServicesBundle;
/**
* AmazonWebServicesBundle Main Service class
*/
class AmazonWebServices
{
private $parameters = null;
/**
* Constructor
*
* @array array $parameters An array of configuration options
*/
public function __construct(array $parameters)
{
$this->parameters = $parameters;
\CFCredentials::set(array(
'runtime' => $parameters,
'@default' => 'runtime'
));
}
/**
* Get the accountId
*
* @return string The account id provided via the bundle configuration
*/
public function accountId()
{
return $this->parameters['account_id'];
}
/**
* Get the canonicalId
*
* @return string The cononical id provided via the bundle configuration
*/
public function canonicalId()
{
return $this->parameters['canonical_id'];
}
/**
* Get the cononicalName
*
* @return string The canonical name provided via the bundle configuration
*/
public function canonicalName()
{
return $this->parameters['canonical_name'];
}
/**
* Get the certificateAuthority
*
* @return string The certificate authority provided via the bundle configuration
*/
public function certificateAuthority()
{
return (bool) $this->parameters['certificate_authority'];
}
/**
* Get the cloudFrontKeypairId
*
* @return string The Cloudfront keypair id provided via the bundle configuration
*/
public function cloudfrontKeypairId()
{
return $this->parameters['cloudfront_keypair_id'];
}
/**
* Get the cloudfrontPrivateKeyPem
*
* @return string The Cloudfront private key pem provided via the bundle configuration
*/
public function cloudfrontPrivateKeyPem()
{
return $this->parameters['cloudfront_private_key_pem'];
}
/**
* Get the defaultCacheConfig
*
* @return string The default cache config provided via the bundle configuration
*/
public function defaultCacheConfig()
{
return $this->parameters['default_cache_config'];
}
/**
* enableExtensions
*
* @return boolean
*/
public function enableExtensions()
{
return (bool) $this->parameters['enable_extensions'];
}
/**
* Get the key
*
* @return string The key provided via the bundle configuration
*/
public function getKey()
{
return $this->parameters['key'];
}
/**
* Get the parameters
*
* @return array The array of all configuration parameters provided via the bundle configuration
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Get the mfaSerial
*
* @return string The mfa serial provided via the bundle configuration
*/
public function mfaSerial()
{
return $this->parameters['mfa_serial'];
}
/**
* Get the secret
*
* @return string The secret key provided via the bundle configuration
*/
public function secret()
{
return $this->parameters['secret'];
}
}