コード例 #1
0
        /// <inheritdoc cref="ComputeApi.AssociateFloatingIPAsync" />
        /// <exception cref="InvalidOperationException">When this instance was not constructed by the <see cref="ComputeService"/>, as it is missing the appropriate internal state to execute service calls.</exception>
        public virtual async Task AssociateFloatingIPAsync(AssociateFloatingIPRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var compute = this.GetOwnerOrThrow <ComputeApi>();
            await compute.AssociateFloatingIPAsync(Id, request, cancellationToken);

            Addresses = await compute.ListServerAddressesAsync <ServerAddressCollection>(Id, cancellationToken);
        }
コード例 #2
0
 /// <inheritdoc cref="ComputeApi.AssociateFloatingIPAsync" />
 public virtual Task AssociateFloatingIPAddressAsync(Identifier serverId, AssociateFloatingIPRequest request, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(_computeApi.AssociateFloatingIPAsync(serverId, request, cancellationToken));
 }