本文整理匯總了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)
}