コード例 #1
0
 /**
  * Sets properties
  *
  * @param   array|PublicIpAddressData $publicIPAddress
  * @return  IpConfigurationProperties
  */
 public function setPublicIPAddress($publicIPAddress = null)
 {
     if (!$publicIPAddress instanceof PublicIpAddressData) {
         $publicIPAddress = PublicIpAddressData::initArray($publicIPAddress);
     }
     return $this->__call(__FUNCTION__, [$publicIPAddress]);
 }
コード例 #2
0
ファイル: PublicIPAddresses.php プロジェクト: mheydt/scalr
 /**
  * Create a subnet for public ip addresses.
  *
  * @param string $subscriptionId    Subscription Id
  * @param string $resourceGroupName Name of Resource Group
  * @param string $name              Name for new public ip addresses
  * @param array|CreatePublicIpAddress|PublicIpAddressData  $requestData      Request data
  *
  * @return PublicIpAddressData Object with response
  */
 public function create($subscriptionId, $resourceGroupName, $name, $requestData)
 {
     $result = null;
     if (!$requestData instanceof CreatePublicIpAddress && !$requestData instanceof PublicIpAddressData) {
         $requestData = CreatePublicIpAddress::initArray($requestData);
     }
     $path = '/subscriptions/' . $subscriptionId . '/resourceGroups/' . $resourceGroupName . NetworkService::ENDPOINT_MICROSOFT_NETWORK . '/publicIPAddresses/' . $name;
     $request = $this->getClient()->prepareRequest($path, 'PUT', $this->getApiVersion(), $this->getServiceUrl(), [], $requestData->toArray());
     $response = $this->getClient()->call($request);
     if (!$response->hasError()) {
         $result = PublicIpAddressData::initArray($response->getResult());
     }
     return $result;
 }