func ExampleEFS_CreateTags() {
	svc := efs.New(nil)

	params := &efs.CreateTagsInput{
		FileSystemId: aws.String("FileSystemId"), // Required
		Tags: []*efs.Tag{ // Required
			{ // Required
				Key:   aws.String("TagKey"),   // Required
				Value: aws.String("TagValue"), // Required
			},
			// More values...
		},
	}
	resp, err := svc.CreateTags(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
func ExampleEFS_DeleteFileSystem() {
	svc := efs.New(nil)

	params := &efs.DeleteFileSystemInput{
		FileSystemId: aws.String("FileSystemId"), // Required
	}
	resp, err := svc.DeleteFileSystem(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
func ExampleEFS_DescribeMountTargetSecurityGroups() {
	svc := efs.New(nil)

	params := &efs.DescribeMountTargetSecurityGroupsInput{
		MountTargetId: aws.String("MountTargetId"), // Required
	}
	resp, err := svc.DescribeMountTargetSecurityGroups(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
func ExampleEFS_DescribeTags() {
	svc := efs.New(nil)

	params := &efs.DescribeTagsInput{
		FileSystemId: aws.String("FileSystemId"), // Required
		Marker:       aws.String("Marker"),
		MaxItems:     aws.Int64(1),
	}
	resp, err := svc.DescribeTags(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
func ExampleEFS_ModifyMountTargetSecurityGroups() {
	svc := efs.New(nil)

	params := &efs.ModifyMountTargetSecurityGroupsInput{
		MountTargetId: aws.String("MountTargetId"), // Required
		SecurityGroups: []*string{
			aws.String("SecurityGroup"), // Required
			// More values...
		},
	}
	resp, err := svc.ModifyMountTargetSecurityGroups(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
func ExampleEFS_CreateMountTarget() {
	svc := efs.New(nil)

	params := &efs.CreateMountTargetInput{
		FileSystemId: aws.String("FileSystemId"), // Required
		SubnetId:     aws.String("SubnetId"),     // Required
		IpAddress:    aws.String("IpAddress"),
		SecurityGroups: []*string{
			aws.String("SecurityGroup"), // Required
			// More values...
		},
	}
	resp, err := svc.CreateMountTarget(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Exemple #7
0
func init() {
	Before("@efs", func() {
		// FIXME remove custom region
		World["client"] = efs.New(aws.NewConfig().WithRegion("us-west-2"))
	})
}
func TestInterface(t *testing.T) {
	assert.Implements(t, (*efsiface.EFSAPI)(nil), efs.New(nil))
}