Dagger
Search

aws-cli

This module executes AWS CLI commands

Installation

dagger install github.com/ernesto27/daggerverse/aws-cli@v0.1.0

Entrypoint

Return Type
AwsCli
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@761174e6cfd058f20af1d8bb4cc31ca783e11007 call \
func (m *myModule) example() *AwsCli  {
	return dag.
			AwsCli()
}
@function
def example() -> dag.AwsCli:
	return (
		dag.aws_cli()
	)
@func()
example(): AwsCli {
	return dag
		.awsCli()
}

Types

AwsCli 🔗

run() 🔗

Example usage

dagger call -m github.com/ernesto27/daggerverse/aws-cli run

--command="s3 ls"  \
--dir-config ~/.aws/
Return Type
String !
Arguments
NameTypeDefault ValueDescription
commandString !-AWS CLI command to execute
dirConfigDirectory !-AWS config credentials directory
dirFilesDirectory -Directory with files to use in the command
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@761174e6cfd058f20af1d8bb4cc31ca783e11007 call \
 run --command string --dir-config DIR_PATH
func (m *myModule) example(ctx context.Context, command string, dirConfig *Directory) string  {
	return dag.
			AwsCli().
			Run(ctx, command, dirConfig)
}
@function
async def example(command: str, dir_config: dagger.Directory) -> str:
	return await (
		dag.aws_cli()
		.run(command, dir_config)
	)
@func()
async example(command: string, dirConfig: Directory): Promise<string> {
	return dag
		.awsCli()
		.run(command, dirConfig)
}

publishToEcr() 🔗

Example usage

dagger call -m github.com/ernesto27/daggerverse/aws-cli push-to-ecr
–dir-config ~/.aws
–dir-source .
–region=“us-west-2”
–registry=“registry-url”
–uri=“uri”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirConfigDirectory !-AWS config credentials directory
dirSourceDirectory !-Directory with source code and Dockerfile
regionString !-AWS region
registryString !-ECR registry URL
uriString !-ECR image URI
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@761174e6cfd058f20af1d8bb4cc31ca783e11007 call \
 publish-to-ecr --dir-config DIR_PATH --dir-source DIR_PATH --region string --registry string --uri string
func (m *myModule) example(ctx context.Context, dirConfig *Directory, dirSource *Directory, region string, registry string, uri string) string  {
	return dag.
			AwsCli().
			PublishToEcr(ctx, dirConfig, dirSource, region, registry, uri)
}
@function
async def example(dir_config: dagger.Directory, dir_source: dagger.Directory, region: str, registry: str, uri: str) -> str:
	return await (
		dag.aws_cli()
		.publish_to_ecr(dir_config, dir_source, region, registry, uri)
	)
@func()
async example(dirConfig: Directory, dirSource: Directory, region: string, registry: string, uri: string): Promise<string> {
	return dag
		.awsCli()
		.publishToEcr(dirConfig, dirSource, region, registry, uri)
}

updateEcsService() 🔗

Example usage dagger call -m github.com/ernesto27/daggerverse/aws-cli update-ecs-service
–dir-config ~/.aws
–region=“us-west-2”
–task-definition ./task-definition.json
–cluster=“your-cluster”
–service=“your-service”
–task-definition-name=“your-td”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
dirConfigDirectory !-No description provided
regionString !-No description provided
taskDefinitionFile !-No description provided
clusterString !-No description provided
serviceString !-No description provided
taskDefinitionNameString !-No description provided
Example
dagger -m github.com/ernesto27/daggerverse/aws-cli@761174e6cfd058f20af1d8bb4cc31ca783e11007 call \
 update-ecs-service --dir-config DIR_PATH --region string --task-definition file:path --cluster string --service string --task-definition-name string
func (m *myModule) example(ctx context.Context, dirConfig *Directory, region string, taskDefinition *File, cluster string, service string, taskDefinitionName string) string  {
	return dag.
			AwsCli().
			UpdateEcsService(ctx, dirConfig, region, taskDefinition, cluster, service, taskDefinitionName)
}
@function
async def example(dir_config: dagger.Directory, region: str, task_definition: dagger.File, cluster: str, service: str, task_definition_name: str) -> str:
	return await (
		dag.aws_cli()
		.update_ecs_service(dir_config, region, task_definition, cluster, service, task_definition_name)
	)
@func()
async example(dirConfig: Directory, region: string, taskDefinition: File, cluster: string, service: string, taskDefinitionName: string): Promise<string> {
	return dag
		.awsCli()
		.updateEcsService(dirConfig, region, taskDefinition, cluster, service, taskDefinitionName)
}