C# 클래스 AWSSDK.Tests.Framework.UtilityMethods

파일 보기 프로젝트 열기: aws/aws-sdk-net

공개 프로퍼티들

프로퍼티 타입 설명
FirehoseAssumeRolePolicyDocumentFormat string
LambdaAssumeRolePolicyDocument string

공개 메소드들

메소드 설명
CreateFunctionIfNotExists ( AmazonLambdaClient client, string functionName, string functionHandlerName, string code, string iamRoleArn ) : string

Create a Lambda Function or return the ARN of the existing Lambda Function with the same name.

CreatePolicyIfNotExists ( IAmazonIdentityManagementService iamClient, string policyName, string policyDocument, string roleName ) : void
CreateRoleIfNotExists ( IAmazonIdentityManagementService iamClient, string roleName, string assumeRolePolicyDocument, bool waitForEventualConsistency = true ) : string
DoesRoleHavePolicy ( IAmazonIdentityManagementService iamClient, string policyName, string roleName ) : bool
GenerateName ( ) : string
GenerateName ( string name ) : string
GetFunctionArnIfExists ( IAmazonLambda lambdaClient, string functionName ) : string
GetRoleIfExists ( IAmazonIdentityManagementService iamClient, string roleName ) : Role

비공개 메소드들

메소드 설명
GetScriptStream ( string codeb64 ) : MemoryStream

메소드 상세

CreateFunctionIfNotExists() 공개 정적인 메소드

Create a Lambda Function or return the ARN of the existing Lambda Function with the same name.
public static CreateFunctionIfNotExists ( AmazonLambdaClient client, string functionName, string functionHandlerName, string code, string iamRoleArn ) : string
client Amazon.Lambda.AmazonLambdaClient
functionName string Name of lambda function.
functionHandlerName string The name of the .js file that contains the Lambda handler. /// e.g helloworld.js has functionHandlerName "helloworld".
code string The Base64-encoded zip file of the code to be used. The name of the file /// in the zip file that contains the Lambda functio handler should match functionHandlerName. /// .Net 2.0 does not support System.IO.Compression.ZipArchive so the process of creating the /// Base64-encoded zip file should be done outside of the test framework in the following way: /// private static string CreateScriptBytesBase64(string name, string script) /// { /// using (var stream = new MemoryStream()) /// { /// using (var archive = new ZipArchive(stream, ZipArchiveMode.Create, true)) /// { /// var entry = archive.CreateEntry(name + ".js"); /// using (var entryStream = entry.Open()) /// using (var writer = new StreamWriter(entryStream)) /// { /// writer.Write(script); /// } /// } /// var bytes = stream.ToArray(); /// var base64 = Convert.ToBase64String(bytes); /// return base64; /// } /// } ///
iamRoleArn string
리턴 string

CreatePolicyIfNotExists() 공개 정적인 메소드

public static CreatePolicyIfNotExists ( IAmazonIdentityManagementService iamClient, string policyName, string policyDocument, string roleName ) : void
iamClient IAmazonIdentityManagementService
policyName string
policyDocument string
roleName string
리턴 void

CreateRoleIfNotExists() 공개 정적인 메소드

public static CreateRoleIfNotExists ( IAmazonIdentityManagementService iamClient, string roleName, string assumeRolePolicyDocument, bool waitForEventualConsistency = true ) : string
iamClient IAmazonIdentityManagementService
roleName string
assumeRolePolicyDocument string
waitForEventualConsistency bool
리턴 string

DoesRoleHavePolicy() 공개 정적인 메소드

public static DoesRoleHavePolicy ( IAmazonIdentityManagementService iamClient, string policyName, string roleName ) : bool
iamClient IAmazonIdentityManagementService
policyName string
roleName string
리턴 bool

GenerateName() 공개 정적인 메소드

public static GenerateName ( ) : string
리턴 string

GenerateName() 공개 정적인 메소드

public static GenerateName ( string name ) : string
name string
리턴 string

GetFunctionArnIfExists() 공개 정적인 메소드

public static GetFunctionArnIfExists ( IAmazonLambda lambdaClient, string functionName ) : string
lambdaClient IAmazonLambda
functionName string
리턴 string

GetRoleIfExists() 공개 정적인 메소드

public static GetRoleIfExists ( IAmazonIdentityManagementService iamClient, string roleName ) : Role
iamClient IAmazonIdentityManagementService
roleName string
리턴 Amazon.IdentityManagement.Model.Role

프로퍼티 상세

FirehoseAssumeRolePolicyDocumentFormat 공개적으로 정적으로 프로퍼티

public static string FirehoseAssumeRolePolicyDocumentFormat
리턴 string

LambdaAssumeRolePolicyDocument 공개적으로 정적으로 프로퍼티

public static string LambdaAssumeRolePolicyDocument
리턴 string