Skip to content

Commit

Permalink
aws: proto definition for s3 and iam resources for topology cache (#3022
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tolujimoh committed May 22, 2024
1 parent 32065d4 commit 6209809
Show file tree
Hide file tree
Showing 11 changed files with 3,123 additions and 7 deletions.
22 changes: 22 additions & 0 deletions api/aws/iam/v1/iam.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
syntax = "proto3";

package clutch.aws.iam.v1;

option go_package = "github.com/lyft/clutch/backend/api/aws/iam/v1;iamv1";

import "google/protobuf/timestamp.proto";
import "api/v1/annotations.proto";

message Role {
option (clutch.api.v1.id).patterns = {
type_url : "clutch.aws.iam.v1.Role",
pattern : "{account}/{region}/{name}"
};

string name = 1;
string id = 2;
string arn = 3;
google.protobuf.Timestamp created_date = 4;
string region = 5;
string account = 6;
}
35 changes: 35 additions & 0 deletions api/aws/s3/v1/s3.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
syntax = "proto3";

package clutch.aws.s3.v1;

option go_package = "github.com/lyft/clutch/backend/api/aws/s3/v1;s3v1";

import "google/protobuf/timestamp.proto";
import "api/v1/annotations.proto";

message Bucket {
option (clutch.api.v1.id).patterns = {
type_url : "clutch.aws.s3.v1.Bucket",
pattern : "{account}/{region}/{name}"
};

string name = 1;
string region = 2;
string account = 3;
}

message AccessPoint {
option (clutch.api.v1.id).patterns = {
type_url : "clutch.aws.s3.v1.AccessPoint",
pattern : "{account}/{region}/{name}"
};

string name = 1;
string bucket = 2;
string alias = 3;
google.protobuf.Timestamp creation_date = 4;
string bucket_account_id = 5;
string access_point_arn = 6;
string region = 7;
string account = 8;
}
75 changes: 75 additions & 0 deletions api/resolver/aws/v1/aws.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,78 @@ message DynamodbTableName {
option_field : {include_all_option : true, include_dynamic_options : "accounts"},
} ];
}

message S3BucketName {
option (clutch.resolver.v1.schema) = {
display_name : "name"
search : {enabled : true}
};

string name = 1 [ (clutch.resolver.v1.schema_field) = {
display_name : "Name",
required : true,
string_field : {
placeholder : "my-s3-bucket-name",
},
} ];

string region = 2 [ (clutch.resolver.v1.schema_field) = {
display_name : "Region",
option_field : {include_all_option : true, include_dynamic_options : "regions"},
} ];

string account = 3 [ (clutch.resolver.v1.schema_field) = {
display_name : "Account",
option_field : {include_all_option : true, include_dynamic_options : "accounts"},
} ];
}

message S3AccessPointName {
option (clutch.resolver.v1.schema) = {
display_name : "name"
search : {enabled : true}
};

string name = 1 [ (clutch.resolver.v1.schema_field) = {
display_name : "Name",
required : true,
string_field : {
placeholder : "my-s3-access-point-name",
},
} ];

string region = 2 [ (clutch.resolver.v1.schema_field) = {
display_name : "Region",
option_field : {include_all_option : true, include_dynamic_options : "regions"},
} ];

string account = 3 [ (clutch.resolver.v1.schema_field) = {
display_name : "Account",
option_field : {include_all_option : true, include_dynamic_options : "accounts"},
} ];
}

message IAMRoleName {
option (clutch.resolver.v1.schema) = {
display_name : "name"
search : {enabled : true}
};

string name = 1 [ (clutch.resolver.v1.schema_field) = {
display_name : "Name",
required : true,
string_field : {
placeholder : "my-iam-role-name",
},
} ];

string region = 2 [ (clutch.resolver.v1.schema_field) = {
display_name : "Region",
option_field : {include_all_option : true, include_dynamic_options : "regions"},
} ];

string account = 3 [ (clutch.resolver.v1.schema_field) = {
display_name : "Account",
option_field : {include_all_option : true, include_dynamic_options : "accounts"},
} ];
}
205 changes: 205 additions & 0 deletions backend/api/aws/iam/v1/iam.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6209809

Please sign in to comment.