Skip to content

Commit 9d892ee

Browse files
Add Pipeline Role Arn as an optional parameter to the create / update pipeline APIs as an alternative to passing in the pipeline configuration body
1 parent f8e382c commit 9d892ee

File tree

10 files changed

+141
-3
lines changed

10 files changed

+141
-3
lines changed

generator/ServiceModels/osis/osis-2022-01-01.api.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@
342342
"VpcOptions":{"shape":"VpcOptions"},
343343
"BufferOptions":{"shape":"BufferOptions"},
344344
"EncryptionAtRestOptions":{"shape":"EncryptionAtRestOptions"},
345-
"Tags":{"shape":"TagList"}
345+
"Tags":{"shape":"TagList"},
346+
"PipelineRoleArn":{"shape":"PipelineRoleArn"}
346347
}
347348
},
348349
"CreatePipelineResponse":{
@@ -563,7 +564,8 @@
563564
"VpcEndpointService":{"shape":"String"},
564565
"ServiceVpcEndpoints":{"shape":"ServiceVpcEndpointsList"},
565566
"Destinations":{"shape":"PipelineDestinationList"},
566-
"Tags":{"shape":"TagList"}
567+
"Tags":{"shape":"TagList"},
568+
"PipelineRoleArn":{"shape":"PipelineRoleArn"}
567569
}
568570
},
569571
"PipelineArn":{
@@ -619,6 +621,12 @@
619621
"min":3,
620622
"pattern":"[a-z][a-z0-9\\-]+"
621623
},
624+
"PipelineRoleArn":{
625+
"type":"string",
626+
"max":2048,
627+
"min":20,
628+
"pattern":"^arn:(aws|aws\\-cn|aws\\-us\\-gov|aws\\-iso|aws\\-iso\\-b|aws\\-iso\\-e|aws\\-iso\\-f):iam::[0-9]+:role\\/.*$"
629+
},
622630
"PipelineStatus":{
623631
"type":"string",
624632
"enum":[
@@ -833,7 +841,8 @@
833841
"PipelineConfigurationBody":{"shape":"PipelineConfigurationBody"},
834842
"LogPublishingOptions":{"shape":"LogPublishingOptions"},
835843
"BufferOptions":{"shape":"BufferOptions"},
836-
"EncryptionAtRestOptions":{"shape":"EncryptionAtRestOptions"}
844+
"EncryptionAtRestOptions":{"shape":"EncryptionAtRestOptions"},
845+
"PipelineRoleArn":{"shape":"PipelineRoleArn"}
837846
}
838847
},
839848
"UpdatePipelineResponse":{

generator/ServiceModels/osis/osis-2022-01-01.docs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,14 @@
325325
"UpdatePipelineRequest$PipelineName": "<p>The name of the pipeline to update.</p>"
326326
}
327327
},
328+
"PipelineRoleArn": {
329+
"base": null,
330+
"refs": {
331+
"CreatePipelineRequest$PipelineRoleArn": "<p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href=\"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html\">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>",
332+
"Pipeline$PipelineRoleArn": "<p>The Amazon Resource Name (ARN) of the IAM role that provides the required permissions for a pipeline to read from the source and write to the sink.</p>",
333+
"UpdatePipelineRequest$PipelineRoleArn": "<p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href=\"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html\">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>"
334+
}
335+
},
328336
"PipelineStatus": {
329337
"base": null,
330338
"refs": {

generator/ServiceModels/osis/osis-2022-01-01.normal.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@
419419
"Tags":{
420420
"shape":"TagList",
421421
"documentation":"<p>List of tags to add to the pipeline upon creation.</p>"
422+
},
423+
"PipelineRoleArn":{
424+
"shape":"PipelineRoleArn",
425+
"documentation":"<p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href=\"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html\">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>"
422426
}
423427
}
424428
},
@@ -738,6 +742,10 @@
738742
"Tags":{
739743
"shape":"TagList",
740744
"documentation":"<p>A list of tags associated with the given pipeline.</p>"
745+
},
746+
"PipelineRoleArn":{
747+
"shape":"PipelineRoleArn",
748+
"documentation":"<p>The Amazon Resource Name (ARN) of the IAM role that provides the required permissions for a pipeline to read from the source and write to the sink.</p>"
741749
}
742750
},
743751
"documentation":"<p>Information about an existing OpenSearch Ingestion pipeline.</p>"
@@ -837,6 +845,12 @@
837845
"min":3,
838846
"pattern":"[a-z][a-z0-9\\-]+"
839847
},
848+
"PipelineRoleArn":{
849+
"type":"string",
850+
"max":2048,
851+
"min":20,
852+
"pattern":"^arn:(aws|aws\\-cn|aws\\-us\\-gov|aws\\-iso|aws\\-iso\\-b|aws\\-iso\\-e|aws\\-iso\\-f):iam::[0-9]+:role\\/.*$"
853+
},
840854
"PipelineStatus":{
841855
"type":"string",
842856
"enum":[
@@ -1128,6 +1142,10 @@
11281142
"EncryptionAtRestOptions":{
11291143
"shape":"EncryptionAtRestOptions",
11301144
"documentation":"<p>Key-value pairs to configure encryption for data that is written to a persistent buffer.</p>"
1145+
},
1146+
"PipelineRoleArn":{
1147+
"shape":"PipelineRoleArn",
1148+
"documentation":"<p>The Amazon Resource Name (ARN) of an IAM role that provides the required permissions for a pipeline to read from the source and write to the sink. For more information, see <a href=\"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html\">Setting up roles and users in Amazon OpenSearch Ingestion</a>.</p>"
11311149
}
11321150
}
11331151
},

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
<max>28</max>
2020
<pattern>[a-z][a-z0-9\-]+</pattern>
2121
</property-value-rule>
22+
<property-value-rule>
23+
<property>Amazon.OSIS.Model.CreatePipelineRequest.PipelineRoleArn</property>
24+
<min>20</min>
25+
<max>2048</max>
26+
<pattern>^arn:(aws|aws\-cn|aws\-us\-gov|aws\-iso|aws\-iso\-b|aws\-iso\-e|aws\-iso\-f):iam::[0-9]+:role\/.*$</pattern>
27+
</property-value-rule>
2228
<property-value-rule>
2329
<property>Amazon.OSIS.Model.DeletePipelineRequest.PipelineName</property>
2430
<min>3</min>
@@ -107,6 +113,12 @@
107113
<max>28</max>
108114
<pattern>[a-z][a-z0-9\-]+</pattern>
109115
</property-value-rule>
116+
<property-value-rule>
117+
<property>Amazon.OSIS.Model.UpdatePipelineRequest.PipelineRoleArn</property>
118+
<min>20</min>
119+
<max>2048</max>
120+
<pattern>^arn:(aws|aws\-cn|aws\-us\-gov|aws\-iso|aws\-iso\-b|aws\-iso\-e|aws\-iso\-f):iam::[0-9]+:role\/.*$</pattern>
121+
</property-value-rule>
110122
<property-value-rule>
111123
<property>Amazon.OSIS.Model.ValidatePipelineRequest.PipelineConfigurationBody</property>
112124
<min>1</min>
@@ -123,6 +135,12 @@
123135
<min>7</min>
124136
<max>2048</max>
125137
</property-value-rule>
138+
<property-value-rule>
139+
<property>Amazon.OSIS.Model.Pipeline.PipelineRoleArn</property>
140+
<min>20</min>
141+
<max>2048</max>
142+
<pattern>^arn:(aws|aws\-cn|aws\-us\-gov|aws\-iso|aws\-iso\-b|aws\-iso\-e|aws\-iso\-f):iam::[0-9]+:role\/.*$</pattern>
143+
</property-value-rule>
126144
<property-value-rule>
127145
<property>Amazon.OSIS.Model.PipelineSummary.MaxUnits</property>
128146
<min>1</min>

sdk/src/Services/OSIS/Generated/Model/CreatePipelineRequest.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public partial class CreatePipelineRequest : AmazonOSISRequest
4343
private int? _minUnits;
4444
private string _pipelineConfigurationBody;
4545
private string _pipelineName;
46+
private string _pipelineRoleArn;
4647
private List<Tag> _tags = AWSConfigs.InitializeCollections ? new List<Tag>() : null;
4748
private VpcOptions _vpcOptions;
4849

@@ -179,6 +180,28 @@ internal bool IsSetPipelineName()
179180
return this._pipelineName != null;
180181
}
181182

183+
/// <summary>
184+
/// Gets and sets the property PipelineRoleArn.
185+
/// <para>
186+
/// The Amazon Resource Name (ARN) of an IAM role that provides the required permissions
187+
/// for a pipeline to read from the source and write to the sink. For more information,
188+
/// see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html">Setting
189+
/// up roles and users in Amazon OpenSearch Ingestion</a>.
190+
/// </para>
191+
/// </summary>
192+
[AWSProperty(Min=20, Max=2048)]
193+
public string PipelineRoleArn
194+
{
195+
get { return this._pipelineRoleArn; }
196+
set { this._pipelineRoleArn = value; }
197+
}
198+
199+
// Check to see if PipelineRoleArn property is set
200+
internal bool IsSetPipelineRoleArn()
201+
{
202+
return this._pipelineRoleArn != null;
203+
}
204+
182205
/// <summary>
183206
/// Gets and sets the property Tags.
184207
/// <para>

sdk/src/Services/OSIS/Generated/Model/Internal/MarshallTransformations/CreatePipelineRequestMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ public IRequest Marshall(CreatePipelineRequest publicRequest)
130130
context.Writer.WriteStringValue(publicRequest.PipelineName);
131131
}
132132

133+
if(publicRequest.IsSetPipelineRoleArn())
134+
{
135+
context.Writer.WritePropertyName("PipelineRoleArn");
136+
context.Writer.WriteStringValue(publicRequest.PipelineRoleArn);
137+
}
138+
133139
if(publicRequest.IsSetTags())
134140
{
135141
context.Writer.WritePropertyName("Tags");

sdk/src/Services/OSIS/Generated/Model/Internal/MarshallTransformations/PipelineUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ public Pipeline Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8Jso
128128
unmarshalledObject.PipelineName = unmarshaller.Unmarshall(context, ref reader);
129129
continue;
130130
}
131+
if (context.TestExpression("PipelineRoleArn", targetDepth))
132+
{
133+
var unmarshaller = StringUnmarshaller.Instance;
134+
unmarshalledObject.PipelineRoleArn = unmarshaller.Unmarshall(context, ref reader);
135+
continue;
136+
}
131137
if (context.TestExpression("ServiceVpcEndpoints", targetDepth))
132138
{
133139
var unmarshaller = new JsonListUnmarshaller<ServiceVpcEndpoint, ServiceVpcEndpointUnmarshaller>(ServiceVpcEndpointUnmarshaller.Instance);

sdk/src/Services/OSIS/Generated/Model/Internal/MarshallTransformations/UpdatePipelineRequestMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ public IRequest Marshall(UpdatePipelineRequest publicRequest)
127127
context.Writer.WriteStringValue(publicRequest.PipelineConfigurationBody);
128128
}
129129

130+
if(publicRequest.IsSetPipelineRoleArn())
131+
{
132+
context.Writer.WritePropertyName("PipelineRoleArn");
133+
context.Writer.WriteStringValue(publicRequest.PipelineRoleArn);
134+
}
135+
130136
writer.WriteEndObject();
131137
writer.Flush();
132138
// ToArray() must be called here because aspects of sigv4 signing require a byte array

sdk/src/Services/OSIS/Generated/Model/Pipeline.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public partial class Pipeline
4646
private string _pipelineArn;
4747
private string _pipelineConfigurationBody;
4848
private string _pipelineName;
49+
private string _pipelineRoleArn;
4950
private List<ServiceVpcEndpoint> _serviceVpcEndpoints = AWSConfigs.InitializeCollections ? new List<ServiceVpcEndpoint>() : null;
5051
private PipelineStatus _status;
5152
private PipelineStatusReason _statusReason;
@@ -273,6 +274,26 @@ internal bool IsSetPipelineName()
273274
return this._pipelineName != null;
274275
}
275276

277+
/// <summary>
278+
/// Gets and sets the property PipelineRoleArn.
279+
/// <para>
280+
/// The Amazon Resource Name (ARN) of the IAM role that provides the required permissions
281+
/// for a pipeline to read from the source and write to the sink.
282+
/// </para>
283+
/// </summary>
284+
[AWSProperty(Min=20, Max=2048)]
285+
public string PipelineRoleArn
286+
{
287+
get { return this._pipelineRoleArn; }
288+
set { this._pipelineRoleArn = value; }
289+
}
290+
291+
// Check to see if PipelineRoleArn property is set
292+
internal bool IsSetPipelineRoleArn()
293+
{
294+
return this._pipelineRoleArn != null;
295+
}
296+
276297
/// <summary>
277298
/// Gets and sets the property ServiceVpcEndpoints.
278299
/// <para>

sdk/src/Services/OSIS/Generated/Model/UpdatePipelineRequest.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public partial class UpdatePipelineRequest : AmazonOSISRequest
4343
private int? _minUnits;
4444
private string _pipelineConfigurationBody;
4545
private string _pipelineName;
46+
private string _pipelineRoleArn;
4647

4748
/// <summary>
4849
/// Gets and sets the property BufferOptions.
@@ -176,5 +177,27 @@ internal bool IsSetPipelineName()
176177
return this._pipelineName != null;
177178
}
178179

180+
/// <summary>
181+
/// Gets and sets the property PipelineRoleArn.
182+
/// <para>
183+
/// The Amazon Resource Name (ARN) of an IAM role that provides the required permissions
184+
/// for a pipeline to read from the source and write to the sink. For more information,
185+
/// see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/pipeline-security-overview.html">Setting
186+
/// up roles and users in Amazon OpenSearch Ingestion</a>.
187+
/// </para>
188+
/// </summary>
189+
[AWSProperty(Min=20, Max=2048)]
190+
public string PipelineRoleArn
191+
{
192+
get { return this._pipelineRoleArn; }
193+
set { this._pipelineRoleArn = value; }
194+
}
195+
196+
// Check to see if PipelineRoleArn property is set
197+
internal bool IsSetPipelineRoleArn()
198+
{
199+
return this._pipelineRoleArn != null;
200+
}
201+
179202
}
180203
}

0 commit comments

Comments
 (0)