本文整理汇总了Golang中github.com/aws/aws-sdk-go/service/efs.EFS.DescribeFileSystems方法的典型用法代码示例。如果您正苦于以下问题:Golang EFS.DescribeFileSystems方法的具体用法?Golang EFS.DescribeFileSystems怎么用?Golang EFS.DescribeFileSystems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/aws/aws-sdk-go/service/efs.EFS
的用法示例。
在下文中一共展示了EFS.DescribeFileSystems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: getFileSystemLifeCycleState
func (d *driver) getFileSystemLifeCycleState(
svc *awsefs.EFS,
fileSystemID string) (string, error) {
resp, err := svc.DescribeFileSystems(
&awsefs.DescribeFileSystemsInput{
FileSystemId: aws.String(fileSystemID)})
if err != nil {
return "", err
}
fileSystem := resp.FileSystems[0]
return *fileSystem.LifeCycleState, nil
}
示例2: getAllFileSystems
// Retrieve all filesystems with tags from AWS API. This is very expensive
// operation as it issues AWS SDK call per filesystem to retrieve tags.
func (d *driver) getAllFileSystems(
svc *awsefs.EFS) (filesystems []*awsefs.FileSystemDescription, err error) {
resp, err := svc.DescribeFileSystems(&awsefs.DescribeFileSystemsInput{})
if err != nil {
return nil, err
}
filesystems = append(filesystems, resp.FileSystems...)
for resp.NextMarker != nil {
resp, err = svc.DescribeFileSystems(&awsefs.DescribeFileSystemsInput{
Marker: resp.NextMarker,
})
if err != nil {
return nil, err
}
filesystems = append(filesystems, resp.FileSystems...)
}
return filesystems, nil
}
示例3: DescribeFilesystem
// Helper function to describe EFS Filesystems.
func DescribeFilesystem(e *efs.EFS, n string) (*efs.DescribeFileSystemsOutput, error) {
params := &efs.DescribeFileSystemsInput{
CreationToken: aws.String(n),
}
return e.DescribeFileSystems(params)
}