public function createShareAsync(
        $share,
        CreateShareOptions $options = null
    ) {
        Validate::canCastAsString($share, 'share');
        Validate::notNullOrEmpty($share, 'share');

        $method      = Resources::HTTP_PUT;
        $postParams  = array();
        $queryParams = array(Resources::QP_REST_TYPE => 'share');
        $path        = $this->createPath($share);

        if (is_null($options)) {
            $options = new CreateShareOptions();
        }

        $metadata = $options->getMetadata();
        $headers  = $this->generateMetadataHeaders($metadata);
        $this->addOptionalHeader(
            $headers,
            Resources::X_MS_SHARE_QUOTA,
            $options->getQuota()
        );

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_TIMEOUT,
            $options->getTimeout()
        );

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_CREATED,
            Resources::EMPTY_STRING,
            $options
        );
    }
public function createShareAsync(
        $share,
        CreateShareOptions $options = null
    ) {
        Validate::canCastAsString($share, 'share');
        Validate::notNullOrEmpty($share, 'share');

        $method      = Resources::HTTP_PUT;
        $postParams  = array();
        $queryParams = array(Resources::QP_REST_TYPE => 'share');
        $path        = $this->createPath($share);

        if (is_null($options)) {
            $options = new CreateShareOptions();
        }

        $metadata = $options->getMetadata();
        $headers  = $this->generateMetadataHeaders($metadata);
        $this->addOptionalHeader(
            $headers,
            Resources::X_MS_SHARE_QUOTA,
            $options->getQuota()
        );

        $this->addOptionalQueryParam(
            $queryParams,
            Resources::QP_TIMEOUT,
            $options->getTimeout()
        );

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_CREATED,
            Resources::EMPTY_STRING,
            $options
        );
    }
public function createShareAsync ( $ share , CreateShareOptions $ options = null ) { Validate :: canCastAsString ( $ share , 'share' ) ; Validate :: notNullOrEmpty ( $ share , 'share' ) ; $ method = Resources :: HTTP_PUT ; $ postParams = array ( ) ; $ queryParams = array ( Resources :: QP_REST_TYPE => 'share' ) ; $ path = $ this -> createPath ( $ share ) ; if ( is_null ( $ options ) ) { $ options = new CreateShareOptions ( ) ; } $ metadata = $ options -> getMetadata ( ) ; $ headers = $ this -> generateMetadataHeaders ( $ metadata ) ; $ this -> addOptionalHeader ( $ headers , Resources :: X_MS_SHARE_QUOTA , $ options -> getQuota ( ) ) ; $ this -> addOptionalQueryParam ( $ queryParams , Resources :: QP_TIMEOUT , $ options -> getTimeout ( ) ) ; return $ this -> sendAsync ( $ method , $ headers , $ queryParams , $ postParams , $ path , Resources :: STATUS_CREATED , Resources :: EMPTY_STRING , $ options ) ; }
Creates promise to create a new share in the given storage account.

@param string                  $share   The share name.
@param CreateShareOptions|null $options The optional parameters.

@return \GuzzleHttp\Promise\PromiseInterface

@see https://docs.microsoft.com/en-us/rest/api/storageservices/create-share
Creates promise to create a new share in the given storage account .