Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Update AWS type generator #39

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "bicep-types"]
path = bicep-types
url = https://github.com/Azure/bicep-types
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug generator",
"type": "node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"--inspect-brk",
"--prefix",
"./src/aws-type-generator",
"start",
"--",
"--input",
"../../artifacts/types",
"--output",
"../../artifacts/bicep"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true
},
{
"name": "Debug Jest Tests",
"type": "node",
Expand Down
Binary file added artifacts/.DS_Store
Binary file not shown.
235 changes: 234 additions & 1 deletion artifacts/bicep/aws/aws.accessanalyzer/default/types.json
Original file line number Diff line number Diff line change
@@ -1 +1,234 @@
[{"1":{"Kind":1}},{"1":{"Kind":2}},{"1":{"Kind":3}},{"1":{"Kind":4}},{"1":{"Kind":5}},{"1":{"Kind":6}},{"1":{"Kind":7}},{"1":{"Kind":8}},{"2":{"Name":"ArchiveRule","Properties":{"Filter":{"Type":12,"Flags":1},"RuleName":{"Type":4,"Flags":1,"Description":"The archive rule name"}}}},{"2":{"Name":"Filter","Properties":{"Contains":{"Type":13,"Flags":0},"Eq":{"Type":14,"Flags":0},"Exists":{"Type":2,"Flags":0},"Neq":{"Type":15,"Flags":0},"Property":{"Type":4,"Flags":1}}}},{"2":{"Name":"Tag","Properties":{"Key":{"Type":4,"Flags":1,"Description":"The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. "},"Value":{"Type":4,"Flags":1,"Description":"The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. "}}}},{"2":{"Name":"UnusedAccessConfiguration","Properties":{"UnusedAccessAge":{"Type":3,"Flags":0,"Description":"The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 180 days."}}}},{"3":{"ItemType":9}},{"3":{"ItemType":4}},{"3":{"ItemType":4}},{"3":{"ItemType":4}},{"2":{"Name":"AWS.AccessAnalyzer/AnalyzerProperties","Properties":{"AnalyzerConfiguration":{"Type":17,"Flags":0,"Description":"The configuration for the analyzer"},"AnalyzerName":{"Type":4,"Flags":0,"Description":"Analyzer name"},"ArchiveRules":{"Type":18,"Flags":0},"Arn":{"Type":4,"Flags":18,"Description":"Amazon Resource Name (ARN) of the analyzer"},"Tags":{"Type":19,"Flags":0,"Description":"An array of key-value pairs to apply to this resource."},"Type":{"Type":4,"Flags":1,"Description":"The type of the analyzer, must be one of ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS or ORGANIZATION_UNUSED_ACCESS"}}}},{"2":{"Name":"Analyzer_AnalyzerConfiguration","Properties":{"UnusedAccessConfiguration":{"Type":11,"Flags":0}}}},{"3":{"ItemType":8}},{"3":{"ItemType":10}},{"2":{"Name":"AWS.AccessAnalyzer/Analyzer","Properties":{"name":{"Type":4,"Flags":0,"Description":"the resource name"},"alias":{"Type":4,"Flags":1,"Description":"the resource alias"},"properties":{"Type":16,"Flags":1,"Description":"properties of the resource"}}}},{"4":{"Name":"AWS.AccessAnalyzer/Analyzer@default","ScopeType":0,"Body":20}}]
[
{
"$type": "ObjectType",
"name": "ArchiveRule",
"properties": {
"Filter": {
"type": {
"$ref": "#/4"
},
"flags": 1
},
"RuleName": {
"type": {
"$ref": "#/5"
},
"flags": 1,
"description": "The archive rule name"
}
}
},
{
"$type": "ObjectType",
"name": "Filter",
"properties": {
"Contains": {
"type": {
"$ref": "#/6"
},
"flags": 0
},
"Eq": {
"type": {
"$ref": "#/7"
},
"flags": 0
},
"Exists": {
"type": {
"$ref": "#/8"
},
"flags": 0
},
"Neq": {
"type": {
"$ref": "#/9"
},
"flags": 0
},
"Property": {
"type": {
"$ref": "#/5"
},
"flags": 1
}
}
},
{
"$type": "ObjectType",
"name": "Tag",
"properties": {
"Key": {
"type": {
"$ref": "#/5"
},
"flags": 1,
"description": "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. "
},
"Value": {
"type": {
"$ref": "#/5"
},
"flags": 1,
"description": "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. "
}
}
},
{
"$type": "ObjectType",
"name": "UnusedAccessConfiguration",
"properties": {
"UnusedAccessAge": {
"type": {
"$ref": "#/10"
},
"flags": 0,
"description": "The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 180 days."
}
}
},
{
"$type": "ArrayType",
"itemType": {
"$ref": "#/1"
}
},
{
"$type": "StringType"
},
{
"$type": "ArrayType",
"itemType": {
"$ref": "#/5"
}
},
{
"$type": "ArrayType",
"itemType": {
"$ref": "#/5"
}
},
{
"$type": "BooleanType"
},
{
"$type": "ArrayType",
"itemType": {
"$ref": "#/5"
}
},
{
"$type": "IntegerType"
},
{
"$type": "StringLiteralType",
"value": "AWS.AccessAnalyzer/AnalyzerProperties"
},
{
"$type": "ObjectType",
"name": "Analyzer_AnalyzerConfiguration",
"properties": {
"UnusedAccessConfiguration": {
"type": {
"$ref": "#/3"
},
"flags": 0
}
}
},
{
"$type": "ArrayType",
"itemType": {
"$ref": "#/0"
}
},
{
"$type": "ArrayType",
"itemType": {
"$ref": "#/2"
}
},
{
"$type": "ObjectType",
"name": "AWS.AccessAnalyzer/AnalyzerProperties",
"properties": {
"AnalyzerConfiguration": {
"type": {
"$ref": "#/12"
},
"flags": 0,
"description": "The configuration for the analyzer"
},
"AnalyzerName": {
"type": {
"$ref": "#/5"
},
"flags": 0,
"description": "Analyzer name"
},
"ArchiveRules": {
"type": {
"$ref": "#/13"
},
"flags": 0
},
"Arn": {
"type": {
"$ref": "#/5"
},
"flags": 18,
"description": "Amazon Resource Name (ARN) of the analyzer"
},
"Tags": {
"type": {
"$ref": "#/14"
},
"flags": 0,
"description": "An array of key-value pairs to apply to this resource."
},
"Type": {
"type": {
"$ref": "#/5"
},
"flags": 1,
"description": "The type of the analyzer, must be one of ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS or ORGANIZATION_UNUSED_ACCESS"
}
}
},
{
"$type": "ObjectType",
"name": "AWS.AccessAnalyzer/Analyzer",
"properties": {
"name": {
"type": {
"$ref": "#/5"
},
"flags": 0,
"description": "the resource name"
},
"alias": {
"type": {
"$ref": "#/5"
},
"flags": 17,
"description": "the resource alias"
},
"properties": {
"type": {
"$ref": "#/15"
},
"flags": 17,
"description": "properties of the resource"
}
}
},
{
"$type": "ResourceType",
"name": "AWS.AccessAnalyzer/Analyzer@default",
"scopeType": 0,
"body": {
"$ref": "#/16"
},
"flags": 0
}
]
30 changes: 15 additions & 15 deletions artifacts/bicep/aws/aws.accessanalyzer/default/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,28 @@
## Resource AWS.AccessAnalyzer/Analyzer@default
* **Valid Scope(s)**: Unknown
### Properties
* **alias**: string (Required): the resource alias
* **alias**: string (Required, Identifier): the resource alias
* **name**: string: the resource name
* **properties**: [AWS.AccessAnalyzer/AnalyzerProperties](#awsaccessanalyzeranalyzerproperties) (Required): properties of the resource

## AWS.AccessAnalyzer/AnalyzerProperties
### Properties
* **AnalyzerConfiguration**: [Analyzer_AnalyzerConfiguration](#analyzeranalyzerconfiguration): The configuration for the analyzer
* **AnalyzerName**: string: Analyzer name
* **ArchiveRules**: [ArchiveRule](#archiverule)[]
* **Arn**: string (ReadOnly, Identifier): Amazon Resource Name (ARN) of the analyzer
* **Tags**: [Tag](#tag)[]: An array of key-value pairs to apply to this resource.
* **Type**: string (Required): The type of the analyzer, must be one of ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS or ORGANIZATION_UNUSED_ACCESS
* **properties**: [AWS.AccessAnalyzer/AnalyzerProperties](#awsaccessanalyzeranalyzerproperties) (Required, Identifier): properties of the resource

## Analyzer_AnalyzerConfiguration
### Properties
* **UnusedAccessConfiguration**: [UnusedAccessConfiguration](#unusedaccessconfiguration)

## UnusedAccessConfiguration
### Properties
* **UnusedAccessAge**: int: The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 180 days.

## ArchiveRule
### Properties
* **Filter**: [Filter](#filter)[] (Required)
* **RuleName**: string (Required): The archive rule name

## AWS.AccessAnalyzer/AnalyzerProperties
### Properties
* **AnalyzerConfiguration**: [Analyzer_AnalyzerConfiguration](#analyzeranalyzerconfiguration): The configuration for the analyzer
* **AnalyzerName**: string: Analyzer name
* **ArchiveRules**: [ArchiveRule](#archiverule)[]
* **Arn**: string (ReadOnly, Identifier): Amazon Resource Name (ARN) of the analyzer
* **Tags**: [Tag](#tag)[]: An array of key-value pairs to apply to this resource.
* **Type**: string (Required): The type of the analyzer, must be one of ACCOUNT, ORGANIZATION, ACCOUNT_UNUSED_ACCESS or ORGANIZATION_UNUSED_ACCESS

## Filter
### Properties
* **Contains**: string[]
Expand All @@ -42,3 +38,7 @@
* **Key**: string (Required): The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
* **Value**: string (Required): The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.

## UnusedAccessConfiguration
### Properties
* **UnusedAccessAge**: int: The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 180 days.

Loading
Loading