code: protected void setDistributionState(String distId, boolean enabled) {
          GetStreamingDistributionConfigResult result =
              cfClient.getStreamingDistributionConfig(
                  new GetStreamingDistributionConfigRequest(distId));
  
          StreamingDistributionConfig distConfig =
              result.getStreamingDistributionConfig();
          distConfig.setEnabled(enabled);
  
          cfClient.updateStreamingDistribution(
              new UpdateStreamingDistributionRequest()
                  .withStreamingDistributionConfig(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