Merge branch 'gometalinter' of https://github.com/bforsyth927/lumi into bforsyth927-gometalinter

This commit is contained in:
Luke Hoban 2017-06-09 10:30:50 -07:00
commit 2870e8a0b1
41 changed files with 589 additions and 654 deletions

View file

@ -30,9 +30,12 @@ install:
.PHONY: lint
lint:
@echo "\033[0;32mLINT:\033[0m"
@golint -set_exit_status cmd/...
@golint -set_exit_status pkg/...
@gometalinter pkg/...
@gometalinter cmd/lumi/...
@gometalinter cmd/lumidl/...
.PHONY: lint_quiet
lint_quiet:
@echo "\033[0;32mLINT (quiet):\033[0m"

View file

@ -117,7 +117,7 @@ func deploy(cmd *cobra.Command, info *envCmdInfo, opts deployOptions) {
var header bytes.Buffer
printPrelude(&header, result, opts, false)
header.WriteString(fmt.Sprintf("%vDeploying changes:%v\n", colors.SpecUnimportant, colors.Reset))
fmt.Printf(colors.Colorize(&header))
fmt.Print(colors.Colorize(&header))
// Print a nice message if the update is an empty one.
empty := checkEmpty(info.Ctx.Diag, result.Plan)
@ -149,7 +149,7 @@ func deploy(cmd *cobra.Command, info *envCmdInfo, opts deployOptions) {
env := result.Info.Env
saveEnv(env, checkpoint, opts.Output, true /*overwrite*/)
fmt.Printf(colors.Colorize(&summary))
fmt.Print(colors.Colorize(&summary))
}
}
}
@ -198,7 +198,7 @@ func (prog *deployProgress) Before(step resource.Step) {
var b bytes.Buffer
b.WriteString(fmt.Sprintf("Applying step #%v [%v]%v\n", stepnum, stepop, extra))
printStep(&b, step, prog.Summary, false, "")
fmt.Printf(colors.Colorize(&b))
fmt.Print(colors.Colorize(&b))
}
func (prog *deployProgress) After(step resource.Step, state resource.State, err error) {
@ -211,7 +211,7 @@ func (prog *deployProgress) After(step resource.Step, state resource.State, err
if step.Op() == resource.OpCreate {
var b bytes.Buffer
printResourceOutputProperties(&b, step, "")
fmt.Printf(colors.Colorize(&b))
fmt.Print(colors.Colorize(&b))
}
} else {
// Issue a true, bonafide error.
@ -234,6 +234,6 @@ func (prog *deployProgress) After(step resource.Step, state resource.State, err
}
b.WriteString(colors.Reset)
b.WriteString("\n")
fmt.Printf(colors.Colorize(&b))
fmt.Print(colors.Colorize(&b))
}
}

View file

@ -104,7 +104,7 @@ func (eci *envCmdInfo) Close() error {
func confirmPrompt(msg string, name tokens.QName) bool {
prompt := fmt.Sprintf(msg, name)
fmt.Printf(
fmt.Print(
colors.ColorizeText(fmt.Sprintf("%v%v%v\n", colors.SpecAttention, prompt, colors.Reset)))
fmt.Printf("Please confirm that this is what you'd like to do by typing (\"%v\"): ", name)
reader := bufio.NewReader(os.Stdin)
@ -172,7 +172,7 @@ func removeEnv(env *resource.Env) {
deleteEnv(env)
msg := fmt.Sprintf("%sEnvironment '%s' has been removed!%s\n",
colors.SpecAttention, env.Name, colors.Reset)
fmt.Printf(colors.ColorizeText(msg))
fmt.Print(colors.ColorizeText(msg))
}
// backupEnv makes a backup of an existing file, in preparation for writing a new one. Instead of a copy, it
@ -271,7 +271,7 @@ func saveEnv(env *resource.Env, snap resource.Snapshot, file string, existok boo
// If it's not ok for the file to already exist, ensure that it doesn't.
if !existok {
if _, err := os.Stat(file); err == nil {
if _, locerr := os.Stat(file); locerr == nil {
cmdutil.Sink().Errorf(errors.ErrorIO, goerr.Errorf("file '%v' already exists", file))
return false
}

View file

@ -31,6 +31,7 @@ import (
"github.com/pulumi/lumi/pkg/util/cmdutil"
)
// NewLumiCmd creates a new Lumi Cmd instance.
func NewLumiCmd() *cobra.Command {
var logFlow bool
var logToStderr bool

View file

@ -53,7 +53,10 @@ func newPackInfoCmd() *cobra.Command {
var err error
if len(args) == 0 {
// No package specified, just load from the current directory.
pwd, _ := os.Getwd()
pwd, locerr := os.Getwd()
if locerr != nil {
return locerr
}
if pkg, err = detectPackage(pwd); err != nil {
return err
}
@ -277,7 +280,7 @@ func printClass(tok tokens.Type, class *ast.Class, exportOnly bool, indent strin
mods = append(mods, "@"+att.Decorator.Tok.String())
}
}
fmt.Printf(modString(mods))
fmt.Print(modString(mods))
if class.Extends != nil {
fmt.Printf("\n%vextends %v", indent+tab+tab, string(class.Extends.Tok))
@ -295,7 +298,7 @@ func printClass(tok tokens.Type, class *ast.Class, exportOnly bool, indent strin
memtok := tokens.NewClassMemberToken(tok, member)
printClassMember(memtok, (*class.Members)[member], exportOnly, indent+tab)
}
fmt.Printf(indent)
fmt.Print(indent)
}
fmt.Printf("}\n")
}

View file

@ -193,7 +193,7 @@ func printPlan(d diag.Sink, result *planResult, opts deployOptions) {
// Now walk the plan's steps and and pretty-print them out.
prelude.WriteString(fmt.Sprintf("%vPlanned changes:%v\n", colors.SpecUnimportant, colors.Reset))
fmt.Printf(colors.Colorize(&prelude))
fmt.Print(colors.Colorize(&prelude))
// Print a nice message if the update is an empty one.
if empty := checkEmpty(d, result.Plan); !empty {
@ -213,7 +213,7 @@ func printPlan(d diag.Sink, result *planResult, opts deployOptions) {
// Print a summary of operation counts.
printSummary(&summary, counts, opts.ShowReplaceSteps, true)
fmt.Printf(colors.Colorize(&summary))
fmt.Print(colors.Colorize(&summary))
}
}
@ -559,22 +559,22 @@ func printPropertyValueDiff(b *bytes.Buffer, title func(string), diff resource.V
a := diff.Array
for i := 0; i < a.Len(); i++ {
_, newIndent := getArrayElemHeader(b, i, indent)
title := func(id string) { printArrayElemHeader(b, i, id) }
titleFunc := func(id string) { printArrayElemHeader(b, i, id) }
if add, isadd := a.Adds[i]; isadd {
b.WriteString(resource.OpCreate.Color())
title(addIndent(indent))
titleFunc(addIndent(indent))
printPropertyValue(b, add, planning, addIndent(newIndent))
b.WriteString(colors.Reset)
} else if delete, isdelete := a.Deletes[i]; isdelete {
b.WriteString(resource.OpDelete.Color())
title(deleteIndent(indent))
titleFunc(deleteIndent(indent))
printPropertyValue(b, delete, planning, deleteIndent(newIndent))
b.WriteString(colors.Reset)
} else if update, isupdate := a.Updates[i]; isupdate {
title(indent)
titleFunc(indent)
printPropertyValueDiff(b, func(string) {}, update, causedReplace, planning, newIndent)
} else {
title(indent)
titleFunc(indent)
printPropertyValue(b, a.Sames[i], planning, newIndent)
}
}

View file

@ -1,36 +0,0 @@
// Licensed to Pulumi Corporation ("Pulumi") under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// Pulumi licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import * as lumix from "lumix";
// Echo is a simple service that wraps an API gateway and exposes a single Say function.
class Echo extends lumix.Service {
constructor(
// port is an optional port number for the API service.
port: number = 80
) {
new lumix.APIGateway({
api: this
port: port
});
}
// Say simply echoes back the given string.
@lumix.api()
public Say(s: string): string {
return s;
}
}

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable: ordered-imports */
import {builders, providers} from "./cicd";
import * as github from "./github";
import * as slack from "@slack/client";

View file

@ -22,7 +22,7 @@ import * as config from "../config";
// instanceTypeArch is a map of instance type to its architecture.
export let instanceTypeArch: {
[instanceType: string]: string
[instanceType: string]: string,
} = {
"t1.micro" : "PV64" ,
"t2.nano" : "HVM64",
@ -81,7 +81,7 @@ export let instanceTypeArch: {
// regionArchLinuxAMI is a map from region to inner maps from architecture to the recommended Linux AMI.
export let regionArchLinuxAMI: {
[region: string]: { [arch: string]: string; }
[region: string]: { [arch: string]: string; },
} = {
"us-east-1": {
"PV64" : "ami-2a69aa47",
@ -157,7 +157,7 @@ export let regionArchLinuxAMI: {
"PV64" : "ami-77559f1a",
"HVM64": "ami-8e6aa0e3",
"HVMG2": "NOT_SUPPORTED",
}
},
};
// getLinuxAMI gets the recommended Linux AMI for the given instance in the current AWS region.

View file

@ -1,261 +1,262 @@
import {ARN} from "../types"
/* tslint:disable:max-line-length ordered-imports variable-name */
import {ARN} from "../types";
export const AWSAccountActivityAccess: ARN = "arn:aws:iam::aws:policy/AWSAccountActivityAccess"
export const AWSAccountUsageReportAccess: ARN = "arn:aws:iam::aws:policy/AWSAccountUsageReportAccess"
export const AWSAgentlessDiscoveryService: ARN = "arn:aws:iam::aws:policy/AWSAgentlessDiscoveryService"
export const AWSApplicationDiscoveryAgentAccess: ARN = "arn:aws:iam::aws:policy/AWSApplicationDiscoveryAgentAccess"
export const AWSApplicationDiscoveryServiceFullAccess: ARN = "arn:aws:iam::aws:policy/AWSApplicationDiscoveryServiceFullAccess"
export const AWSBatchFullAccess: ARN = "arn:aws:iam::aws:policy/AWSBatchFullAccess"
export const AWSBatchServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole"
export const AWSCertificateManagerFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCertificateManagerFullAccess"
export const AWSCertificateManagerReadOnly: ARN = "arn:aws:iam::aws:policy/AWSCertificateManagerReadOnly"
export const AWSCloudFormationReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudFormationReadOnlyAccess"
export const AWSCloudHSMFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudHSMFullAccess"
export const AWSCloudHSMReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudHSMReadOnlyAccess"
export const AWSCloudHSMRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSCloudHSMRole"
export const AWSCloudTrailFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudTrailFullAccess"
export const AWSCloudTrailReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudTrailReadOnlyAccess"
export const AWSCodeBuildAdminAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeBuildAdminAccess"
export const AWSCodeBuildDeveloperAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeBuildDeveloperAccess"
export const AWSCodeBuildReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeBuildReadOnlyAccess"
export const AWSCodeCommitFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeCommitFullAccess"
export const AWSCodeCommitPowerUser: ARN = "arn:aws:iam::aws:policy/AWSCodeCommitPowerUser"
export const AWSCodeCommitReadOnly: ARN = "arn:aws:iam::aws:policy/AWSCodeCommitReadOnly"
export const AWSCodeDeployDeployerAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeDeployDeployerAccess"
export const AWSCodeDeployFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeDeployFullAccess"
export const AWSCodeDeployReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeDeployReadOnlyAccess"
export const AWSCodeDeployRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSCodeDeployRole"
export const AWSCodePipelineApproverAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineApproverAccess"
export const AWSCodePipelineCustomActionAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineCustomActionAccess"
export const AWSCodePipelineFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineFullAccess"
export const AWSCodePipelineReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineReadOnlyAccess"
export const AWSCodeStarFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeStarFullAccess"
export const AWSCodeStarServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSCodeStarServiceRole"
export const AWSConfigRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSConfigRole"
export const AWSConfigRulesExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSConfigRulesExecutionRole"
export const AWSConfigUserAccess: ARN = "arn:aws:iam::aws:policy/AWSConfigUserAccess"
export const AWSConnector: ARN = "arn:aws:iam::aws:policy/AWSConnector"
export const AWSDataPipelineRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSDataPipelineRole"
export const AWSDataPipeline_FullAccess: ARN = "arn:aws:iam::aws:policy/AWSDataPipeline_FullAccess"
export const AWSDataPipeline_PowerUser: ARN = "arn:aws:iam::aws:policy/AWSDataPipeline_PowerUser"
export const AWSDeviceFarmFullAccess: ARN = "arn:aws:iam::aws:policy/AWSDeviceFarmFullAccess"
export const AWSDirectConnectFullAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectConnectFullAccess"
export const AWSDirectConnectReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectConnectReadOnlyAccess"
export const AWSDirectoryServiceFullAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectoryServiceFullAccess"
export const AWSDirectoryServiceReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectoryServiceReadOnlyAccess"
export const AWSElasticBeanstalkCustomPlatformforEC2Role: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkCustomPlatformforEC2Role"
export const AWSElasticBeanstalkEnhancedHealth: ARN = "arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkEnhancedHealth"
export const AWSElasticBeanstalkFullAccess: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkFullAccess"
export const AWSElasticBeanstalkMulticontainerDocker: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkMulticontainerDocker"
export const AWSElasticBeanstalkReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkReadOnlyAccess"
export const AWSElasticBeanstalkService: ARN = "arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkService"
export const AWSElasticBeanstalkWebTier: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier"
export const AWSElasticBeanstalkWorkerTier: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkWorkerTier"
export const AWSGreengrassFullAccess: ARN = "arn:aws:iam::aws:policy/AWSGreengrassFullAccess"
export const AWSGreengrassResourceAccessRolePolicy: ARN = "arn:aws:iam::aws:policy/service-role/AWSGreengrassResourceAccessRolePolicy"
export const AWSHealthFullAccess: ARN = "arn:aws:iam::aws:policy/AWSHealthFullAccess"
export const AWSImportExportFullAccess: ARN = "arn:aws:iam::aws:policy/AWSImportExportFullAccess"
export const AWSImportExportReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSImportExportReadOnlyAccess"
export const AWSIoTConfigAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTConfigAccess"
export const AWSIoTConfigReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTConfigReadOnlyAccess"
export const AWSIoTDataAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTDataAccess"
export const AWSIoTFullAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTFullAccess"
export const AWSIoTLogging: ARN = "arn:aws:iam::aws:policy/service-role/AWSIoTLogging"
export const AWSIoTRuleActions: ARN = "arn:aws:iam::aws:policy/service-role/AWSIoTRuleActions"
export const AWSKeyManagementServicePowerUser: ARN = "arn:aws:iam::aws:policy/AWSKeyManagementServicePowerUser"
export const AWSLambdaBasicExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
export const AWSLambdaDynamoDBExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaDynamoDBExecutionRole"
export const AWSLambdaENIManagementAccess: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaENIManagementAccess"
export const AWSLambdaExecute: ARN = "arn:aws:iam::aws:policy/AWSLambdaExecute"
export const AWSLambdaFullAccess: ARN = "arn:aws:iam::aws:policy/AWSLambdaFullAccess"
export const AWSLambdaInvocationDynamoDB: ARN = "arn:aws:iam::aws:policy/AWSLambdaInvocation-DynamoDB"
export const AWSLambdaKinesisExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole"
export const AWSLambdaReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSLambdaReadOnlyAccess"
export const AWSLambdaRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaRole"
export const AWSLambdaVPCAccessExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"
export const AWSMarketplaceFullAccess: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceFullAccess"
export const AWSMarketplaceGetEntitlements: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceGetEntitlements"
export const AWSMarketplaceManageSubscriptions: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceManageSubscriptions"
export const AWSMarketplaceMeteringFullAccess: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceMeteringFullAccess"
export const AWSMarketplaceReadonly: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceRead-only"
export const AWSMobileHub_FullAccess: ARN = "arn:aws:iam::aws:policy/AWSMobileHub_FullAccess"
export const AWSMobileHub_ReadOnly: ARN = "arn:aws:iam::aws:policy/AWSMobileHub_ReadOnly"
export const AWSMobileHub_ServiceUseOnly: ARN = "arn:aws:iam::aws:policy/service-role/AWSMobileHub_ServiceUseOnly"
export const AWSOpsWorksCMInstanceProfileRole: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksCMInstanceProfileRole"
export const AWSOpsWorksCMServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSOpsWorksCMServiceRole"
export const AWSOpsWorksCloudWatchLogs: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksCloudWatchLogs"
export const AWSOpsWorksFullAccess: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksFullAccess"
export const AWSOpsWorksInstanceRegistration: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksInstanceRegistration"
export const AWSOpsWorksRegisterCLI: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksRegisterCLI"
export const AWSOpsWorksRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSOpsWorksRole"
export const AWSQuickSightDescribeRDS: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuickSightDescribeRDS"
export const AWSQuickSightDescribeRedshift: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuickSightDescribeRedshift"
export const AWSQuickSightListIAM: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuickSightListIAM"
export const AWSQuicksightAthenaAccess: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuicksightAthenaAccess"
export const AWSStepFunctionsConsoleFullAccess: ARN = "arn:aws:iam::aws:policy/AWSStepFunctionsConsoleFullAccess"
export const AWSStepFunctionsFullAccess: ARN = "arn:aws:iam::aws:policy/AWSStepFunctionsFullAccess"
export const AWSStepFunctionsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSStepFunctionsReadOnlyAccess"
export const AWSStorageGatewayFullAccess: ARN = "arn:aws:iam::aws:policy/AWSStorageGatewayFullAccess"
export const AWSStorageGatewayReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSStorageGatewayReadOnlyAccess"
export const AWSSupportAccess: ARN = "arn:aws:iam::aws:policy/AWSSupportAccess"
export const AWSWAFFullAccess: ARN = "arn:aws:iam::aws:policy/AWSWAFFullAccess"
export const AWSWAFReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSWAFReadOnlyAccess"
export const AWSXrayFullAccess: ARN = "arn:aws:iam::aws:policy/AWSXrayFullAccess"
export const AWSXrayReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSXrayReadOnlyAccess"
export const AWSXrayWriteOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess"
export const AdministratorAccess: ARN = "arn:aws:iam::aws:policy/AdministratorAccess"
export const AmazonAPIGatewayAdministrator: ARN = "arn:aws:iam::aws:policy/AmazonAPIGatewayAdministrator"
export const AmazonAPIGatewayInvokeFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonAPIGatewayInvokeFullAccess"
export const AmazonAPIGatewayPushToCloudWatchLogs: ARN = "arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"
export const AmazonAppStreamFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonAppStreamFullAccess"
export const AmazonAppStreamReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonAppStreamReadOnlyAccess"
export const AmazonAppStreamServiceAccess: ARN = "arn:aws:iam::aws:policy/service-role/AmazonAppStreamServiceAccess"
export const AmazonAthenaFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonAthenaFullAccess"
export const AmazonCloudDirectoryFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonCloudDirectoryFullAccess"
export const AmazonCloudDirectoryReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonCloudDirectoryReadOnlyAccess"
export const AmazonCognitoDeveloperAuthenticatedIdentities: ARN = "arn:aws:iam::aws:policy/AmazonCognitoDeveloperAuthenticatedIdentities"
export const AmazonCognitoPowerUser: ARN = "arn:aws:iam::aws:policy/AmazonCognitoPowerUser"
export const AmazonCognitoReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonCognitoReadOnly"
export const AmazonDMSCloudWatchLogsRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole"
export const AmazonDMSRedshiftS3Role: ARN = "arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role"
export const AmazonDMSVPCManagementRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole"
export const AmazonDRSVPCManagement: ARN = "arn:aws:iam::aws:policy/AmazonDRSVPCManagement"
export const AmazonDynamoDBFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess"
export const AmazonDynamoDBFullAccesswithDataPipeline: ARN = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccesswithDataPipeline"
export const AmazonDynamoDBReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonDynamoDBReadOnlyAccess"
export const AmazonEC2ContainerRegistryFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess"
export const AmazonEC2ContainerRegistryPowerUser: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser"
export const AmazonEC2ContainerRegistryReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
export const AmazonEC2ContainerServiceAutoscaleRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceAutoscaleRole"
export const AmazonEC2ContainerServiceFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess"
export const AmazonEC2ContainerServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceRole"
export const AmazonEC2ContainerServiceforEC2Role: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
export const AmazonEC2FullAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2FullAccess"
export const AmazonEC2ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess"
export const AmazonEC2ReportsAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ReportsAccess"
export const AmazonEC2RoleforAWSCodeDeploy: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforAWSCodeDeploy"
export const AmazonEC2RoleforDataPipelineRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforDataPipelineRole"
export const AmazonEC2RoleforSSM: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM"
export const AmazonEC2SpotFleetAutoscaleRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2SpotFleetAutoscaleRole"
export const AmazonEC2SpotFleetRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2SpotFleetRole"
export const AmazonESFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonESFullAccess"
export const AmazonESReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonESReadOnlyAccess"
export const AmazonElastiCacheFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElastiCacheFullAccess"
export const AmazonElastiCacheReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElastiCacheReadOnlyAccess"
export const AmazonElasticFileSystemFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticFileSystemFullAccess"
export const AmazonElasticFileSystemReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticFileSystemReadOnlyAccess"
export const AmazonElasticMapReduceFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticMapReduceFullAccess"
export const AmazonElasticMapReduceReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticMapReduceReadOnlyAccess"
export const AmazonElasticMapReduceRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceRole"
export const AmazonElasticMapReduceforAutoScalingRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforAutoScalingRole"
export const AmazonElasticMapReduceforEC2Role: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role"
export const AmazonElasticTranscoderFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticTranscoderFullAccess"
export const AmazonElasticTranscoderJobsSubmitter: ARN = "arn:aws:iam::aws:policy/AmazonElasticTranscoderJobsSubmitter"
export const AmazonElasticTranscoderReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticTranscoderReadOnlyAccess"
export const AmazonElasticTranscoderRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticTranscoderRole"
export const AmazonGlacierFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonGlacierFullAccess"
export const AmazonGlacierReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonGlacierReadOnlyAccess"
export const AmazonInspectorFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonInspectorFullAccess"
export const AmazonInspectorReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonInspectorReadOnlyAccess"
export const AmazonKinesisAnalyticsFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisAnalyticsFullAccess"
export const AmazonKinesisAnalyticsReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonKinesisAnalyticsReadOnly"
export const AmazonKinesisFirehoseFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisFirehoseFullAccess"
export const AmazonKinesisFirehoseReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisFirehoseReadOnlyAccess"
export const AmazonKinesisFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisFullAccess"
export const AmazonKinesisReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisReadOnlyAccess"
export const AmazonLexFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonLexFullAccess"
export const AmazonLexReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonLexReadOnly"
export const AmazonLexRunBotsOnly: ARN = "arn:aws:iam::aws:policy/AmazonLexRunBotsOnly"
export const AmazonMachineLearningBatchPredictionsAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningBatchPredictionsAccess"
export const AmazonMachineLearningCreateOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningCreateOnlyAccess"
export const AmazonMachineLearningFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningFullAccess"
export const AmazonMachineLearningManageRealTimeEndpointOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningManageRealTimeEndpointOnlyAccess"
export const AmazonMachineLearningReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningReadOnlyAccess"
export const AmazonMachineLearningRealTimePredictionOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningRealTimePredictionOnlyAccess"
export const AmazonMachineLearningRoleforRedshiftDataSource: ARN = "arn:aws:iam::aws:policy/service-role/AmazonMachineLearningRoleforRedshiftDataSource"
export const AmazonMechanicalTurkFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonMechanicalTurkFullAccess"
export const AmazonMechanicalTurkReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonMechanicalTurkReadOnly"
export const AmazonMobileAnalyticsFinancialReportAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsFinancialReportAccess"
export const AmazonMobileAnalyticsFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsFullAccess"
export const AmazonMobileAnalyticsNonfinancialReportAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsNon-financialReportAccess"
export const AmazonMobileAnalyticsWriteOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsWriteOnlyAccess"
export const AmazonPollyFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonPollyFullAccess"
export const AmazonPollyReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonPollyReadOnlyAccess"
export const AmazonRDSDirectoryServiceAccess: ARN = "arn:aws:iam::aws:policy/service-role/AmazonRDSDirectoryServiceAccess"
export const AmazonRDSEnhancedMonitoringRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole"
export const AmazonRDSFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRDSFullAccess"
export const AmazonRDSReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRDSReadOnlyAccess"
export const AmazonRedshiftFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRedshiftFullAccess"
export const AmazonRedshiftReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRedshiftReadOnlyAccess"
export const AmazonRekognitionFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRekognitionFullAccess"
export const AmazonRekognitionReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRekognitionReadOnlyAccess"
export const AmazonRoute53DomainsFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53DomainsFullAccess"
export const AmazonRoute53DomainsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53DomainsReadOnlyAccess"
export const AmazonRoute53FullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53FullAccess"
export const AmazonRoute53ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53ReadOnlyAccess"
export const AmazonS3FullAccess: ARN = "arn:aws:iam::aws:policy/AmazonS3FullAccess"
export const AmazonS3ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
export const AmazonSESFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSESFullAccess"
export const AmazonSESReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSESReadOnlyAccess"
export const AmazonSNSFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSNSFullAccess"
export const AmazonSNSReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSNSReadOnlyAccess"
export const AmazonSNSRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonSNSRole"
export const AmazonSQSFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSQSFullAccess"
export const AmazonSQSReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSQSReadOnlyAccess"
export const AmazonSSMAutomationRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonSSMAutomationRole"
export const AmazonSSMFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSSMFullAccess"
export const AmazonSSMMaintenanceWindowRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonSSMMaintenanceWindowRole"
export const AmazonSSMReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSSMReadOnlyAccess"
export const AmazonVPCFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonVPCFullAccess"
export const AmazonVPCReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonVPCReadOnlyAccess"
export const AmazonWorkMailFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonWorkMailFullAccess"
export const AmazonWorkMailReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonWorkMailReadOnlyAccess"
export const AmazonWorkSpacesAdmin: ARN = "arn:aws:iam::aws:policy/AmazonWorkSpacesAdmin"
export const AmazonWorkSpacesApplicationManagerAdminAccess: ARN = "arn:aws:iam::aws:policy/AmazonWorkSpacesApplicationManagerAdminAccess"
export const AmazonZocaloFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonZocaloFullAccess"
export const AmazonZocaloReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonZocaloReadOnlyAccess"
export const ApplicationAutoScalingForAmazonAppStreamAccess: ARN = "arn:aws:iam::aws:policy/service-role/ApplicationAutoScalingForAmazonAppStreamAccess"
export const AutoScalingConsoleFullAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingConsoleFullAccess"
export const AutoScalingConsoleReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingConsoleReadOnlyAccess"
export const AutoScalingFullAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingFullAccess"
export const AutoScalingNotificationAccessRole: ARN = "arn:aws:iam::aws:policy/service-role/AutoScalingNotificationAccessRole"
export const AutoScalingReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingReadOnlyAccess"
export const Billing: ARN = "arn:aws:iam::aws:policy/job-function/Billing"
export const CloudFrontFullAccess: ARN = "arn:aws:iam::aws:policy/CloudFrontFullAccess"
export const CloudFrontReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudFrontReadOnlyAccess"
export const CloudSearchFullAccess: ARN = "arn:aws:iam::aws:policy/CloudSearchFullAccess"
export const CloudSearchReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudSearchReadOnlyAccess"
export const CloudWatchActionsEC2Access: ARN = "arn:aws:iam::aws:policy/CloudWatchActionsEC2Access"
export const CloudWatchEventsBuiltInTargetExecutionAccess: ARN = "arn:aws:iam::aws:policy/service-role/CloudWatchEventsBuiltInTargetExecutionAccess"
export const CloudWatchEventsFullAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchEventsFullAccess"
export const CloudWatchEventsInvocationAccess: ARN = "arn:aws:iam::aws:policy/service-role/CloudWatchEventsInvocationAccess"
export const CloudWatchEventsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchEventsReadOnlyAccess"
export const CloudWatchFullAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchFullAccess"
export const CloudWatchLogsFullAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchLogsFullAccess"
export const CloudWatchLogsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchLogsReadOnlyAccess"
export const CloudWatchReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess"
export const DataScientist: ARN = "arn:aws:iam::aws:policy/job-function/DataScientist"
export const DatabaseAdministrator: ARN = "arn:aws:iam::aws:policy/job-function/DatabaseAdministrator"
export const IAMFullAccess: ARN = "arn:aws:iam::aws:policy/IAMFullAccess"
export const IAMReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/IAMReadOnlyAccess"
export const IAMSelfManageServiceSpecificCredentials: ARN = "arn:aws:iam::aws:policy/IAMSelfManageServiceSpecificCredentials"
export const IAMUserChangePassword: ARN = "arn:aws:iam::aws:policy/IAMUserChangePassword"
export const IAMUserSSHKeys: ARN = "arn:aws:iam::aws:policy/IAMUserSSHKeys"
export const NetworkAdministrator: ARN = "arn:aws:iam::aws:policy/job-function/NetworkAdministrator"
export const PowerUserAccess: ARN = "arn:aws:iam::aws:policy/PowerUserAccess"
export const RDSCloudHsmAuthorizationRole: ARN = "arn:aws:iam::aws:policy/service-role/RDSCloudHsmAuthorizationRole"
export const ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/ReadOnlyAccess"
export const ResourceGroupsandTagEditorFullAccess: ARN = "arn:aws:iam::aws:policy/ResourceGroupsandTagEditorFullAccess"
export const ResourceGroupsandTagEditorReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/ResourceGroupsandTagEditorReadOnlyAccess"
export const SecurityAudit: ARN = "arn:aws:iam::aws:policy/SecurityAudit"
export const ServerMigrationConnector: ARN = "arn:aws:iam::aws:policy/ServerMigrationConnector"
export const ServerMigrationServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/ServerMigrationServiceRole"
export const ServiceCatalogAdminFullAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogAdminFullAccess"
export const ServiceCatalogAdminReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogAdminReadOnlyAccess"
export const ServiceCatalogEndUserAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogEndUserAccess"
export const ServiceCatalogEndUserFullAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogEndUserFullAccess"
export const SimpleWorkflowFullAccess: ARN = "arn:aws:iam::aws:policy/SimpleWorkflowFullAccess"
export const SupportUser: ARN = "arn:aws:iam::aws:policy/job-function/SupportUser"
export const SystemAdministrator: ARN = "arn:aws:iam::aws:policy/job-function/SystemAdministrator"
export const VMImportExportRoleForAWSConnector: ARN = "arn:aws:iam::aws:policy/service-role/VMImportExportRoleForAWSConnector"
export const ViewOnlyAccess: ARN = "arn:aws:iam::aws:policy/job-function/ViewOnlyAccess"
export const AWSAccountActivityAccess: ARN = "arn:aws:iam::aws:policy/AWSAccountActivityAccess";
export const AWSAccountUsageReportAccess: ARN = "arn:aws:iam::aws:policy/AWSAccountUsageReportAccess";
export const AWSAgentlessDiscoveryService: ARN = "arn:aws:iam::aws:policy/AWSAgentlessDiscoveryService";
export const AWSApplicationDiscoveryAgentAccess: ARN = "arn:aws:iam::aws:policy/AWSApplicationDiscoveryAgentAccess";
export const AWSApplicationDiscoveryServiceFullAccess: ARN = "arn:aws:iam::aws:policy/AWSApplicationDiscoveryServiceFullAccess";
export const AWSBatchFullAccess: ARN = "arn:aws:iam::aws:policy/AWSBatchFullAccess";
export const AWSBatchServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole";
export const AWSCertificateManagerFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCertificateManagerFullAccess";
export const AWSCertificateManagerReadOnly: ARN = "arn:aws:iam::aws:policy/AWSCertificateManagerReadOnly";
export const AWSCloudFormationReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudFormationReadOnlyAccess";
export const AWSCloudHSMFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudHSMFullAccess";
export const AWSCloudHSMReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudHSMReadOnlyAccess";
export const AWSCloudHSMRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSCloudHSMRole";
export const AWSCloudTrailFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudTrailFullAccess";
export const AWSCloudTrailReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCloudTrailReadOnlyAccess";
export const AWSCodeBuildAdminAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeBuildAdminAccess";
export const AWSCodeBuildDeveloperAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeBuildDeveloperAccess";
export const AWSCodeBuildReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeBuildReadOnlyAccess";
export const AWSCodeCommitFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeCommitFullAccess";
export const AWSCodeCommitPowerUser: ARN = "arn:aws:iam::aws:policy/AWSCodeCommitPowerUser";
export const AWSCodeCommitReadOnly: ARN = "arn:aws:iam::aws:policy/AWSCodeCommitReadOnly";
export const AWSCodeDeployDeployerAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeDeployDeployerAccess";
export const AWSCodeDeployFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeDeployFullAccess";
export const AWSCodeDeployReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeDeployReadOnlyAccess";
export const AWSCodeDeployRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSCodeDeployRole";
export const AWSCodePipelineApproverAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineApproverAccess";
export const AWSCodePipelineCustomActionAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineCustomActionAccess";
export const AWSCodePipelineFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineFullAccess";
export const AWSCodePipelineReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSCodePipelineReadOnlyAccess";
export const AWSCodeStarFullAccess: ARN = "arn:aws:iam::aws:policy/AWSCodeStarFullAccess";
export const AWSCodeStarServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSCodeStarServiceRole";
export const AWSConfigRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSConfigRole";
export const AWSConfigRulesExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSConfigRulesExecutionRole";
export const AWSConfigUserAccess: ARN = "arn:aws:iam::aws:policy/AWSConfigUserAccess";
export const AWSConnector: ARN = "arn:aws:iam::aws:policy/AWSConnector";
export const AWSDataPipelineRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSDataPipelineRole";
export const AWSDataPipeline_FullAccess: ARN = "arn:aws:iam::aws:policy/AWSDataPipeline_FullAccess";
export const AWSDataPipeline_PowerUser: ARN = "arn:aws:iam::aws:policy/AWSDataPipeline_PowerUser";
export const AWSDeviceFarmFullAccess: ARN = "arn:aws:iam::aws:policy/AWSDeviceFarmFullAccess";
export const AWSDirectConnectFullAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectConnectFullAccess";
export const AWSDirectConnectReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectConnectReadOnlyAccess";
export const AWSDirectoryServiceFullAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectoryServiceFullAccess";
export const AWSDirectoryServiceReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSDirectoryServiceReadOnlyAccess";
export const AWSElasticBeanstalkCustomPlatformforEC2Role: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkCustomPlatformforEC2Role";
export const AWSElasticBeanstalkEnhancedHealth: ARN = "arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkEnhancedHealth";
export const AWSElasticBeanstalkFullAccess: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkFullAccess";
export const AWSElasticBeanstalkMulticontainerDocker: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkMulticontainerDocker";
export const AWSElasticBeanstalkReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkReadOnlyAccess";
export const AWSElasticBeanstalkService: ARN = "arn:aws:iam::aws:policy/service-role/AWSElasticBeanstalkService";
export const AWSElasticBeanstalkWebTier: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier";
export const AWSElasticBeanstalkWorkerTier: ARN = "arn:aws:iam::aws:policy/AWSElasticBeanstalkWorkerTier";
export const AWSGreengrassFullAccess: ARN = "arn:aws:iam::aws:policy/AWSGreengrassFullAccess";
export const AWSGreengrassResourceAccessRolePolicy: ARN = "arn:aws:iam::aws:policy/service-role/AWSGreengrassResourceAccessRolePolicy";
export const AWSHealthFullAccess: ARN = "arn:aws:iam::aws:policy/AWSHealthFullAccess";
export const AWSImportExportFullAccess: ARN = "arn:aws:iam::aws:policy/AWSImportExportFullAccess";
export const AWSImportExportReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSImportExportReadOnlyAccess";
export const AWSIoTConfigAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTConfigAccess";
export const AWSIoTConfigReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTConfigReadOnlyAccess";
export const AWSIoTDataAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTDataAccess";
export const AWSIoTFullAccess: ARN = "arn:aws:iam::aws:policy/AWSIoTFullAccess";
export const AWSIoTLogging: ARN = "arn:aws:iam::aws:policy/service-role/AWSIoTLogging";
export const AWSIoTRuleActions: ARN = "arn:aws:iam::aws:policy/service-role/AWSIoTRuleActions";
export const AWSKeyManagementServicePowerUser: ARN = "arn:aws:iam::aws:policy/AWSKeyManagementServicePowerUser";
export const AWSLambdaBasicExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole";
export const AWSLambdaDynamoDBExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaDynamoDBExecutionRole";
export const AWSLambdaENIManagementAccess: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaENIManagementAccess";
export const AWSLambdaExecute: ARN = "arn:aws:iam::aws:policy/AWSLambdaExecute";
export const AWSLambdaFullAccess: ARN = "arn:aws:iam::aws:policy/AWSLambdaFullAccess";
export const AWSLambdaInvocationDynamoDB: ARN = "arn:aws:iam::aws:policy/AWSLambdaInvocation-DynamoDB";
export const AWSLambdaKinesisExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole";
export const AWSLambdaReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSLambdaReadOnlyAccess";
export const AWSLambdaRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaRole";
export const AWSLambdaVPCAccessExecutionRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole";
export const AWSMarketplaceFullAccess: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceFullAccess";
export const AWSMarketplaceGetEntitlements: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceGetEntitlements";
export const AWSMarketplaceManageSubscriptions: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceManageSubscriptions";
export const AWSMarketplaceMeteringFullAccess: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceMeteringFullAccess";
export const AWSMarketplaceReadonly: ARN = "arn:aws:iam::aws:policy/AWSMarketplaceRead-only";
export const AWSMobileHub_FullAccess: ARN = "arn:aws:iam::aws:policy/AWSMobileHub_FullAccess";
export const AWSMobileHub_ReadOnly: ARN = "arn:aws:iam::aws:policy/AWSMobileHub_ReadOnly";
export const AWSMobileHub_ServiceUseOnly: ARN = "arn:aws:iam::aws:policy/service-role/AWSMobileHub_ServiceUseOnly";
export const AWSOpsWorksCMInstanceProfileRole: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksCMInstanceProfileRole";
export const AWSOpsWorksCMServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSOpsWorksCMServiceRole";
export const AWSOpsWorksCloudWatchLogs: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksCloudWatchLogs";
export const AWSOpsWorksFullAccess: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksFullAccess";
export const AWSOpsWorksInstanceRegistration: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksInstanceRegistration";
export const AWSOpsWorksRegisterCLI: ARN = "arn:aws:iam::aws:policy/AWSOpsWorksRegisterCLI";
export const AWSOpsWorksRole: ARN = "arn:aws:iam::aws:policy/service-role/AWSOpsWorksRole";
export const AWSQuickSightDescribeRDS: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuickSightDescribeRDS";
export const AWSQuickSightDescribeRedshift: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuickSightDescribeRedshift";
export const AWSQuickSightListIAM: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuickSightListIAM";
export const AWSQuicksightAthenaAccess: ARN = "arn:aws:iam::aws:policy/service-role/AWSQuicksightAthenaAccess";
export const AWSStepFunctionsConsoleFullAccess: ARN = "arn:aws:iam::aws:policy/AWSStepFunctionsConsoleFullAccess";
export const AWSStepFunctionsFullAccess: ARN = "arn:aws:iam::aws:policy/AWSStepFunctionsFullAccess";
export const AWSStepFunctionsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSStepFunctionsReadOnlyAccess";
export const AWSStorageGatewayFullAccess: ARN = "arn:aws:iam::aws:policy/AWSStorageGatewayFullAccess";
export const AWSStorageGatewayReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSStorageGatewayReadOnlyAccess";
export const AWSSupportAccess: ARN = "arn:aws:iam::aws:policy/AWSSupportAccess";
export const AWSWAFFullAccess: ARN = "arn:aws:iam::aws:policy/AWSWAFFullAccess";
export const AWSWAFReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSWAFReadOnlyAccess";
export const AWSXrayFullAccess: ARN = "arn:aws:iam::aws:policy/AWSXrayFullAccess";
export const AWSXrayReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSXrayReadOnlyAccess";
export const AWSXrayWriteOnlyAccess: ARN = "arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess";
export const AdministratorAccess: ARN = "arn:aws:iam::aws:policy/AdministratorAccess";
export const AmazonAPIGatewayAdministrator: ARN = "arn:aws:iam::aws:policy/AmazonAPIGatewayAdministrator";
export const AmazonAPIGatewayInvokeFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonAPIGatewayInvokeFullAccess";
export const AmazonAPIGatewayPushToCloudWatchLogs: ARN = "arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs";
export const AmazonAppStreamFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonAppStreamFullAccess";
export const AmazonAppStreamReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonAppStreamReadOnlyAccess";
export const AmazonAppStreamServiceAccess: ARN = "arn:aws:iam::aws:policy/service-role/AmazonAppStreamServiceAccess";
export const AmazonAthenaFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonAthenaFullAccess";
export const AmazonCloudDirectoryFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonCloudDirectoryFullAccess";
export const AmazonCloudDirectoryReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonCloudDirectoryReadOnlyAccess";
export const AmazonCognitoDeveloperAuthenticatedIdentities: ARN = "arn:aws:iam::aws:policy/AmazonCognitoDeveloperAuthenticatedIdentities";
export const AmazonCognitoPowerUser: ARN = "arn:aws:iam::aws:policy/AmazonCognitoPowerUser";
export const AmazonCognitoReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonCognitoReadOnly";
export const AmazonDMSCloudWatchLogsRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole";
export const AmazonDMSRedshiftS3Role: ARN = "arn:aws:iam::aws:policy/service-role/AmazonDMSRedshiftS3Role";
export const AmazonDMSVPCManagementRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonDMSVPCManagementRole";
export const AmazonDRSVPCManagement: ARN = "arn:aws:iam::aws:policy/AmazonDRSVPCManagement";
export const AmazonDynamoDBFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess";
export const AmazonDynamoDBFullAccesswithDataPipeline: ARN = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccesswithDataPipeline";
export const AmazonDynamoDBReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonDynamoDBReadOnlyAccess";
export const AmazonEC2ContainerRegistryFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess";
export const AmazonEC2ContainerRegistryPowerUser: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser";
export const AmazonEC2ContainerRegistryReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly";
export const AmazonEC2ContainerServiceAutoscaleRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceAutoscaleRole";
export const AmazonEC2ContainerServiceFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess";
export const AmazonEC2ContainerServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceRole";
export const AmazonEC2ContainerServiceforEC2Role: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role";
export const AmazonEC2FullAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2FullAccess";
export const AmazonEC2ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess";
export const AmazonEC2ReportsAccess: ARN = "arn:aws:iam::aws:policy/AmazonEC2ReportsAccess";
export const AmazonEC2RoleforAWSCodeDeploy: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforAWSCodeDeploy";
export const AmazonEC2RoleforDataPipelineRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforDataPipelineRole";
export const AmazonEC2RoleforSSM: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM";
export const AmazonEC2SpotFleetAutoscaleRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2SpotFleetAutoscaleRole";
export const AmazonEC2SpotFleetRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonEC2SpotFleetRole";
export const AmazonESFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonESFullAccess";
export const AmazonESReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonESReadOnlyAccess";
export const AmazonElastiCacheFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElastiCacheFullAccess";
export const AmazonElastiCacheReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElastiCacheReadOnlyAccess";
export const AmazonElasticFileSystemFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticFileSystemFullAccess";
export const AmazonElasticFileSystemReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticFileSystemReadOnlyAccess";
export const AmazonElasticMapReduceFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticMapReduceFullAccess";
export const AmazonElasticMapReduceReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticMapReduceReadOnlyAccess";
export const AmazonElasticMapReduceRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceRole";
export const AmazonElasticMapReduceforAutoScalingRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforAutoScalingRole";
export const AmazonElasticMapReduceforEC2Role: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role";
export const AmazonElasticTranscoderFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticTranscoderFullAccess";
export const AmazonElasticTranscoderJobsSubmitter: ARN = "arn:aws:iam::aws:policy/AmazonElasticTranscoderJobsSubmitter";
export const AmazonElasticTranscoderReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonElasticTranscoderReadOnlyAccess";
export const AmazonElasticTranscoderRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonElasticTranscoderRole";
export const AmazonGlacierFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonGlacierFullAccess";
export const AmazonGlacierReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonGlacierReadOnlyAccess";
export const AmazonInspectorFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonInspectorFullAccess";
export const AmazonInspectorReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonInspectorReadOnlyAccess";
export const AmazonKinesisAnalyticsFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisAnalyticsFullAccess";
export const AmazonKinesisAnalyticsReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonKinesisAnalyticsReadOnly";
export const AmazonKinesisFirehoseFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisFirehoseFullAccess";
export const AmazonKinesisFirehoseReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisFirehoseReadOnlyAccess";
export const AmazonKinesisFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisFullAccess";
export const AmazonKinesisReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonKinesisReadOnlyAccess";
export const AmazonLexFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonLexFullAccess";
export const AmazonLexReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonLexReadOnly";
export const AmazonLexRunBotsOnly: ARN = "arn:aws:iam::aws:policy/AmazonLexRunBotsOnly";
export const AmazonMachineLearningBatchPredictionsAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningBatchPredictionsAccess";
export const AmazonMachineLearningCreateOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningCreateOnlyAccess";
export const AmazonMachineLearningFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningFullAccess";
export const AmazonMachineLearningManageRealTimeEndpointOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningManageRealTimeEndpointOnlyAccess";
export const AmazonMachineLearningReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningReadOnlyAccess";
export const AmazonMachineLearningRealTimePredictionOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMachineLearningRealTimePredictionOnlyAccess";
export const AmazonMachineLearningRoleforRedshiftDataSource: ARN = "arn:aws:iam::aws:policy/service-role/AmazonMachineLearningRoleforRedshiftDataSource";
export const AmazonMechanicalTurkFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonMechanicalTurkFullAccess";
export const AmazonMechanicalTurkReadOnly: ARN = "arn:aws:iam::aws:policy/AmazonMechanicalTurkReadOnly";
export const AmazonMobileAnalyticsFinancialReportAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsFinancialReportAccess";
export const AmazonMobileAnalyticsFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsFullAccess";
export const AmazonMobileAnalyticsNonfinancialReportAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsNon-financialReportAccess";
export const AmazonMobileAnalyticsWriteOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonMobileAnalyticsWriteOnlyAccess";
export const AmazonPollyFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonPollyFullAccess";
export const AmazonPollyReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonPollyReadOnlyAccess";
export const AmazonRDSDirectoryServiceAccess: ARN = "arn:aws:iam::aws:policy/service-role/AmazonRDSDirectoryServiceAccess";
export const AmazonRDSEnhancedMonitoringRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole";
export const AmazonRDSFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRDSFullAccess";
export const AmazonRDSReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRDSReadOnlyAccess";
export const AmazonRedshiftFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRedshiftFullAccess";
export const AmazonRedshiftReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRedshiftReadOnlyAccess";
export const AmazonRekognitionFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRekognitionFullAccess";
export const AmazonRekognitionReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRekognitionReadOnlyAccess";
export const AmazonRoute53DomainsFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53DomainsFullAccess";
export const AmazonRoute53DomainsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53DomainsReadOnlyAccess";
export const AmazonRoute53FullAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53FullAccess";
export const AmazonRoute53ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonRoute53ReadOnlyAccess";
export const AmazonS3FullAccess: ARN = "arn:aws:iam::aws:policy/AmazonS3FullAccess";
export const AmazonS3ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess";
export const AmazonSESFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSESFullAccess";
export const AmazonSESReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSESReadOnlyAccess";
export const AmazonSNSFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSNSFullAccess";
export const AmazonSNSReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSNSReadOnlyAccess";
export const AmazonSNSRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonSNSRole";
export const AmazonSQSFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSQSFullAccess";
export const AmazonSQSReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSQSReadOnlyAccess";
export const AmazonSSMAutomationRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonSSMAutomationRole";
export const AmazonSSMFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonSSMFullAccess";
export const AmazonSSMMaintenanceWindowRole: ARN = "arn:aws:iam::aws:policy/service-role/AmazonSSMMaintenanceWindowRole";
export const AmazonSSMReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonSSMReadOnlyAccess";
export const AmazonVPCFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonVPCFullAccess";
export const AmazonVPCReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonVPCReadOnlyAccess";
export const AmazonWorkMailFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonWorkMailFullAccess";
export const AmazonWorkMailReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonWorkMailReadOnlyAccess";
export const AmazonWorkSpacesAdmin: ARN = "arn:aws:iam::aws:policy/AmazonWorkSpacesAdmin";
export const AmazonWorkSpacesApplicationManagerAdminAccess: ARN = "arn:aws:iam::aws:policy/AmazonWorkSpacesApplicationManagerAdminAccess";
export const AmazonZocaloFullAccess: ARN = "arn:aws:iam::aws:policy/AmazonZocaloFullAccess";
export const AmazonZocaloReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AmazonZocaloReadOnlyAccess";
export const ApplicationAutoScalingForAmazonAppStreamAccess: ARN = "arn:aws:iam::aws:policy/service-role/ApplicationAutoScalingForAmazonAppStreamAccess";
export const AutoScalingConsoleFullAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingConsoleFullAccess";
export const AutoScalingConsoleReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingConsoleReadOnlyAccess";
export const AutoScalingFullAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingFullAccess";
export const AutoScalingNotificationAccessRole: ARN = "arn:aws:iam::aws:policy/service-role/AutoScalingNotificationAccessRole";
export const AutoScalingReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/AutoScalingReadOnlyAccess";
export const Billing: ARN = "arn:aws:iam::aws:policy/job-function/Billing";
export const CloudFrontFullAccess: ARN = "arn:aws:iam::aws:policy/CloudFrontFullAccess";
export const CloudFrontReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudFrontReadOnlyAccess";
export const CloudSearchFullAccess: ARN = "arn:aws:iam::aws:policy/CloudSearchFullAccess";
export const CloudSearchReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudSearchReadOnlyAccess";
export const CloudWatchActionsEC2Access: ARN = "arn:aws:iam::aws:policy/CloudWatchActionsEC2Access";
export const CloudWatchEventsBuiltInTargetExecutionAccess: ARN = "arn:aws:iam::aws:policy/service-role/CloudWatchEventsBuiltInTargetExecutionAccess";
export const CloudWatchEventsFullAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchEventsFullAccess";
export const CloudWatchEventsInvocationAccess: ARN = "arn:aws:iam::aws:policy/service-role/CloudWatchEventsInvocationAccess";
export const CloudWatchEventsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchEventsReadOnlyAccess";
export const CloudWatchFullAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchFullAccess";
export const CloudWatchLogsFullAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchLogsFullAccess";
export const CloudWatchLogsReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchLogsReadOnlyAccess";
export const CloudWatchReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess";
export const DataScientist: ARN = "arn:aws:iam::aws:policy/job-function/DataScientist";
export const DatabaseAdministrator: ARN = "arn:aws:iam::aws:policy/job-function/DatabaseAdministrator";
export const IAMFullAccess: ARN = "arn:aws:iam::aws:policy/IAMFullAccess";
export const IAMReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/IAMReadOnlyAccess";
export const IAMSelfManageServiceSpecificCredentials: ARN = "arn:aws:iam::aws:policy/IAMSelfManageServiceSpecificCredentials";
export const IAMUserChangePassword: ARN = "arn:aws:iam::aws:policy/IAMUserChangePassword";
export const IAMUserSSHKeys: ARN = "arn:aws:iam::aws:policy/IAMUserSSHKeys";
export const NetworkAdministrator: ARN = "arn:aws:iam::aws:policy/job-function/NetworkAdministrator";
export const PowerUserAccess: ARN = "arn:aws:iam::aws:policy/PowerUserAccess";
export const RDSCloudHsmAuthorizationRole: ARN = "arn:aws:iam::aws:policy/service-role/RDSCloudHsmAuthorizationRole";
export const ReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/ReadOnlyAccess";
export const ResourceGroupsandTagEditorFullAccess: ARN = "arn:aws:iam::aws:policy/ResourceGroupsandTagEditorFullAccess";
export const ResourceGroupsandTagEditorReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/ResourceGroupsandTagEditorReadOnlyAccess";
export const SecurityAudit: ARN = "arn:aws:iam::aws:policy/SecurityAudit";
export const ServerMigrationConnector: ARN = "arn:aws:iam::aws:policy/ServerMigrationConnector";
export const ServerMigrationServiceRole: ARN = "arn:aws:iam::aws:policy/service-role/ServerMigrationServiceRole";
export const ServiceCatalogAdminFullAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogAdminFullAccess";
export const ServiceCatalogAdminReadOnlyAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogAdminReadOnlyAccess";
export const ServiceCatalogEndUserAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogEndUserAccess";
export const ServiceCatalogEndUserFullAccess: ARN = "arn:aws:iam::aws:policy/ServiceCatalogEndUserFullAccess";
export const SimpleWorkflowFullAccess: ARN = "arn:aws:iam::aws:policy/SimpleWorkflowFullAccess";
export const SupportUser: ARN = "arn:aws:iam::aws:policy/job-function/SupportUser";
export const SystemAdministrator: ARN = "arn:aws:iam::aws:policy/job-function/SystemAdministrator";
export const VMImportExportRoleForAWSConnector: ARN = "arn:aws:iam::aws:policy/service-role/VMImportExportRoleForAWSConnector";
export const ViewOnlyAccess: ARN = "arn:aws:iam::aws:policy/job-function/ViewOnlyAccess";

View file

@ -18,9 +18,9 @@ export * from "./types";
import * as apigateway from "./apigateway";
import * as cloudwatch from "./cloudwatch";
import * as config from "./config";
import * as dynamodb from "./dynamodb"
import * as dynamodb from "./dynamodb";
import * as ec2 from "./ec2";
import * as elasticbeanstalk from "./elasticbeanstalk"
import * as elasticbeanstalk from "./elasticbeanstalk";
import * as iam from "./iam";
import * as kms from "./kms";
import * as lambda from "./lambda";

View file

@ -13,11 +13,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { jsonStringify, sha1hash, printf } from "@lumi/lumi/runtime"
import { Deployment, RestAPI, Stage } from "../apigateway"
import { Permission } from "../lambda"
import { Function } from "./function"
import { region } from "../config"
/* tslint:disable: ordered-imports */
import { jsonStringify, sha1hash, printf } from "@lumi/lumi/runtime";
import { Deployment, RestAPI, Stage } from "../apigateway";
import { Permission } from "../lambda";
import { Function } from "./function";
import { region } from "../config";
export interface Route {
method: string;
@ -42,7 +44,7 @@ interface SwaggerOperation {
passthroughBehavior?: string;
httpMethod: string;
type: string;
}
};
}
interface SwaggerParameter {
@ -60,8 +62,8 @@ function createBaseSpec(apiName: string): SwaggerSpec {
return {
swagger: "2.0",
info: { title: apiName, version: "1.0" },
paths: {}
}
paths: {},
};
}
function createPathSpec(lambdaARN: string): SwaggerOperation {
@ -70,9 +72,9 @@ function createPathSpec(lambdaARN: string): SwaggerOperation {
uri: "arn:aws:apigateway:" + region + ":lambda:path/2015-03-31/functions/" + lambdaARN + "/invocations",
passthroughBehavior: "when_no_match",
httpMethod: "POST",
type: "aws_proxy"
}
}
type: "aws_proxy",
},
};
}
function createSourceARN(region: string, account: string, apiid: string, functionName: string): string {
@ -81,22 +83,22 @@ function createSourceARN(region: string, account: string, apiid: string, functio
// API is a higher level abstraction for working with AWS APIGateway reources.
export class API {
public api: RestAPI
public deployment: Deployment
private swaggerSpec: SwaggerSpec
private apiName: string
public api: RestAPI;
public deployment: Deployment;
private swaggerSpec: SwaggerSpec;
private apiName: string;
constructor(apiName: string) {
this.apiName = apiName
this.apiName = apiName;
this.swaggerSpec = createBaseSpec(apiName);
this.api = new RestAPI(apiName, {
body: this.swaggerSpec
body: this.swaggerSpec,
});
}
public route(method: string, path: string, lambda: Function) {
if (this.swaggerSpec.paths[path] === undefined) {
this.swaggerSpec.paths[path] = {}
this.swaggerSpec.paths[path] = {};
}
let swaggerMethod: string;
switch ((<any>method).toLowerCase()) {
@ -107,14 +109,15 @@ export class API {
case "options":
case "head":
case "patch":
swaggerMethod = (<any>method).toLowerCase()
swaggerMethod = (<any>method).toLowerCase();
break;
case "any":
swaggerMethod = "x-amazon-apigateway-any-method"
swaggerMethod = "x-amazon-apigateway-any-method";
break;
default:
throw new Error("Method not supported: " + method);
}
<<<<<<< HEAD
let apiName = "";
if(this.api.apiName !== undefined) {
apiName = this.api.apiName;
@ -126,6 +129,9 @@ export class API {
sourceARN: createSourceARN("us-east-1", "490047557317", apiName, "webapi-test-func"),
});
// TODO[pulumi/lumi#90]: Once we suport output properties, we can use `lambda.lambda.arn` as input
=======
// TODO[pulumi/lumi#90]: Once we suport output properties, we can use `lambda.lambda.arn` as input
>>>>>>> 13dbcdbafc96be49e509c618194cd649ba6d0817
// to constructing this apigateway lambda invocation uri.
// this.swaggerSpec.paths[path][swaggerMethod] = createPathSpec(lambda.lambda.arn);
this.swaggerSpec.paths[path][swaggerMethod] = createPathSpec(
@ -134,7 +140,7 @@ export class API {
public publish(stageName?: string): Stage {
if (stageName === undefined) {
stageName = "prod"
stageName = "prod";
}
let deploymentId = sha1hash(jsonStringify(this.swaggerSpec));
this.deployment = new Deployment(this.apiName + "_" + deploymentId, {

View file

@ -13,10 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { AssetArchive, String } from "@lumi/lumi/asset"
import { serializeClosure, jsonStringify } from "@lumi/lumi/runtime"
import { Function as LambdaFunction } from "../lambda/function"
import { ARN } from "../types"
/* tslint:disable: ordered-imports align*/
import { AssetArchive, String } from "@lumi/lumi/asset";
import { serializeClosure, jsonStringify } from "@lumi/lumi/runtime";
import { Function as LambdaFunction } from "../lambda/function";
import { ARN } from "../types";
import { Role } from "../iam/role";
// Context is the shape of the context object passed to a Function callback.
@ -40,13 +41,13 @@ let policy = {
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "lambda.amazonaws.com"
"Service": "lambda.amazonaws.com",
},
"Effect": "Allow",
"Sid": ""
}
]
}
"Sid": "",
},
],
};
// Function is a higher-level API for creating and managing AWS Lambda Function resources implemented
// by a Lumi lambda expression and with a set of attached policies.
@ -71,29 +72,28 @@ export class Function {
this.role = new Role(name + "-role", {
assumeRolePolicyDocument: policy,
managedPolicyARNs: policies,
})
});
switch (closure.language) {
case ".js":
this.lambda = new LambdaFunction(name, {
code: new AssetArchive({
"index.js": new String(
"index.js":
"exports.handler = (__event, __context, __callback) => {\n" +
" let env = JSON.parse(process.env.LUMI_ENV)\n" +
// TODO[pulumi/lumi#173]: Once we decide how to deserialize Lumi Resources, we
// likely will need to add additional deserialization behaviour here.
// TODO[pulumi/lumi#173]: Once we decide how to deserialize Lumi Resources, we
// likely will need to add additional deserialization behaviour here.
" with(env) {\n" +
" let __f = " + closure.code +
" __f(__event, __context, __callback);\n" +
" }\n" +
"}\n"
)
"}\n",
}),
handler: "index.handler",
runtime: "nodejs6.10",
role: this.role,
environment: {
LUMI_ENV: jsonStringify(closure.environment)
LUMI_ENV: jsonStringify(closure.environment),
},
});
break;

View file

@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:no-empty */
import {Asset} from "./asset";
// An Archive represents a collection of named assets.

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:no-empty */
// Asset represents a blob of text or data that is managed as a first class entity.
export abstract class Asset {
constructor() {

View file

@ -12,7 +12,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:no-empty*/
// Resource represents a class whose CRUD operations are implemented by a provider plugin.
export abstract class Resource {
constructor() {

View file

@ -50,7 +50,7 @@ export function jsonParse(json: string): any {
// as simple JSON. Like toString, it includes the full text of the function's source code, suitable for execution.
export function serializeClosure(func: any): Closure | undefined {
// functionality provided by the runtime
return undefined;
return undefined;
}
// Closure represents the serialized form of a Lumi function.

View file

@ -13,5 +13,5 @@
// See the License for the specific language governing permissions and
// limitations under the License.
export * from "../lib"
export * from "../lib";

View file

@ -13,5 +13,5 @@
// See the License for the specific language governing permissions and
// limitations under the License.
export * from "../lib"
export * from "../lib";

View file

@ -1,249 +0,0 @@
// Licensed to Pulumi Corporation ("Pulumi") under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// Pulumi licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import * as lumi from "@lumi/lumi";
import {assert} from "./assert";
import {Boolean, Number, String, TypeError} from "../lib";
// The abstract operation ToString converts argument to a value of type String according to the table in
// https://tc39.github.io/ecma262/#sec-tostring.
export function toString(argument: Object): string {
if (argument === undefined) {
return "undefined";
}
if (argument === null) {
return "null";
}
if (isBoolean(argument)) {
if (argument === true) {
return "true";
}
return "false";
}
if (isNumber(argument)) {
// TODO[pulumi/lumi#169]: implement number formatting.
return "NaN";
}
if (isSymbol(argument)) {
throw new TypeError("toString invalid on symbols");
}
if (isString(argument)) {
return <string>argument;
}
// For other objects, convert to a primitive value and stringify that.
let primValue: Object = toPrimitive(argument, "string");
return toString(primValue);
}
export function isObject(input: Object): boolean {
return !isPrimitive(input);
}
export function isPrimitive(input: Object): boolean {
return input === undefined || input === null ||
isBoolean(input) || isNumber(input) || isString(input) || isSymbol(input)
}
export function isBoolean(input: Object): boolean {
return (typeof(input) === "bool");
}
export function isNumber(input: Object): boolean {
return (typeof(input) === "number");
}
export function isString(input: Object): boolean {
return (typeof(input) === "string");
}
export function isSymbol(input: Object): boolean {
// TODO[pulumi/lumi#169]: implement symbols.
return false;
}
export function isFalsey(input: Object | undefined | null): boolean {
// TODO[pulumi/lumi#169]: implement this based on the spec.
if (input === false) {
return true;
}
if (input === undefined) {
return true;
}
if (input === null) {
return true;
}
if (input === "") {
return true;
}
return false;
}
// The abstract operation toPrimitive takes an input argument and an optional argument preferredType. The abstract
// operation toPrimitive converts its input argument to a non-Object type. If an object is capable of converting to
// more than one primitive type, it may use the optional hint preferredType to favor that type. Conversion occurs
// according to the table in https://tc39.github.io/ecma262/#sec-toprimitive.
export function toPrimitive(input: Object, preferredType: string): Object {
if (isPrimitive(input)) {
return input;
}
let hint: string;
if (isFalsey(preferredType)) {
hint = "default";
}
else {
hint = preferredType;
}
let exoticToPrim: Object | undefined = getMethod(input, "@@toPrimitive");
if (!isFalsey(exoticToPrim)) {
let result: Object = call(exoticToPrim!, input, [ hint ]);
if (isObject(result)) {
throw new TypeError("");
}
return result;
}
if (hint === "default") {
hint = "number";
}
return ordinaryToPrimitive(input, hint);
}
// When the abstract operation OrdinaryToPrimitive is called with arguments O and hint, the steps outlined in
// https://tc39.github.io/ecma262/#sec-ordinarytoprimitive are taken.
export function ordinaryToPrimitive(o: Object, hint: string): Object {
assert(isObject(o));
let methodNames: string[];
switch (hint) {
case "string":
methodNames = [ "toString", "valueOf" ];
break;
case "number":
methodNames = [ "valueOf", "toString" ];
break;
default:
assert(false);
methodNames = [];
}
for (let i = 0; i < methodNames.length; i++) {
let name: string = methodNames[i];
let method: Object = get(o, name);
if (isCallable(method)) {
let result: Object = call(method, o, undefined);
if (isPrimitive(result)) {
return result;
}
}
}
throw new TypeError("invalid ordinaryToPrimitive type");
}
// The abstract operation ToObject converts argument to a value of type Object according to the table in
// https://tc39.github.io/ecma262/#sec-toobject.
export function toObject(argument: Object): Object {
if (argument === undefined || argument === null) {
throw new TypeError("toObject called on undefined or null value");
}
if (isBoolean(argument)) {
return new Boolean(<boolean>argument);
}
if (isNumber(argument)) {
return new Number(<number>argument);
}
if (isString(argument)) {
return new String(<string>argument);
}
if (isSymbol(argument)) {
// TODO[pulumi/lumi#169]: implement symbols.
}
return argument;
}
// The abstract operation Get is used to retrieve the value of a specific property of an object. The operation is called
// with arguments O and P where O is the object and P is the property key. This abstract operation performs the steps
// outlined in https://tc39.github.io/ecma262/#sec-get-o-p.
export function get(o: Object, p: string): Object {
assert(isObject(o));
assert(isPropertyKey(p));
return (<any>o)[<any>p];
}
// The abstract operation GetV is used to retrieve the value of a specific property of an ECMAScript language value. If
// the value is not an object, the property lookup is performed using a wrapper object appropriate for the type of the
// value. The operation is called with arguments V and P where V is the value and P is the property key. This abstract
// operation performs the steps outlined in https://tc39.github.io/ecma262/#sec-getv.
export function getV(v: Object, p: Object): Object {
assert(isPropertyKey(p));
let o: Object = toObject(v);
return (<any>o)[<any>p];
}
// The abstract operation GetMethod is used to get the value of a specific property of an ECMAScript language value when
// the value of the property is expected to be a function. The operation is called with arguments V and P where V is the
// ECMAScript language value, P is the property key. This abstract operation performs the steps outlined in
// https://tc39.github.io/ecma262/#sec-getmethod.
export function getMethod(v: Object, p: Object): Object | undefined {
assert(isPropertyKey(p));
let func: Object = getV(v, p);
if (func === undefined || func === null) {
return undefined;
}
if (!isCallable(func)) {
throw new TypeError("expected a callable function");
}
return func;
}
// The abstract operation IsPropertyKey determines if argument, which must be an ECMAScript language value, is a value
// that may be used as a property key, as described in https://tc39.github.io/ecma262/#sec-ispropertykey.
export function isPropertyKey(argument: Object): boolean {
if (isString(argument)) {
return true;
}
if (isSymbol(argument)) {
return true;
}
return false;
}
// The abstract operation Call is used to call the [[Call]] internal method of a function object. The operation is
// called with arguments F, V, and optionally argumentsList where F is the function object, V is an ECMAScript language
// value that is the this value of the [[Call]], and argumentsList is the value passed to the corresponding argument of
// the internal method. If argumentsList is not present, a new empty List is used as its value. This abstract operation
// performs the steps outlined in https://tc39.github.io/ecma262/#sec-call.
export function call(f: Object, v: Object, argumentsList?: Object[]): Object {
if (!isCallable(f)) {
throw new TypeError("function is not callable");
}
if (isFalsey(argumentsList)) {
argumentsList = [];
}
return lumi.runtime.dynamicInvoke(f, v, argumentsList!);
}
// The abstract operation IsCallable determines if argument, which must be an ECMAScript language value, is a callable
// function with a [[Call]] internal method, as per https://tc39.github.io/ecma262/#sec-iscallable.
export function isCallable(argument: Object): boolean {
if (!isObject(argument)) {
return false;
}
return lumi.runtime.isFunction(argument);
}

View file

@ -16,5 +16,4 @@
// The runtime module contains helpers that the MuJS compiler emits to do certain things.
export * from "./assert";
export * from "./ecmascript";

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable: variable-name */
// The available cloud providers.
export const AWS = "aws"; // Amazon Web Services.

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:ordered-imports */
export * from "./arch";
import * as clouds from "./clouds";

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:variable-name */
// The available language runtimes.
export const NodeJS = "nodejs";

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:variable-name */
// The available container scheduler/runtimes.
export const Swarm = "swarm"; // Docker Swarm.

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:ordered-imports */
import * as arch from "../arch";
import * as config from "../config";
import * as runtime from "../runtime";

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:ordered-imports */
import * as arch from "../arch";
import * as config from "../config";
import * as func from "../func";

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:ordered-imports */
import * as arch from "../../arch";
import * as aws from "@lumi/aws";

View file

@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/* tslint:disable:ordered-imports */
import * as arch from "../../arch";
import * as kubefission from "@lumi/kubefission";

View file

@ -991,9 +991,9 @@ func (e *evaluator) evalSwitchStatement(node *ast.SwitchStatement) *rt.Unwind {
match = true
} else {
// Otherwise, evaluate the expression, and check for equality.
clause, uw := e.evalExpression(*caseNode.Clause)
if uw != nil {
return uw
clause, uw2 := e.evalExpression(*caseNode.Clause)
if uw2 != nil {
return uw2
}
match = e.evalBinaryOperatorEquals(expr, clause)
}

View file

@ -29,6 +29,8 @@ import (
"github.com/pulumi/lumi/pkg/util/contract"
)
const nilString = "<nil>"
// Object is a value allocated and stored on the heap. In LumiIL's interpreter, all values are heap allocated, since we
// are less concerned about performance of the evaluation (compared to the cost of provisioning cloud resources).
type Object struct {
@ -240,14 +242,14 @@ func (o *Object) details(funcs bool, visited map[*Object]bool, indent string) st
case types.Number:
return strconv.FormatFloat(o.NumberValue(), 'f', -1, 64)
case types.Null:
return "<nil>"
return nilString
default:
// See if it's a func; if yes, do function formatting.
if _, isfnc := o.t.(*symbols.FunctionType); isfnc {
stub := o.FunctionValue()
var this string
if stub.This == nil {
this = "<nil>"
this = nilString
} else {
this = stub.This.String()
}
@ -309,14 +311,14 @@ func (o *Object) String() string {
case types.Number:
return strconv.FormatFloat(o.NumberValue(), 'f', -1, 64)
case types.Null:
return "<nil>"
return nilString
default:
// See if it's a func; if yes, do function formatting.
if _, isfnc := o.t.(*symbols.FunctionType); isfnc {
stub := o.FunctionValue()
var this string
if stub.This == nil {
this = "<nil>"
this = nilString
} else {
this = stub.This.String()
}

View file

@ -29,12 +29,14 @@ import (
)
func Print(g graph.Graph, w io.Writer) error {
var err error
// Allocate a new writer. In general, we will ignore write errors throughout this function, for simplicity, opting
// instead to return the result of flushing the buffer at the end, which is generally latching.
b := bufio.NewWriter(w)
// Print the graph header.
if _, err := b.WriteString("strict digraph {\n"); err != nil {
if _, err = b.WriteString("strict digraph {\n"); err != nil {
return err
}
@ -76,38 +78,59 @@ func Print(g graph.Graph, w io.Writer) error {
// Print this vertex; first its "label" (type) and then its direct dependencies.
// IDEA: consider serializing properties on the node also.
b.WriteString(fmt.Sprintf("%v%v", indent, id))
if label := v.Label(); label != "" {
b.WriteString(fmt.Sprintf(" [label=\"%v\"]", label))
_, err = b.WriteString(fmt.Sprintf("%v%v", indent, id))
if err != nil {
return err
}
if label := v.Label(); label != "" {
_, err = b.WriteString(fmt.Sprintf(" [label=\"%v\"]", label))
if err != nil {
return err
}
}
_, err = b.WriteString(";\n")
if err != nil {
return err
}
b.WriteString(";\n")
// Now print out all dependencies as "ID -> {A ... Z}".
outs := v.Outs()
if len(outs) > 0 {
b.WriteString(fmt.Sprintf("%v%v -> {", indent, id))
_, err = b.WriteString(fmt.Sprintf("%v%v -> {", indent, id))
if err != nil {
return err
}
// Print the ID of each dependency and, for those we haven't seen, add them to the frontier.
for i, out := range outs {
to := out.To()
if i > 0 {
b.WriteString(" ")
_, err = b.WriteString(" ")
if err != nil {
return err
}
}
_, err = b.WriteString(getID(to))
if err != nil {
return err
}
b.WriteString(getID(to))
if _, q := queued[to]; !q {
queued[to] = true
frontier = append(frontier, to)
}
}
b.WriteString("}\n")
_, err = b.WriteString("}\n")
if err != nil {
return err
}
}
}
// Finish the graph.
b.WriteString("}\n")
_, err = b.WriteString("}\n")
if err != nil {
return err
}
return b.Flush()
}

View file

@ -348,7 +348,9 @@ func (a Archive) openURLStream(url *url.URL) (io.ReadCloser, error) {
// APIs that demand []bytes.
func (a Archive) Bytes(format ArchiveFormat) []byte {
var data bytes.Buffer
a.Archive(format, &data)
err := a.Archive(format, &data)
contract.Assert(err == nil)
return data.Bytes()
}
@ -450,12 +452,21 @@ func (a Archive) archiveZIP(w io.Writer) error {
// ReadSourceArchive returns a stream to the underlying archive, if there eis one.
func (a Archive) ReadSourceArchive() (ArchiveFormat, io.ReadCloser, error) {
if path, ispath := a.GetPath(); ispath {
if format, _ := detectArchiveFormat(path); format != NotArchive {
if format, locerr := detectArchiveFormat(path); format != NotArchive {
if locerr != nil {
return 0, nil, locerr
}
f, err := os.Open(path)
return format, f, err
}
} else if url, isurl, _ := a.GetURIURL(); isurl {
if format, _ := detectArchiveFormat(url.Path); format != NotArchive {
} else if url, isurl, urlerr := a.GetURIURL(); isurl {
if urlerr != nil {
return 0, nil, urlerr
}
if format, arcerr := detectArchiveFormat(url.Path); format != NotArchive {
if arcerr != nil {
return 0, nil, arcerr
}
s, err := a.openURLStream(url)
return format, s, err
}

View file

@ -79,8 +79,8 @@ func newPlugin(ctx *Context, bins []string, prefix string) (*plugin, error) {
ts := tracers[t]
reader := bufio.NewReader(t)
for {
line, err := reader.ReadString('\n')
if err != nil {
line, readerr := reader.ReadString('\n')
if readerr != nil {
break
}
ts.cb(fmt.Sprintf("%v.%v: %v", prefix, ts.lbl, line[:len(line)-1]))
@ -95,13 +95,13 @@ func newPlugin(ctx *Context, bins []string, prefix string) (*plugin, error) {
var port string
b := make([]byte, 1)
for {
n, err := plug.Stdout.Read(b)
if err != nil {
n, stderr := plug.Stdout.Read(b)
if stderr != nil {
plug.Proc.Kill()
if port == "" {
return nil, errors.Wrapf(err, "could not read plugin [%v] stdout", foundbin)
return nil, errors.Wrapf(stderr, "could not read plugin [%v] stdout", foundbin)
}
return nil, errors.Wrapf(err, "failure reading plugin [%v] stdout (read '%v')", foundbin, port)
return nil, errors.Wrapf(stderr, "failure reading plugin [%v] stdout (read '%v')", foundbin, port)
}
if n > 0 && b[0] == '\n' {
break

View file

@ -318,9 +318,6 @@ func ParseFunctionType(tok Type) FunctionType {
return fnc
}
// funcDelims are the set of characters that might delimit function type parameters.
var funcDelims = FunctionTypeParamSeparator + FunctionTypeSeparator
// parseNextFunctionType parses the next function type from the given token, returning any excess.
func parseNextFunctionType(b *tokenBuffer) FunctionType {
mark := b.Pos // remember the start of this token.

View file

@ -50,9 +50,17 @@ func Compile(opts CompileOptions, path string) error {
// Adjust settings to their defaults and adjust any paths to be absolute.
if path == "" {
path, _ = os.Getwd()
var err error
path, err = os.Getwd()
if err != nil {
return err
}
} else {
path, _ = filepath.Abs(path)
var err error
path, err = filepath.Abs(path)
if err != nil {
return err
}
}
if opts.PkgBaseIDL == "" {
// The default IDL package base is just the GOPATH package path for the target IDL path.
@ -63,10 +71,18 @@ func Compile(opts CompileOptions, path string) error {
opts.PkgBaseIDL = pkgpath
}
if opts.OutPack != "" {
opts.OutPack, _ = filepath.Abs(opts.OutPack)
var err error
opts.OutPack, err = filepath.Abs(opts.OutPack)
if err != nil {
return err
}
}
if opts.OutRPC != "" {
opts.OutRPC, _ = filepath.Abs(opts.OutRPC)
var err error
opts.OutRPC, err = filepath.Abs(opts.OutRPC)
if err != nil {
return err
}
// If there is no package base, pick a default based on GOPATH.
if opts.PkgBaseRPC == "" {

View file

@ -22,6 +22,7 @@ import (
"golang.org/x/tools/go/loader"
"github.com/pulumi/lumi/pkg/diag"
"github.com/pulumi/lumi/pkg/util/contract"
)
type goPos interface {
@ -33,7 +34,9 @@ func goDiag(prog *loader.Program, elem goPos, relto string) diag.Diagable {
pos := prog.Fset.Position(elem.Pos())
file := pos.Filename
if relto != "" {
file, _ = filepath.Rel(relto, file)
var err error
file, err = filepath.Rel(relto, file)
contract.Assert(err != nil)
}
return &goDiagable{
doc: diag.NewDocument(file),

View file

@ -37,6 +37,7 @@ func writefmtln(w *bufio.Writer, msg string, args ...interface{}) {
func emitHeaderWarning(w *bufio.Writer) {
writefmtln(w, "// *** WARNING: this file was generated by the Lumi IDL Compiler (LUMIDL). ***")
writefmtln(w, "// *** Do not edit by hand unless you're certain you know what you are doing! ***")
writefmtln(w, "/* tslint:disable:ordered-imports variable-name */")
writefmtln(w, "")
}

View file

@ -18,6 +18,8 @@ package cmdutil
import (
"flag"
"strconv"
"github.com/pulumi/lumi/pkg/util/contract"
)
var LogToStderr = false // true if logging is being redirected to stderr.
@ -35,9 +37,16 @@ func InitLogging(logToStderr bool, verbose int, logFlow bool) {
// this is the only way to control the way glog runs. That includes poking around at flags below.
flag.Parse()
if logToStderr {
flag.Lookup("logtostderr").Value.Set("true")
err := flag.Lookup("logtostderr").Value.Set("true")
if err != nil {
contract.Assert(err != nil)
}
}
if verbose > 0 {
flag.Lookup("v").Value.Set(strconv.Itoa(verbose))
err := flag.Lookup("v").Value.Set(strconv.Itoa(verbose))
if err != nil {
contract.Assert(err != nil)
}
}
}

View file

@ -179,7 +179,7 @@ func (w *workspace) DepCandidates(dep pack.PackageURL) []string {
}
// namePath just cleans a name and makes sure it's appropriate to use as a path.
func namePath(nm tokens.Name) string {
func namePath(nm tokens.Name) string { //nolint
return stringNamePath(string(nm))
}

124
tslint.json Normal file
View file

@ -0,0 +1,124 @@
{
"rules": {
"align": [
true,
"parameters",
"arguments",
"statements"
],
"ban": false,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"eofline": true,
"forin": true,
"indent": [
true,
"spaces"
],
"interface-name": false,
"jsdoc-format": false,
"label-position": true,
"max-line-length": [
true,
120
],
"member-access": false,
"member-ordering": [
true,
"static-before-instance",
"variables-before-functions"
],
"no-any": false,
"no-arg": true,
"no-bitwise": false,
"no-conditional-assignment": false,
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-eval": true,
"no-inferrable-types": false,
"no-internal-module": true,
"no-parameter-properties": false,
"no-require-imports": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"no-var-requires": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-whitespace"
],
"ordered-imports": true,
"quotemark": [
true,
"double",
"avoid-escape"
],
"radix": true,
"semicolon": true,
"switch-default": true,
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef": [
false,
"call-signature",
"parameter",
"property-declaration",
"variable-declaration",
"member-variable-declaration"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"variable-name": [
true,
"check-format",
"allow-leading-underscore",
"ban-keywords"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-module",
"check-separator",
"check-type"
]
}
}