code: protected void setDistributionState(String distId, boolean enabled) {
          GetDistributionConfigResult result =
              cfClient.getDistributionConfig(new GetDistributionConfigRequest(distId));
  
          DistributionConfig distConfig = result.getDistributionConfig();
          distConfig.setEnabled(enabled);
  
          cfClient.updateDistribution(new UpdateDistributionRequest()
                                          .withDistributionConfig(distConfig)
                                          .withIfMatch(result.getETag())
                                          .withId(distId));
      }
docs: Enables or disables an existing distribution
  
  @param distId  the ID of the distribution
  @param enabled true to enable, false to disable