コード例 #1
0
        internal virtual PutPolicyResponse PutPolicy(PutPolicyRequest request)
        {
            var marshaller   = PutPolicyRequestMarshaller.Instance;
            var unmarshaller = PutPolicyResponseUnmarshaller.Instance;

            return(Invoke <PutPolicyRequest, PutPolicyResponse>(request, marshaller, unmarshaller));
        }
コード例 #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the PutPolicy operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the PutPolicy operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy">REST API Reference for PutPolicy Operation</seealso>
        public virtual Task <PutPolicyResponse> PutPolicyAsync(PutPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = PutPolicyRequestMarshaller.Instance;
            var unmarshaller = PutPolicyResponseUnmarshaller.Instance;

            return(InvokeAsync <PutPolicyRequest, PutPolicyResponse>(request, marshaller,
                                                                     unmarshaller, cancellationToken));
        }
コード例 #3
0
        /// <summary>
        /// Creates an AWS Firewall Manager policy.
        ///
        ///
        /// <para>
        /// Firewall Manager provides the following types of policies:
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// A Shield Advanced policy, which applies Shield Advanced protection to specified accounts
        /// and resources
        /// </para>
        ///  </li> <li>
        /// <para>
        /// An AWS WAF policy, which contains a rule group and defines which resources are to
        /// be protected by that rule group
        /// </para>
        ///  </li> <li>
        /// <para>
        /// A security group policy, which manages VPC security groups across your AWS organization.
        ///
        /// </para>
        ///  </li> </ul>
        /// <para>
        /// Each policy is specific to one of the three types. If you want to enforce more than
        /// one policy type across accounts, you can create multiple policies. You can create
        /// multiple policies for each type.
        /// </para>
        ///
        /// <para>
        /// You must be subscribed to Shield Advanced to create a Shield Advanced policy. For
        /// more information about subscribing to Shield Advanced, see <a href="https://docs.aws.amazon.com/waf/latest/DDOSAPIReference/API_CreateSubscription.html">CreateSubscription</a>.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutPolicy service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the PutPolicy service method, as returned by FMS.</returns>
        /// <exception cref="Amazon.FMS.Model.InternalErrorException">
        /// The operation failed because of a system problem, even though the request was valid.
        /// Retry your request.
        /// </exception>
        /// <exception cref="Amazon.FMS.Model.InvalidInputException">
        /// The parameters of the request were invalid.
        /// </exception>
        /// <exception cref="Amazon.FMS.Model.InvalidOperationException">
        /// The operation failed because there was nothing to do. For example, you might have
        /// submitted an <code>AssociateAdminAccount</code> request, but the account ID that you
        /// submitted was already set as the AWS Firewall Manager administrator.
        /// </exception>
        /// <exception cref="Amazon.FMS.Model.InvalidTypeException">
        /// The value of the <code>Type</code> parameter is invalid.
        /// </exception>
        /// <exception cref="Amazon.FMS.Model.LimitExceededException">
        /// The operation exceeds a resource limit, for example, the maximum number of <code>policy</code>
        /// objects that you can create for an AWS account. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html">Firewall
        /// Manager Limits</a> in the <i>AWS WAF Developer Guide</i>.
        /// </exception>
        /// <exception cref="Amazon.FMS.Model.ResourceNotFoundException">
        /// The specified resource was not found.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy">REST API Reference for PutPolicy Operation</seealso>
        public virtual Task <PutPolicyResponse> PutPolicyAsync(PutPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutPolicyRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutPolicyResponseUnmarshaller.Instance;

            return(InvokeAsync <PutPolicyResponse>(request, options, cancellationToken));
        }
コード例 #4
0
        internal virtual PutPolicyResponse PutPolicy(PutPolicyRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutPolicyRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutPolicyResponseUnmarshaller.Instance;

            return(Invoke <PutPolicyResponse>(request, options));
        }