Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.elasticfilesystem.model;
 
 
Container for the parameters to the CreateFileSystem operation.

Creates a new, empty file system. The operation requires a creation token in the request that Amazon EFS uses to ensure idempotent creation (calling the operation with same creation token has no effect). If a file system does not currently exist that is owned by the caller's AWS account with the specified creation token, this operation does the following:

  • Creates a new, empty file system. The file system will have an Amazon EFS assigned ID, and an initial lifecycle state "creating".
  • Returns with the description of the created file system.

Otherwise, this operation returns a FileSystemAlreadyExists error with the ID of the existing file system.

NOTE:For basic use cases, you can use a randomly generated UUID for the creation token.

The idempotent operation allows you to retry a CreateFileSystem call without risk of creating an extra file system. This can happen when an initial call fails in a way that leaves it uncertain whether or not a file system was actually created. An example might be that a transport level timeout occurred or your connection was reset. As long as you use the same creation token, if the initial call had succeeded in creating a file system, the client can learn of its existence from the FileSystemAlreadyExists error.

NOTE:The CreateFileSystem call returns while the file system's lifecycle state is still "creating". You can check the file system creation status by calling the DescribeFileSystems API, which among other things returns the file system state.

After the file system is fully created, Amazon EFS sets its lifecycle state to "available", at which point you can create one or more mount targets for the file system (CreateMountTarget) in your VPC. You mount your Amazon EFS file system on an EC2 instances in your VPC via the mount target. For more information, see Amazon EFS: How it Works

This operation requires permission for the elasticfilesystem:CreateFileSystem action.

 
 public class CreateFileSystemRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.

Constraints:
Length: 1 - 64

 
     private String creationToken;

    
String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.

Constraints:
Length: 1 - 64

Returns:
String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.
    public String getCreationToken() {
        return ;
    }
    
    
String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.

Constraints:
Length: 1 - 64

Parameters:
creationToken String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.
    public void setCreationToken(String creationToken) {
        this. = creationToken;
    }
    
    
String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 64

Parameters:
creationToken String of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateFileSystemRequest withCreationToken(String creationToken) {
        this. = creationToken;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getCreationToken() != nullsb.append("CreationToken: " + getCreationToken() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCreationToken() == null) ? 0 : getCreationToken().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateFileSystemRequest == falsereturn false;
        CreateFileSystemRequest other = (CreateFileSystemRequest)obj;
        
        if (other.getCreationToken() == null ^ this.getCreationToken() == nullreturn false;
        if (other.getCreationToken() != null && other.getCreationToken().equals(this.getCreationToken()) == falsereturn false
        return true;
    }
    
    @Override
    public CreateFileSystemRequest clone() {
        
            return (CreateFileSystemRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X