Skip to content

Commit af2bdd8

Browse files
author
Aaron Eaton
authored
Merge pull request #857 from haarchri/kinesis
Implements Kinesis Stream
2 parents 5c3ba97 + 29cd0b8 commit af2bdd8

20 files changed

Lines changed: 2725 additions & 1 deletion

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)
77
PLATFORMS ?= linux_amd64 linux_arm64
88

99
CODE_GENERATOR_COMMIT ?= 285d87b66b62fbfb859986ddf74c9f9b6ae743fb
10-
GENERATED_SERVICES="apigatewayv2,athena,cloudfront,cloudwatchlogs,dynamodb,elbv2,ec2,efs,glue,iot,kafka,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer,ram"
10+
GENERATED_SERVICES="apigatewayv2,athena,cloudfront,cloudwatchlogs,dynamodb,elbv2,ec2,efs,glue,iot,kafka,kinesis,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer,ram"
1111

1212
# kind-related versions
1313
KIND_VERSION ?= v0.11.1

apis/aws.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import (
4848
iamv1beta1 "github.com/crossplane/provider-aws/apis/iam/v1beta1"
4949
iotv1alpha1 "github.com/crossplane/provider-aws/apis/iot/v1alpha1"
5050
kafkav1alpha1 "github.com/crossplane/provider-aws/apis/kafka/v1alpha1"
51+
kinesisv1alpha1 "github.com/crossplane/provider-aws/apis/kinesis/v1alpha1"
5152
kmsv1alpha1 "github.com/crossplane/provider-aws/apis/kms/v1alpha1"
5253
lambdav1alpha1 "github.com/crossplane/provider-aws/apis/lambda/v1alpha1"
5354
mqv1alpha1 "github.com/crossplane/provider-aws/apis/mq/v1alpha1"
@@ -117,6 +118,7 @@ func init() {
117118
iotv1alpha1.SchemeBuilder.AddToScheme,
118119
athenav1alpha1.SchemeBuilder.AddToScheme,
119120
ramv1alpha1.SchemeBuilder.AddToScheme,
121+
kinesisv1alpha1.SchemeBuilder.AddToScheme,
120122
)
121123
}
122124

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
Copyright 2021 The Crossplane Authors.
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+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1alpha1
18+
19+
import (
20+
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
21+
)
22+
23+
// CustomStreamParameters contains the additional fields for StreamParameters.
24+
type CustomStreamParameters struct {
25+
// The retention period of the stream, in hours.
26+
// Default: 24 hours
27+
RetentionPeriodHours *int64 `json:"retentionPeriodHours,omitempty"`
28+
29+
// +optional
30+
// +crossplane:generate:reference:type=github.com/crossplane/provider-aws/apis/kms/v1alpha1.Key
31+
// +crossplane:generate:reference:extractor=github.com/crossplane/provider-aws/apis/kms/v1alpha1.KMSKeyARN()
32+
KMSKeyARN *string `json:"kmsKeyARN,omitempty"`
33+
34+
KMSKeyARNRef *xpv1.Reference `json:"kmsKeyARNRef,omitempty"`
35+
36+
KMSKeyARNSelector *xpv1.Selector `json:"kmsKeyARNSelector,omitempty"`
37+
38+
// List of shard-level metrics.
39+
//
40+
// The following are the valid shard-level metrics. The value "ALL" enhances
41+
// every metric.
42+
//
43+
// * IncomingBytes
44+
//
45+
// * IncomingRecords
46+
//
47+
// * OutgoingBytes
48+
//
49+
// * OutgoingRecords
50+
//
51+
// * WriteProvisionedThroughputExceeded
52+
//
53+
// * ReadProvisionedThroughputExceeded
54+
//
55+
// * IteratorAgeMilliseconds
56+
//
57+
// * ALL
58+
//
59+
// For more information, see Monitoring the Amazon Kinesis Data Streams Service
60+
// with Amazon CloudWatch (https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
61+
// in the Amazon Kinesis Data Streams Developer Guide.
62+
EnhancedMetrics []*EnhancedMetrics `json:"enhancedMetrics,omitempty"`
63+
64+
Tags []CustomTag `json:"tags,omitempty"`
65+
66+
// If this parameter is unset (null) or if you set it to false, and the stream
67+
// has registered consumers, the call to DeleteStream fails with a ResourceInUseException.
68+
EnforceConsumerDeletion *bool `json:"enforceConsumerDeletion,omitempty"`
69+
}
70+
71+
// CustomTag contains the additional fields for Tag.
72+
type CustomTag struct {
73+
// A unique identifier for the tag.
74+
Key string `json:"key"`
75+
76+
// An optional string, typically used to describe or define the tag.
77+
Value string `json:"value,omitempty"`
78+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
ignore:
2+
field_paths:
3+
- CreateStreamInput.StreamName
4+
resources:
5+
Stream:
6+
fields:
7+
StreamStatus:
8+
is_read_only: true
9+
from:
10+
operation: DescribeStream
11+
path: StreamDescription.StreamStatus
12+
StreamARN:
13+
is_read_only: true
14+
from:
15+
operation: DescribeStream
16+
path: StreamDescription.StreamARN
17+
Shards:
18+
is_read_only: true
19+
from:
20+
operation: DescribeStream
21+
path: StreamDescription.Shards
22+
RetentionPeriodHours:
23+
is_read_only: true
24+
from:
25+
operation: DescribeStream
26+
path: StreamDescription.RetentionPeriodHours
27+
KeyId:
28+
is_read_only: true
29+
from:
30+
operation: DescribeStream
31+
path: StreamDescription.KeyId
32+
HasMoreShards:
33+
is_read_only: true
34+
from:
35+
operation: DescribeStream
36+
path: StreamDescription.HasMoreShards
37+
EnhancedMonitoring:
38+
is_read_only: true
39+
from:
40+
operation: DescribeStream
41+
path: StreamDescription.EnhancedMonitoring
42+
EncryptionType:
43+
is_read_only: true
44+
from:
45+
operation: DescribeStream
46+
path: StreamDescription.EncryptionType
47+
exceptions:
48+
errors:
49+
404:
50+
code: ResourceNotFoundException

apis/kinesis/v1alpha1/zz_doc.go

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/kinesis/v1alpha1/zz_enums.go

Lines changed: 83 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)