Skip to content

Commit af8d1fb

Browse files
Adds UpdateLibraryItemMetadata api to change status of app for admin verification feature and returns isVerified field in any api returning the app or library item.
1 parent 0c516dd commit af8d1fb

18 files changed

+415
-20
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.399
1+
1.11.400

generated/src/aws-cpp-sdk-qapps/include/aws/qapps/QAppsClient.h

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,20 @@ namespace QApps
1818
/**
1919
* <p>The Amazon Q Apps feature capability within Amazon Q Business allows web
2020
* experience users to create lightweight, purpose-built AI apps to fulfill
21-
* specific tasks from within their web experience. For example, users can create
22-
* an Q Appthat exclusively generates marketing-related content to improve your
23-
* marketing team's productivity or a Q App for marketing content-generation like
24-
* writing customer emails and creating promotional content using a certain style
25-
* of voice, tone, and branding. For more information, see <a
26-
* href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/purpose-built-qapps.html">Amazon
27-
* Q App</a> in the <i>Amazon Q Business User Guide</i>. </p>
21+
* specific tasks from within their web experience. For example, users can create a
22+
* Q App that exclusively generates marketing-related content to improve your
23+
* marketing team's productivity or a Q App for writing customer emails and
24+
* creating promotional content using a certain style of voice, tone, and branding.
25+
* For more information on the capabilities, see <a
26+
* href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html#q-apps-actions">Amazon
27+
* Q Apps capabilities</a> in the <i>Amazon Q Business User Guide</i>. </p> <p>For
28+
* an overview of the Amazon Q App APIs, see <a
29+
* href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_Operations_QApps.html">Overview
30+
* of Amazon Q Apps API operations</a>.</p> <p>For information about the IAM access
31+
* control permissions you need to use the Amazon Q Apps API, see <a
32+
* href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/deploy-experience-iam-role.html">
33+
* IAM role for the Amazon Q Business web experience including Amazon Q Apps</a> in
34+
* the <i>Amazon Q Business User Guide</i>.</p>
2835
*/
2936
class AWS_QAPPS_API QAppsClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods<QAppsClient>
3037
{
@@ -622,8 +629,7 @@ namespace QApps
622629
}
623630

624631
/**
625-
* <p>Updates the metadata and status of a library item for an Amazon Q
626-
* App.</p><p><h3>See Also:</h3> <a
632+
* <p>Updates the library item for an Amazon Q App.</p><p><h3>See Also:</h3> <a
627633
* href="http://docs.aws.amazon.com/goto/WebAPI/qapps-2023-11-27/UpdateLibraryItem">AWS
628634
* API Reference</a></p>
629635
*/
@@ -647,6 +653,32 @@ namespace QApps
647653
return SubmitAsync(&QAppsClient::UpdateLibraryItem, request, handler, context);
648654
}
649655

656+
/**
657+
* <p>Updates the verification status of a library item for an Amazon Q
658+
* App.</p><p><h3>See Also:</h3> <a
659+
* href="http://docs.aws.amazon.com/goto/WebAPI/qapps-2023-11-27/UpdateLibraryItemMetadata">AWS
660+
* API Reference</a></p>
661+
*/
662+
virtual Model::UpdateLibraryItemMetadataOutcome UpdateLibraryItemMetadata(const Model::UpdateLibraryItemMetadataRequest& request) const;
663+
664+
/**
665+
* A Callable wrapper for UpdateLibraryItemMetadata that returns a future to the operation so that it can be executed in parallel to other requests.
666+
*/
667+
template<typename UpdateLibraryItemMetadataRequestT = Model::UpdateLibraryItemMetadataRequest>
668+
Model::UpdateLibraryItemMetadataOutcomeCallable UpdateLibraryItemMetadataCallable(const UpdateLibraryItemMetadataRequestT& request) const
669+
{
670+
return SubmitCallable(&QAppsClient::UpdateLibraryItemMetadata, request);
671+
}
672+
673+
/**
674+
* An Async wrapper for UpdateLibraryItemMetadata that queues the request into a thread executor and triggers associated callback when operation has finished.
675+
*/
676+
template<typename UpdateLibraryItemMetadataRequestT = Model::UpdateLibraryItemMetadataRequest>
677+
void UpdateLibraryItemMetadataAsync(const UpdateLibraryItemMetadataRequestT& request, const UpdateLibraryItemMetadataResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const
678+
{
679+
return SubmitAsync(&QAppsClient::UpdateLibraryItemMetadata, request, handler, context);
680+
}
681+
650682
/**
651683
* <p>Updates an existing Amazon Q App, allowing modifications to its title,
652684
* description, and definition.</p><p><h3>See Also:</h3> <a

generated/src/aws-cpp-sdk-qapps/include/aws/qapps/QAppsServiceClientModel.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ namespace Aws
9696
class TagResourceRequest;
9797
class UntagResourceRequest;
9898
class UpdateLibraryItemRequest;
99+
class UpdateLibraryItemMetadataRequest;
99100
class UpdateQAppRequest;
100101
class UpdateQAppSessionRequest;
101102
/* End of service model forward declarations required in QAppsClient header */
@@ -122,6 +123,7 @@ namespace Aws
122123
typedef Aws::Utils::Outcome<TagResourceResult, QAppsError> TagResourceOutcome;
123124
typedef Aws::Utils::Outcome<UntagResourceResult, QAppsError> UntagResourceOutcome;
124125
typedef Aws::Utils::Outcome<UpdateLibraryItemResult, QAppsError> UpdateLibraryItemOutcome;
126+
typedef Aws::Utils::Outcome<Aws::NoResult, QAppsError> UpdateLibraryItemMetadataOutcome;
125127
typedef Aws::Utils::Outcome<UpdateQAppResult, QAppsError> UpdateQAppOutcome;
126128
typedef Aws::Utils::Outcome<UpdateQAppSessionResult, QAppsError> UpdateQAppSessionOutcome;
127129
/* End of service model Outcome class definitions */
@@ -148,6 +150,7 @@ namespace Aws
148150
typedef std::future<TagResourceOutcome> TagResourceOutcomeCallable;
149151
typedef std::future<UntagResourceOutcome> UntagResourceOutcomeCallable;
150152
typedef std::future<UpdateLibraryItemOutcome> UpdateLibraryItemOutcomeCallable;
153+
typedef std::future<UpdateLibraryItemMetadataOutcome> UpdateLibraryItemMetadataOutcomeCallable;
151154
typedef std::future<UpdateQAppOutcome> UpdateQAppOutcomeCallable;
152155
typedef std::future<UpdateQAppSessionOutcome> UpdateQAppSessionOutcomeCallable;
153156
/* End of service model Outcome callable definitions */
@@ -177,6 +180,7 @@ namespace Aws
177180
typedef std::function<void(const QAppsClient*, const Model::TagResourceRequest&, const Model::TagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > TagResourceResponseReceivedHandler;
178181
typedef std::function<void(const QAppsClient*, const Model::UntagResourceRequest&, const Model::UntagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UntagResourceResponseReceivedHandler;
179182
typedef std::function<void(const QAppsClient*, const Model::UpdateLibraryItemRequest&, const Model::UpdateLibraryItemOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateLibraryItemResponseReceivedHandler;
183+
typedef std::function<void(const QAppsClient*, const Model::UpdateLibraryItemMetadataRequest&, const Model::UpdateLibraryItemMetadataOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateLibraryItemMetadataResponseReceivedHandler;
180184
typedef std::function<void(const QAppsClient*, const Model::UpdateQAppRequest&, const Model::UpdateQAppOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateQAppResponseReceivedHandler;
181185
typedef std::function<void(const QAppsClient*, const Model::UpdateQAppSessionRequest&, const Model::UpdateQAppSessionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateQAppSessionResponseReceivedHandler;
182186
/* End of service model async handlers definitions */

generated/src/aws-cpp-sdk-qapps/include/aws/qapps/model/CreateLibraryItemResult.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ namespace Model
116116
inline CreateLibraryItemResult& WithRatingCount(int value) { SetRatingCount(value); return *this;}
117117
///@}
118118

119+
///@{
120+
/**
121+
* <p>Indicates whether the library item has been verified.</p>
122+
*/
123+
inline bool GetIsVerified() const{ return m_isVerified; }
124+
inline void SetIsVerified(bool value) { m_isVerified = value; }
125+
inline CreateLibraryItemResult& WithIsVerified(bool value) { SetIsVerified(value); return *this;}
126+
///@}
127+
119128
///@{
120129

121130
inline const Aws::String& GetRequestId() const{ return m_requestId; }
@@ -142,6 +151,8 @@ namespace Model
142151

143152
int m_ratingCount;
144153

154+
bool m_isVerified;
155+
145156
Aws::String m_requestId;
146157
};
147158

generated/src/aws-cpp-sdk-qapps/include/aws/qapps/model/GetLibraryItemResult.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@ namespace Model
171171
inline GetLibraryItemResult& WithUserCount(int value) { SetUserCount(value); return *this;}
172172
///@}
173173

174+
///@{
175+
/**
176+
* <p>Indicates whether the library item has been verified.</p>
177+
*/
178+
inline bool GetIsVerified() const{ return m_isVerified; }
179+
inline void SetIsVerified(bool value) { m_isVerified = value; }
180+
inline GetLibraryItemResult& WithIsVerified(bool value) { SetIsVerified(value); return *this;}
181+
///@}
182+
174183
///@{
175184

176185
inline const Aws::String& GetRequestId() const{ return m_requestId; }
@@ -207,6 +216,8 @@ namespace Model
207216

208217
int m_userCount;
209218

219+
bool m_isVerified;
220+
210221
Aws::String m_requestId;
211222
};
212223

generated/src/aws-cpp-sdk-qapps/include/aws/qapps/model/LibraryItemMember.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,16 @@ namespace Model
189189
inline void SetUserCount(int value) { m_userCountHasBeenSet = true; m_userCount = value; }
190190
inline LibraryItemMember& WithUserCount(int value) { SetUserCount(value); return *this;}
191191
///@}
192+
193+
///@{
194+
/**
195+
* <p>Indicates whether the library item has been verified.</p>
196+
*/
197+
inline bool GetIsVerified() const{ return m_isVerified; }
198+
inline bool IsVerifiedHasBeenSet() const { return m_isVerifiedHasBeenSet; }
199+
inline void SetIsVerified(bool value) { m_isVerifiedHasBeenSet = true; m_isVerified = value; }
200+
inline LibraryItemMember& WithIsVerified(bool value) { SetIsVerified(value); return *this;}
201+
///@}
192202
private:
193203

194204
Aws::String m_libraryItemId;
@@ -226,6 +236,9 @@ namespace Model
226236

227237
int m_userCount;
228238
bool m_userCountHasBeenSet = false;
239+
240+
bool m_isVerified;
241+
bool m_isVerifiedHasBeenSet = false;
229242
};
230243

231244
} // namespace Model
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/qapps/QApps_EXPORTS.h>
8+
#include <aws/qapps/QAppsRequest.h>
9+
#include <aws/core/utils/memory/stl/AWSString.h>
10+
#include <utility>
11+
12+
namespace Aws
13+
{
14+
namespace QApps
15+
{
16+
namespace Model
17+
{
18+
19+
/**
20+
*/
21+
class UpdateLibraryItemMetadataRequest : public QAppsRequest
22+
{
23+
public:
24+
AWS_QAPPS_API UpdateLibraryItemMetadataRequest();
25+
26+
// Service request name is the Operation name which will send this request out,
27+
// each operation should has unique request name, so that we can get operation's name from this request.
28+
// Note: this is not true for response, multiple operations may have the same response name,
29+
// so we can not get operation's name from response.
30+
inline virtual const char* GetServiceRequestName() const override { return "UpdateLibraryItemMetadata"; }
31+
32+
AWS_QAPPS_API Aws::String SerializePayload() const override;
33+
34+
AWS_QAPPS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35+
36+
37+
///@{
38+
/**
39+
* <p>The unique identifier of the Amazon Q Business application environment
40+
* instance.</p>
41+
*/
42+
inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
43+
inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
44+
inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
45+
inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
46+
inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
47+
inline UpdateLibraryItemMetadataRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
48+
inline UpdateLibraryItemMetadataRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
49+
inline UpdateLibraryItemMetadataRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
50+
///@}
51+
52+
///@{
53+
/**
54+
* <p>The unique identifier of the updated library item.</p>
55+
*/
56+
inline const Aws::String& GetLibraryItemId() const{ return m_libraryItemId; }
57+
inline bool LibraryItemIdHasBeenSet() const { return m_libraryItemIdHasBeenSet; }
58+
inline void SetLibraryItemId(const Aws::String& value) { m_libraryItemIdHasBeenSet = true; m_libraryItemId = value; }
59+
inline void SetLibraryItemId(Aws::String&& value) { m_libraryItemIdHasBeenSet = true; m_libraryItemId = std::move(value); }
60+
inline void SetLibraryItemId(const char* value) { m_libraryItemIdHasBeenSet = true; m_libraryItemId.assign(value); }
61+
inline UpdateLibraryItemMetadataRequest& WithLibraryItemId(const Aws::String& value) { SetLibraryItemId(value); return *this;}
62+
inline UpdateLibraryItemMetadataRequest& WithLibraryItemId(Aws::String&& value) { SetLibraryItemId(std::move(value)); return *this;}
63+
inline UpdateLibraryItemMetadataRequest& WithLibraryItemId(const char* value) { SetLibraryItemId(value); return *this;}
64+
///@}
65+
66+
///@{
67+
/**
68+
* <p>The verification status of the library item</p>
69+
*/
70+
inline bool GetIsVerified() const{ return m_isVerified; }
71+
inline bool IsVerifiedHasBeenSet() const { return m_isVerifiedHasBeenSet; }
72+
inline void SetIsVerified(bool value) { m_isVerifiedHasBeenSet = true; m_isVerified = value; }
73+
inline UpdateLibraryItemMetadataRequest& WithIsVerified(bool value) { SetIsVerified(value); return *this;}
74+
///@}
75+
private:
76+
77+
Aws::String m_instanceId;
78+
bool m_instanceIdHasBeenSet = false;
79+
80+
Aws::String m_libraryItemId;
81+
bool m_libraryItemIdHasBeenSet = false;
82+
83+
bool m_isVerified;
84+
bool m_isVerifiedHasBeenSet = false;
85+
};
86+
87+
} // namespace Model
88+
} // namespace QApps
89+
} // namespace Aws

generated/src/aws-cpp-sdk-qapps/include/aws/qapps/model/UpdateLibraryItemResult.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@ namespace Model
171171
inline UpdateLibraryItemResult& WithUserCount(int value) { SetUserCount(value); return *this;}
172172
///@}
173173

174+
///@{
175+
/**
176+
* <p>Indicates whether the library item has been verified.</p>
177+
*/
178+
inline bool GetIsVerified() const{ return m_isVerified; }
179+
inline void SetIsVerified(bool value) { m_isVerified = value; }
180+
inline UpdateLibraryItemResult& WithIsVerified(bool value) { SetIsVerified(value); return *this;}
181+
///@}
182+
174183
///@{
175184

176185
inline const Aws::String& GetRequestId() const{ return m_requestId; }
@@ -207,6 +216,8 @@ namespace Model
207216

208217
int m_userCount;
209218

219+
bool m_isVerified;
220+
210221
Aws::String m_requestId;
211222
};
212223

generated/src/aws-cpp-sdk-qapps/include/aws/qapps/model/UserAppItem.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@ namespace Model
130130
inline UserAppItem& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;}
131131
inline UserAppItem& WithStatus(const char* value) { SetStatus(value); return *this;}
132132
///@}
133+
134+
///@{
135+
/**
136+
* <p>Indicates whether the Q App has been verified.</p>
137+
*/
138+
inline bool GetIsVerified() const{ return m_isVerified; }
139+
inline bool IsVerifiedHasBeenSet() const { return m_isVerifiedHasBeenSet; }
140+
inline void SetIsVerified(bool value) { m_isVerifiedHasBeenSet = true; m_isVerified = value; }
141+
inline UserAppItem& WithIsVerified(bool value) { SetIsVerified(value); return *this;}
142+
///@}
133143
private:
134144

135145
Aws::String m_appId;
@@ -152,6 +162,9 @@ namespace Model
152162

153163
Aws::String m_status;
154164
bool m_statusHasBeenSet = false;
165+
166+
bool m_isVerified;
167+
bool m_isVerifiedHasBeenSet = false;
155168
};
156169

157170
} // namespace Model

generated/src/aws-cpp-sdk-qapps/source/QAppsClient.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <aws/qapps/model/TagResourceRequest.h>
4343
#include <aws/qapps/model/UntagResourceRequest.h>
4444
#include <aws/qapps/model/UpdateLibraryItemRequest.h>
45+
#include <aws/qapps/model/UpdateLibraryItemMetadataRequest.h>
4546
#include <aws/qapps/model/UpdateQAppRequest.h>
4647
#include <aws/qapps/model/UpdateQAppSessionRequest.h>
4748

@@ -882,6 +883,38 @@ UpdateLibraryItemOutcome QAppsClient::UpdateLibraryItem(const UpdateLibraryItemR
882883
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
883884
}
884885

886+
UpdateLibraryItemMetadataOutcome QAppsClient::UpdateLibraryItemMetadata(const UpdateLibraryItemMetadataRequest& request) const
887+
{
888+
AWS_OPERATION_GUARD(UpdateLibraryItemMetadata);
889+
AWS_OPERATION_CHECK_PTR(m_endpointProvider, UpdateLibraryItemMetadata, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
890+
if (!request.InstanceIdHasBeenSet())
891+
{
892+
AWS_LOGSTREAM_ERROR("UpdateLibraryItemMetadata", "Required field: InstanceId, is not set");
893+
return UpdateLibraryItemMetadataOutcome(Aws::Client::AWSError<QAppsErrors>(QAppsErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InstanceId]", false));
894+
}
895+
AWS_OPERATION_CHECK_PTR(m_telemetryProvider, UpdateLibraryItemMetadata, CoreErrors, CoreErrors::NOT_INITIALIZED);
896+
auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {});
897+
auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {});
898+
AWS_OPERATION_CHECK_PTR(meter, UpdateLibraryItemMetadata, CoreErrors, CoreErrors::NOT_INITIALIZED);
899+
auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".UpdateLibraryItemMetadata",
900+
{{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
901+
smithy::components::tracing::SpanKind::CLIENT);
902+
return TracingUtils::MakeCallWithTiming<UpdateLibraryItemMetadataOutcome>(
903+
[&]()-> UpdateLibraryItemMetadataOutcome {
904+
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
905+
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); },
906+
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
907+
*meter,
908+
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
909+
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, UpdateLibraryItemMetadata, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
910+
endpointResolutionOutcome.GetResult().AddPathSegments("/catalog.updateItemMetadata");
911+
return UpdateLibraryItemMetadataOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
912+
},
913+
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
914+
*meter,
915+
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
916+
}
917+
885918
UpdateQAppOutcome QAppsClient::UpdateQApp(const UpdateQAppRequest& request) const
886919
{
887920
AWS_OPERATION_GUARD(UpdateQApp);

0 commit comments

Comments
 (0)