ssm

package
v1.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

README

AWS System Manager Parameters storage

Usage

package mypkg

import (
	"context"
	"fmt"
	"github.com/viant/afs"
	"github.com/viant/afs/file"
	_ "github.com/viant/afsc/aws"
	"log"
	"strings"
)

func Example_DownloadWithURL() {
	fs := afs.New()
	URL := "aws://ssm/us-west-1/parameter/myParamX"
	err := fs.Upload(context.TODO(), URL, file.DefaultFileOsMode, strings.NewReader("test is super secret"))
	if err != nil {
		log.Fatalf("err: %v\n", err)
	}
	data, err := fs.DownloadWithURL(context.TODO(), URL)
	if err != nil {
		log.Fatalf("err: %v\n", err)
	}
	fmt.Printf("%s %v\n", data, err)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorager

func NewStorager(ctx context.Context, baseURL string, options ...storage.Option) (*storager, error)

NewStorager create a new secreate manager storager

Types

type Resource

type Resource struct {
	Region string
	Name   string
}

Resource represent secret resource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL