Skip to content

Commit d7eede0

Browse files
The CheckDocumentAccess API for Amazon Q Business is a self-service debugging API that allows administrators to verify document access permissions and review Access Control List (ACL) configurations.
1 parent 2db3394 commit d7eede0

32 files changed

+2856
-177
lines changed

generator/ServiceModels/qbusiness/qbusiness-2023-11-27.api.json

Lines changed: 206 additions & 74 deletions
Large diffs are not rendered by default.

generator/ServiceModels/qbusiness/qbusiness-2023-11-27.docs.json

Lines changed: 106 additions & 6 deletions
Large diffs are not rendered by default.

generator/ServiceModels/qbusiness/qbusiness-2023-11-27.normal.json

Lines changed: 280 additions & 78 deletions
Large diffs are not rendered by default.

sdk/code-analysis/ServiceAnalysis/QBusiness/Generated/PropertyValueRules.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,35 @@
134134
<max>36</max>
135135
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]{35}</pattern>
136136
</property-value-rule>
137+
<property-value-rule>
138+
<property>Amazon.QBusiness.Model.CheckDocumentAccessRequest.ApplicationId</property>
139+
<min>36</min>
140+
<max>36</max>
141+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]{35}</pattern>
142+
</property-value-rule>
143+
<property-value-rule>
144+
<property>Amazon.QBusiness.Model.CheckDocumentAccessRequest.DataSourceId</property>
145+
<min>36</min>
146+
<max>36</max>
147+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]{35}</pattern>
148+
</property-value-rule>
149+
<property-value-rule>
150+
<property>Amazon.QBusiness.Model.CheckDocumentAccessRequest.DocumentId</property>
151+
<min>1</min>
152+
<max>1825</max>
153+
<pattern>\P{C}*</pattern>
154+
</property-value-rule>
155+
<property-value-rule>
156+
<property>Amazon.QBusiness.Model.CheckDocumentAccessRequest.IndexId</property>
157+
<min>36</min>
158+
<max>36</max>
159+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]{35}</pattern>
160+
</property-value-rule>
161+
<property-value-rule>
162+
<property>Amazon.QBusiness.Model.CheckDocumentAccessRequest.UserId</property>
163+
<min>1</min>
164+
<max>2048</max>
165+
</property-value-rule>
137166
<property-value-rule>
138167
<property>Amazon.QBusiness.Model.CreateApplicationRequest.ClientToken</property>
139168
<min>1</min>
@@ -1975,6 +2004,17 @@
19752004
<max>1000</max>
19762005
<pattern>[a-zA-Z0-9][a-zA-Z0-9_-]*</pattern>
19772006
</property-value-rule>
2007+
<property-value-rule>
2008+
<property>Amazon.QBusiness.Model.AssociatedGroup.Name</property>
2009+
<min>1</min>
2010+
<max>1024</max>
2011+
<pattern>\P{C}*</pattern>
2012+
</property-value-rule>
2013+
<property-value-rule>
2014+
<property>Amazon.QBusiness.Model.AssociatedUser.Id</property>
2015+
<min>1</min>
2016+
<max>2048</max>
2017+
</property-value-rule>
19782018
<property-value-rule>
19792019
<property>Amazon.QBusiness.Model.Attachment.AttachmentId</property>
19802020
<pattern>[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}</pattern>
@@ -2260,6 +2300,17 @@
22602300
<min>1</min>
22612301
<max>1024</max>
22622302
</property-value-rule>
2303+
<property-value-rule>
2304+
<property>Amazon.QBusiness.Model.DocumentAclGroup.Name</property>
2305+
<min>1</min>
2306+
<max>1024</max>
2307+
<pattern>\P{C}*</pattern>
2308+
</property-value-rule>
2309+
<property-value-rule>
2310+
<property>Amazon.QBusiness.Model.DocumentAclUser.Id</property>
2311+
<min>1</min>
2312+
<max>2048</max>
2313+
</property-value-rule>
22632314
<property-value-rule>
22642315
<property>Amazon.QBusiness.Model.DocumentAttribute.Name</property>
22652316
<min>1</min>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the qbusiness-2023-11-27.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.QBusiness.Model
31+
{
32+
/// <summary>
33+
/// Represents a group associated with a given user in the access control system.
34+
/// </summary>
35+
public partial class AssociatedGroup
36+
{
37+
private string _name;
38+
private MembershipType _type;
39+
40+
/// <summary>
41+
/// Gets and sets the property Name.
42+
/// <para>
43+
/// The name of the group associated with the user. This is used to identify the group
44+
/// in access control decisions.
45+
/// </para>
46+
/// </summary>
47+
[AWSProperty(Min=1, Max=1024)]
48+
public string Name
49+
{
50+
get { return this._name; }
51+
set { this._name = value; }
52+
}
53+
54+
// Check to see if Name property is set
55+
internal bool IsSetName()
56+
{
57+
return this._name != null;
58+
}
59+
60+
/// <summary>
61+
/// Gets and sets the property Type.
62+
/// <para>
63+
/// The type of the associated group. This indicates the scope of the group's applicability.
64+
/// </para>
65+
/// </summary>
66+
public MembershipType Type
67+
{
68+
get { return this._type; }
69+
set { this._type = value; }
70+
}
71+
72+
// Check to see if Type property is set
73+
internal bool IsSetType()
74+
{
75+
return this._type != null;
76+
}
77+
78+
}
79+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the qbusiness-2023-11-27.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.QBusiness.Model
31+
{
32+
/// <summary>
33+
/// Represents an associated user in the access control system.
34+
/// </summary>
35+
public partial class AssociatedUser
36+
{
37+
private string _id;
38+
private MembershipType _type;
39+
40+
/// <summary>
41+
/// Gets and sets the property Id.
42+
/// <para>
43+
/// The unique identifier of the associated user. This is used to identify the user in
44+
/// access control decisions.
45+
/// </para>
46+
/// </summary>
47+
[AWSProperty(Min=1, Max=2048)]
48+
public string Id
49+
{
50+
get { return this._id; }
51+
set { this._id = value; }
52+
}
53+
54+
// Check to see if Id property is set
55+
internal bool IsSetId()
56+
{
57+
return this._id != null;
58+
}
59+
60+
/// <summary>
61+
/// Gets and sets the property Type.
62+
/// <para>
63+
/// The type of the associated user. This indicates the scope of the user's association.
64+
/// </para>
65+
/// </summary>
66+
public MembershipType Type
67+
{
68+
get { return this._type; }
69+
set { this._type = value; }
70+
}
71+
72+
// Check to see if Type property is set
73+
internal bool IsSetType()
74+
{
75+
return this._type != null;
76+
}
77+
78+
}
79+
}
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the qbusiness-2023-11-27.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.QBusiness.Model
31+
{
32+
/// <summary>
33+
/// Container for the parameters to the CheckDocumentAccess operation.
34+
/// Verifies if a user has access permissions for a specified document and returns the
35+
/// actual ACL attached to the document. Resolves user access on the document via user
36+
/// aliases and groups when verifying user access.
37+
/// </summary>
38+
public partial class CheckDocumentAccessRequest : AmazonQBusinessRequest
39+
{
40+
private string _applicationId;
41+
private string _dataSourceId;
42+
private string _documentId;
43+
private string _indexId;
44+
private string _userId;
45+
46+
/// <summary>
47+
/// Gets and sets the property ApplicationId.
48+
/// <para>
49+
/// The unique identifier of the application. This is required to identify the specific
50+
/// Amazon Q Business application context for the document access check.
51+
/// </para>
52+
/// </summary>
53+
[AWSProperty(Required=true, Min=36, Max=36)]
54+
public string ApplicationId
55+
{
56+
get { return this._applicationId; }
57+
set { this._applicationId = value; }
58+
}
59+
60+
// Check to see if ApplicationId property is set
61+
internal bool IsSetApplicationId()
62+
{
63+
return this._applicationId != null;
64+
}
65+
66+
/// <summary>
67+
/// Gets and sets the property DataSourceId.
68+
/// <para>
69+
/// The unique identifier of the data source. Identifies the specific data source from
70+
/// which the document originates. Should not be used when a document is uploaded directly
71+
/// with BatchPutDocument, as no dataSourceId is available or necessary.
72+
/// </para>
73+
/// </summary>
74+
[AWSProperty(Min=36, Max=36)]
75+
public string DataSourceId
76+
{
77+
get { return this._dataSourceId; }
78+
set { this._dataSourceId = value; }
79+
}
80+
81+
// Check to see if DataSourceId property is set
82+
internal bool IsSetDataSourceId()
83+
{
84+
return this._dataSourceId != null;
85+
}
86+
87+
/// <summary>
88+
/// Gets and sets the property DocumentId.
89+
/// <para>
90+
/// The unique identifier of the document. Specifies which document's access permissions
91+
/// are being checked.
92+
/// </para>
93+
/// </summary>
94+
[AWSProperty(Required=true, Min=1, Max=1825)]
95+
public string DocumentId
96+
{
97+
get { return this._documentId; }
98+
set { this._documentId = value; }
99+
}
100+
101+
// Check to see if DocumentId property is set
102+
internal bool IsSetDocumentId()
103+
{
104+
return this._documentId != null;
105+
}
106+
107+
/// <summary>
108+
/// Gets and sets the property IndexId.
109+
/// <para>
110+
/// The unique identifier of the index. Used to locate the correct index within the application
111+
/// where the document is stored.
112+
/// </para>
113+
/// </summary>
114+
[AWSProperty(Required=true, Min=36, Max=36)]
115+
public string IndexId
116+
{
117+
get { return this._indexId; }
118+
set { this._indexId = value; }
119+
}
120+
121+
// Check to see if IndexId property is set
122+
internal bool IsSetIndexId()
123+
{
124+
return this._indexId != null;
125+
}
126+
127+
/// <summary>
128+
/// Gets and sets the property UserId.
129+
/// <para>
130+
/// The unique identifier of the user. Used to check the access permissions for this specific
131+
/// user against the document's ACL.
132+
/// </para>
133+
/// </summary>
134+
[AWSProperty(Required=true, Min=1, Max=2048)]
135+
public string UserId
136+
{
137+
get { return this._userId; }
138+
set { this._userId = value; }
139+
}
140+
141+
// Check to see if UserId property is set
142+
internal bool IsSetUserId()
143+
{
144+
return this._userId != null;
145+
}
146+
147+
}
148+
}

0 commit comments

Comments
 (0)