Qore AwsRestClientDataProvider Module Reference  1.0
AwsRestClientDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace AwsRestClientDataProvider {
28 class AwsRestClientDataProvider : public AbstractDataProvider {
29 
30 public:
32  const ProviderInfo = <DataProviderInfo>{
33  "type": "AwsRestClientDataProvider",
34  "constructor_options": ConstructorOptions,
35  "supports_children": True,
36  "children_can_support_apis": True,
37  "children_can_support_records": False,
38  "children_can_support_observers": False,
39  };
40 
42  const ConstructorOptions = RestClientDataProvider::ConstructorOptions + {
43  "data": <DataProviderOptionInfo>{
44  "type": AbstractDataProviderType::get(StringType),
45  "desc": "Data serialization options are limited to `json` with this object",
46  "allowed_values": (
47  <AllowedValueInfo>{
48  "value": "json",
49  "desc": "use JSON serialization",
50  },
51  ),
52  "default_value": "json",
53  },
54  "aws_keyid": <DataProviderOptionInfo>{
55  "type": AbstractDataProviderType::get(StringType),
56  "desc": "AWS key ID",
57  },
58  "aws_secret": <DataProviderOptionInfo>{
59  "type": AbstractDataProviderType::get(StringType),
60  "desc": "The AWS secret access key value",
61  "sensitive": True,
62  },
63  "aws_region": <DataProviderOptionInfo>{
64  "type": AbstractDataProviderType::get(StringType),
65  "desc": "The AWS region to use (ex: `us-east-1`)",
66  },
67  "aws_service": <DataProviderOptionInfo>{
68  "type": AbstractDataProviderType::get(StringType),
69  "desc": "The AWS service to use (ex: `iam`)",
70  },
71  "aws_s3": <DataProviderOptionInfo>{
72  "type": AbstractDataProviderType::get(BoolType),
73  "desc": "Set to `True` to flag this object for use with AWS S3, which requires special "
74  "message encoding",
75  "default_value": False,
76  },
77  "aws_token": <DataProviderOptionInfo>{
78  "type": AbstractDataProviderType::get(StringType),
79  "desc": "A temporary session token from AWS Security Token Service for this HTTP session",
80  },
81  };
82 
83  AwsRestClient rest;
84 
85 protected:
86  const ChildMap = {
87  "call": Class::forName("AwsRestClientDataProvider::AwsRestClientCallDataProvider"),
88  "delete": Class::forName("AwsRestClientDataProvider::AwsRestClientDeleteDataProvider"),
89  "get": Class::forName("AwsRestClientDataProvider::AwsRestClientGetDataProvider"),
90  "head": Class::forName("AwsRestClientDataProvider::AwsRestClientHeadDataProvider"),
91  "options": Class::forName("AwsRestClientDataProvider::AwsRestClientOptionsDataProvider"),
92  "path": Class::forName("AwsRestClientDataProvider::AwsRestClientPatchDataProvider"),
93  "post": Class::forName("AwsRestClientDataProvider::AwsRestClientPostDataProvider"),
94  "put": Class::forName("AwsRestClientDataProvider::AwsRestClientPutDataProvider"),
95  };
96 
97 public:
98 
100  constructor(*hash<auto> options);
101 
102 
104  constructor(AwsRestClient rest);
105 
106 
108  string getName();
109 
110 
112  *string getDesc();
113 
114 
116  *list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
117 
118 
120  static AwsRestClient getAwsRestConnection(hash<auto> options);
121 
123 
125 protected:
126  *list<string> getChildProviderNamesImpl();
127 public:
128 
129 
131 
135 protected:
136  *AbstractDataProvider getChildProviderImpl(string name);
137 public:
138 
139 
141 protected:
142  hash<DataProviderInfo> getStaticInfoImpl();
143 public:
144 
145 };
146 };
static AwsRestClient getAwsRestConnection(hash< auto > options)
Returns a REST connection.
constructor(AwsRestClient rest)
Creates the object from a REST connection.
*list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
string getName()
Returns the data provider name.
constructor(*hash< auto > options)
Creates the object from constructor options.
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
*string getDesc()
Returns the data provider description.
const True
const False
Qore AwsRestClientDataProvider module definition.
Definition: AwsRestClientCallDataProvider.qc.dox.h:26