Dagger
Search

aws-utils

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/mamaar/dagger-modules/aws-utils@v0.0.1

Entrypoint

Return Type
AwsUtils
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
func (m *myModule) example() *AwsUtils  {
	return dag.
			AwsUtils()
}
@function
def example() -> dag.AwsUtils:
	return (
		dag.aws_utils()
	)
@func()
example(): AwsUtils {
	return dag
		.awsUtils()
}

Types

AwsUtils 🔗

retrieveCredentials() 🔗

RetrieveCredentials retrieves AWS credentials for the given profile

Return Type
AwsUtilsCredentials !
Arguments
NameTypeDefault ValueDescription
awsDirDirectory !-No description provided
awsProfileString !-No description provided
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 retrieve-credentials --aws-dir DIR_PATH --aws-profile string
func (m *myModule) example(awsDir *Directory, awsProfile string) *AwsUtilsCredentials  {
	return dag.
			AwsUtils().
			RetrieveCredentials(awsDir, awsProfile)
}
@function
def example(aws_dir: dagger.Directory, aws_profile: str) -> dag.AwsUtilsCredentials:
	return (
		dag.aws_utils()
		.retrieve_credentials(aws_dir, aws_profile)
	)
@func()
example(awsDir: Directory, awsProfile: string): AwsUtilsCredentials {
	return dag
		.awsUtils()
		.retrieveCredentials(awsDir, awsProfile)
}

getEcrToken() 🔗

Return Type
AwsUtilsEcrToken !
Arguments
NameTypeDefault ValueDescription
awsDirDirectory !-No description provided
awsProfileString !-No description provided
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 get-ecr-token --aws-dir DIR_PATH --aws-profile string
func (m *myModule) example(awsDir *Directory, awsProfile string) *AwsUtilsEcrToken  {
	return dag.
			AwsUtils().
			GetEcrToken(awsDir, awsProfile)
}
@function
def example(aws_dir: dagger.Directory, aws_profile: str) -> dag.AwsUtilsEcrToken:
	return (
		dag.aws_utils()
		.get_ecr_token(aws_dir, aws_profile)
	)
@func()
example(awsDir: Directory, awsProfile: string): AwsUtilsEcrToken {
	return dag
		.awsUtils()
		.getEcrToken(awsDir, awsProfile)
}

pushToEcr() 🔗

Return Type
[String ! ] !
Arguments
NameTypeDefault ValueDescription
containerContainer !-No description provided
awsDirDirectory !-No description provided
awsProfileString !-No description provided
imageNameString !-No description provided
tags[String ! ] !-No description provided
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 push-to-ecr --container IMAGE:TAG --aws-dir DIR_PATH --aws-profile string --image-name string --tags string1 --tags string2
func (m *myModule) example(ctx context.Context, container *Container, awsDir *Directory, awsProfile string, imageName string, tags []string) []string  {
	return dag.
			AwsUtils().
			PushToEcr(ctx, container, awsDir, awsProfile, imageName, tags)
}
@function
async def example(container: dagger.Container, aws_dir: dagger.Directory, aws_profile: str, image_name: str, tags: List[str]) -> List[str]:
	return await (
		dag.aws_utils()
		.push_to_ecr(container, aws_dir, aws_profile, image_name, tags)
	)
@func()
async example(container: Container, awsDir: Directory, awsProfile: string, imageName: string, tags: string[]): Promise<string[]> {
	return dag
		.awsUtils()
		.pushToEcr(container, awsDir, awsProfile, imageName, tags)
}

AwsUtilsCredentials 🔗

accessKeyId() 🔗

Return Type
String !
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 retrieve-credentials --aws-dir DIR_PATH --aws-profile string \
 access-key-id
func (m *myModule) example(ctx context.Context, awsDir *Directory, awsProfile string) string  {
	return dag.
			AwsUtils().
			RetrieveCredentials(awsDir, awsProfile).
			AccessKeyId(ctx)
}
@function
async def example(aws_dir: dagger.Directory, aws_profile: str) -> str:
	return await (
		dag.aws_utils()
		.retrieve_credentials(aws_dir, aws_profile)
		.access_key_id()
	)
@func()
async example(awsDir: Directory, awsProfile: string): Promise<string> {
	return dag
		.awsUtils()
		.retrieveCredentials(awsDir, awsProfile)
		.accessKeyId()
}

secretAccessKey() 🔗

Return Type
String !
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 retrieve-credentials --aws-dir DIR_PATH --aws-profile string \
 secret-access-key
func (m *myModule) example(ctx context.Context, awsDir *Directory, awsProfile string) string  {
	return dag.
			AwsUtils().
			RetrieveCredentials(awsDir, awsProfile).
			SecretAccessKey(ctx)
}
@function
async def example(aws_dir: dagger.Directory, aws_profile: str) -> str:
	return await (
		dag.aws_utils()
		.retrieve_credentials(aws_dir, aws_profile)
		.secret_access_key()
	)
@func()
async example(awsDir: Directory, awsProfile: string): Promise<string> {
	return dag
		.awsUtils()
		.retrieveCredentials(awsDir, awsProfile)
		.secretAccessKey()
}

sessionToken() 🔗

Return Type
String !
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 retrieve-credentials --aws-dir DIR_PATH --aws-profile string \
 session-token
func (m *myModule) example(ctx context.Context, awsDir *Directory, awsProfile string) string  {
	return dag.
			AwsUtils().
			RetrieveCredentials(awsDir, awsProfile).
			SessionToken(ctx)
}
@function
async def example(aws_dir: dagger.Directory, aws_profile: str) -> str:
	return await (
		dag.aws_utils()
		.retrieve_credentials(aws_dir, aws_profile)
		.session_token()
	)
@func()
async example(awsDir: Directory, awsProfile: string): Promise<string> {
	return dag
		.awsUtils()
		.retrieveCredentials(awsDir, awsProfile)
		.sessionToken()
}

region() 🔗

Return Type
String !
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 retrieve-credentials --aws-dir DIR_PATH --aws-profile string \
 region
func (m *myModule) example(ctx context.Context, awsDir *Directory, awsProfile string) string  {
	return dag.
			AwsUtils().
			RetrieveCredentials(awsDir, awsProfile).
			Region(ctx)
}
@function
async def example(aws_dir: dagger.Directory, aws_profile: str) -> str:
	return await (
		dag.aws_utils()
		.retrieve_credentials(aws_dir, aws_profile)
		.region()
	)
@func()
async example(awsDir: Directory, awsProfile: string): Promise<string> {
	return dag
		.awsUtils()
		.retrieveCredentials(awsDir, awsProfile)
		.region()
}

AwsUtilsEcrToken 🔗

username() 🔗

Return Type
String !
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 get-ecr-token --aws-dir DIR_PATH --aws-profile string \
 username
func (m *myModule) example(ctx context.Context, awsDir *Directory, awsProfile string) string  {
	return dag.
			AwsUtils().
			GetEcrToken(awsDir, awsProfile).
			Username(ctx)
}
@function
async def example(aws_dir: dagger.Directory, aws_profile: str) -> str:
	return await (
		dag.aws_utils()
		.get_ecr_token(aws_dir, aws_profile)
		.username()
	)
@func()
async example(awsDir: Directory, awsProfile: string): Promise<string> {
	return dag
		.awsUtils()
		.getEcrToken(awsDir, awsProfile)
		.username()
}

password() 🔗

Return Type
String !
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 get-ecr-token --aws-dir DIR_PATH --aws-profile string \
 password
func (m *myModule) example(ctx context.Context, awsDir *Directory, awsProfile string) string  {
	return dag.
			AwsUtils().
			GetEcrToken(awsDir, awsProfile).
			Password(ctx)
}
@function
async def example(aws_dir: dagger.Directory, aws_profile: str) -> str:
	return await (
		dag.aws_utils()
		.get_ecr_token(aws_dir, aws_profile)
		.password()
	)
@func()
async example(awsDir: Directory, awsProfile: string): Promise<string> {
	return dag
		.awsUtils()
		.getEcrToken(awsDir, awsProfile)
		.password()
}

endpoint() 🔗

Return Type
String !
Example
dagger -m github.com/mamaar/dagger-modules/aws-utils@12e39d7de87f06d221f6adb91b4d841b2d6e553a call \
 get-ecr-token --aws-dir DIR_PATH --aws-profile string \
 endpoint
func (m *myModule) example(ctx context.Context, awsDir *Directory, awsProfile string) string  {
	return dag.
			AwsUtils().
			GetEcrToken(awsDir, awsProfile).
			Endpoint(ctx)
}
@function
async def example(aws_dir: dagger.Directory, aws_profile: str) -> str:
	return await (
		dag.aws_utils()
		.get_ecr_token(aws_dir, aws_profile)
		.endpoint()
	)
@func()
async example(awsDir: Directory, awsProfile: string): Promise<string> {
	return dag
		.awsUtils()
		.getEcrToken(awsDir, awsProfile)
		.endpoint()
}